Login  Register

Re: Macro Language | select all masks from ROI Manager

Posted by Rainer M. Engel on Aug 06, 2013; 4:02pm
URL: http://imagej.273.s1.nabble.com/Macro-Language-select-all-masks-from-ROI-Manager-tp5004323p5004329.html

Thank you Kees, Jan and Wayne.

I was already trying something like that. But I got lost and now I know
why. I missed to hit..

roiManager("Combine");

..to be able, making a "global" enlarge of that combined mask.

roiManager("Select", 0);
run("Enlarge...", "enlarge=15"); -> enlarges that mask

roiManager("Select", newArray(0,1));
´run("Enlarge...", "enlarge=15"); -> only enlarges Mask 0

Same for selections of more ROIs. I forgot/missed to combine them first
and thought the selection process itself "failed".

Thanks again.

Rainer


Am 06.08.2013 17:02, schrieb Straatman, Kees R. (Dr.):

> Obviously after deleting the "Array.print(array1)" line
>
> Kees
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Straatman, Kees R. (Dr.)
> Sent: 06 August 2013 15:59
> To: [hidden email]
> Subject: Re: Macro Language | select all masks from ROI Manager
>
> Hi Rainer,
>
> I had to think a moment about this but assuming you don't want to use "Show All" you could use the snipped below to select all items in the ROI manager:
>
> array1 = newArray("0");;
> for (i=1;i<roiManager("count");i++){
> array1 = Array.concat(array1,i);
> Array.print(array1);
> }
> roiManager("select", array1);
>
> Best wishes
>
> Kees
>
>
> Dr Ir K.R. Straatman
> Senior Experimental Officer
> Centre for Core Biotechnology Services
> University of Leicester
>
> http://www.le.ac.uk/biochem/microscopy/home.html
>
>
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Rainer M. Engel
> Sent: 06 August 2013 14:58
> To: [hidden email]
> Subject: Macro Language | select all masks from ROI Manager
>
> Hey everyone.
>
> Playing around with selections I had difficulties selecting all masks from ROI Manager in one step. De-selecting all is easy ;-(
>
> I hope I haven't overlooked the obvious.
>
> Best Regards,
> Rainer
>
> --
> Rainer M. Engel, Dipl. Digital Artist
> scientific|Media GbR
> Pichelsdorfer Str. 143
> 13595 Berlin
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
>

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