Re: Mouse Events and Zoomed Images

Posted by nellypledge on
URL: http://imagej.273.s1.nabble.com/Mouse-Events-and-Zoomed-Images-tp5015681p5015685.html

Hi John, thanks for the pointer.

It's not the ImageWindow class that contains the details I need, but the subclass ImageCanvas does.  I was using the java.awt.Canvas, when I should have been using the ij.gui.ImageCanvas.  Now that I'm adding my listener to the right kind of canvas, I can use the details that save me even thinking about scaling etc.

Using the getCursorLoc() in the ImageCanvas object returns the pixel location independent of the scaling  Perfect!

Thanks for the tips.

Neil