Zoom to specific region and magnification

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

Zoom to specific region and magnification

tankhead
Hi,

I have been using the following code in my macro:

            run("To Selection");
        run("Out");
        run("Out");
        run("Out");

To zoom in on the selection and then zoom out a bit so the the image does not seem so pixelated.  The main problem I run into when doing this is run("Out"); runs out wherever the mouse location is.  Therefore, I am no longer focused on the selection if my mouse is at some other location of the image.  How would I be able to magnify the selection, which is always around the middle of the image?
I have tried run("Set... ", "zoom=###"); but that seems to not zoom to the middle but the upper left portion of the image, regardless of where the mouse is located.  
Thanks,
Reply | Threaded
Open this post in threaded view
|

Re: Zoom to specific region and magnification

Nathaniel Ryckman
Here is an idea someone tried out. I don't have very much time at the moment to see if it works, but maybe it will help you?

http://imagej.588099.n2.nabble.com/Centre-and-zoom-on-multiple-ROI-s-td631260.html

Good luck!
Reply | Threaded
Open this post in threaded view
|

Re: Zoom to specific region and magnification

tankhead
Nathan,

Thank you for showing me that.

-D