Login  Register

Re: Move active window to back

Posted by PEARSON Matthew on Mar 15, 2015; 9:05pm
URL: http://imagej.273.s1.nabble.com/Move-active-window-to-back-tp5011971p5011973.html

Hi Peter,

Thanks for your comments.  I did try put behind tab but this didn't work as I expected.  The macro comes back to an image its already analysed before it completes the others.  I'm running the macro in batch mode and this could be causing complications.  I'm familiar with imageID's and use them often, but i'll have to think a lot more carefully about how that will work in the context of this macro.  I'd actually completely forgotten you could count the number of open images with nImages, so that will be useful!

Thanks,

Matt







On 15 Mar 2015, at 19:42, Thomas Peterbauer <[hidden email]> wrote:

> On 2015-03-15 19:45, Matt Pearson wrote:
>> In a macro, if I have a number of images open, how can i move the active image to the back?
>
> run("Put Behind [tab]");
>
> More specific handling of image windows is possible. Each open image has a unique identifier (a negative number), which you can retrieve from the active image with:
>
> id = getImageID();
>
> To get an array with all IDs, you can loop over the open images:
>
> imageIDs=newArray(nImages);
> for (i=1; i<=nImages; i++) {
>    selectImage(i); //positive number activates the i-th image
>    imageIDs[i-1]=getImageID(); //array starts with index 0
> }
>
> for (i=0; i<imageIDs.length; i++) {
>    print(imageIDs[i]);
> }
>
> With the stored IDs, you can later use the following commands:
>
> selectImage(id);
> isActive(id);
> isOpen(id);
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>


--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

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