Posted by
Krs5 on
Jan 28, 2016; 3:06pm
URL: http://imagej.273.s1.nabble.com/how-to-run-the-same-macro-to-a-set-of-ROIs-on-1-image-tp5015474p5015475.html
Dear Vero,
You have to do this for each ROI individually. The code below will do this.
for (i=0; i<roiManager("count");i++){
roiManager("Select", i);
run("Make Band...", "band=5");
roiManager("Update"); //In case you want to have the band selection replacing the original selection, otherwise delete the line
}
Best wishes
Kees
Dr Ir K.R. Straatman
Senior Experimental Officer
Advanced Imaging Facility
Centre for Core Biotechnology Services
University of Leicester
http://www2.le.ac.uk/colleges/medbiopsych/facilities-and-services/cbs/lite/aif-----Original Message-----
From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of Vero
Sent: 28 January 2016 11:59
To:
[hidden email]
Subject: how to run the same macro to a set of ROIs on 1 image ?
Hello everybody,
I have to analyze mean gray values (min and max too) for about 50 nuclei, on each image of my study (80 images).
I found a method to determine automatically ROI for each nucleus (by tresholding and analyzing particles with adding to Manager). But before analyzing mean gray values, the ROI has to be transformed to a band with the function Edit / Selection / Make band (automatized in a macro).
Could someone, please, give me a solution to run the macro on all ROIs of a set ? Actually, the ROIs in the Manager are not consider as selections...
Thanks in advance,
Vero
--
View this message in context:
http://imagej.1557.x6.nabble.com/how-to-run-the-same-macro-to-a-set-of-ROIs-on-1-image-tp5015474.htmlSent 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