Login  Register

Re: Macro: Zoom in without changing window size (tiled display)

Posted by Michael Entrup on Jan 30, 2015; 9:49am
URL: http://imagej.273.s1.nabble.com/Macro-Zoom-in-without-changing-window-size-tiled-display-tp5011359p5011386.html

Hi Matt,

with 'Boats', zoom without resize does not work, too. Here is my example:

run("Boats (356K)");
run("Out [-]");
run("Out [-]");
makeRectangle(364, 260, 184, 104);
showMessage("The image windows is very small.");
setKeyDown("alt");
run("To Selection");
showMessage("Now it is much larger.");

There is another problem, if I add another 'run("Out [-]")'. Try this:

run("Boats (356K)");
run("Out [-]");
run("Out [-]");
run("Out [-]");
makeRectangle(364, 260, 184, 104);
showMessage("The image windows is very small.");
setKeyDown("alt");
run("To Selection");
showMessage("Now it is much larger.");

The top left corner is shown and not the selection.

I'm a bit confused how holding down [alt] should help. If I open the
menu and hold [ald], it will directly close (on Win7). There is no
chance to select any menu item.

Best regards
Michael


Am 29.01.2015 um 16:27 schrieb mattjackson:

> Thanks so much, Wayne. I didn't know about the setKeyDown function. I'm
> surprised it doesn't pop up in the macro recorder.
>
> So... Very weird, but the code you posted works perfectly. However, if I
> exchange the Blob image with my own, it doesn't work. The image still
> resizes.
>
> selectWindow("Stitched_DAPI.tif");
> //run("Blobs (25K)");
> makeRectangle(113, 70, 37, 30);
> setKeyDown("alt");
> run("To Selection");
>
> I've attached the file, "Stitched_DAPI.tif", to help debug this. I tried
> downloading a fresh version of FIJI and enabling ImageJ2, but the same issue
> happens. Any ideas?
>
> -Matt
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Macro-Zoom-in-without-changing-window-size-tiled-display-tp5011359p5011369.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html