Login  Register

Re: ImageWindow Magnification

Posted by Wayne Rasband on Feb 01, 2006; 4:15pm
URL: http://imagej.273.s1.nabble.com/ImageWindow-Magnification-tp3703866p3703867.html

> hay All. I'm writing a plugin that will open two copies of
> the same image side by side on the screen -- one is to be an
> "original" and the other a working image. Unfortunately, The
> images open at a magnification of 0.75 and I cannot position
> them without them overlaping. I've been searching for a way
> to affect the ImageWindows magnification but can't seem to
> find the access point.  Any Ideas would be appreciated. ---
> Mike

Use run("In") and run("Out") to change the magnification and getZoom()
to find out what it is. In a plugin, use IJ.run("In"), IJ.run("Out")
and

     ImagePlus imp = IJ.getImage();
     ImageWindow win = imp.getWindow();
     double magnification = win.getCanvas().getMagnification();

-wayne