there's a major problem of your method of image stitching. If the second image is displaced not only in the X direction but also in the Y direction, then the assumption of using the maximal correlation coefficient to obtain the displacement will fail. Images to be stitched are normally displaced in both X and Y directions so it will be quite hard to use your code reliably.
hi John, it would be nice to add some 'disable' functionality to your selectdata function. By this I mean the ability to launch selectdata under control of a togglebutton (similar to the brush togglebutton), so if the user wants to cancel selection he can also toggle off the controller.
ps: by the way, there's a minor bug in the 'axes' property. If you have more than 1 axes in the figure and the user tries to select something from the wrong axes (i tried so far 'rect' as a tool) selectdata allows other axes to be used for selection though the selection tools does not work properly.