ImageWindow Magnification

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ImageWindow Magnification

Sullivan, Michael J (College of Med.)
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
Reply | Threaded
Open this post in threaded view
|

Re: ImageWindow Magnification

Mohana Ramaratnam
Have you looked at the ImageCanvas.(set/get)Magnification methods. These
can be accessed from the ImageWindow


Michael Sullivan wrote:

>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
>
>  
>
Reply | Threaded
Open this post in threaded view
|

Re: ImageWindow Magnification

Wayne Rasband
In reply to this post by Sullivan, Michael J (College of Med.)
> 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