Login  Register

macro ImageJ

Posted by Nascimbeni on Jul 11, 2007; 3:35pm
URL: http://imagej.273.s1.nabble.com/macro-ImageJ-tp3698877.html

Hello all,

We do have a macro "Analyze Particles" (the copy is joined below).
We would like to add to that macro a watershed function.
We tried to add run("Watershed"); just after setThreshold(30, 80); but
this did not work. A message telling "8-bit binary image (0 and 255)  
required" appears.
Anybody has a solution???

Thanks a lot
Best regards
Michelina Nascimbeni



requires("1.38o");
     dir = getDirectory("Choose a Directory ");
     list = getFileList(dir);
     setBatchMode(true);
     for (i=0; i<list.length; i++) {
         showProgress(i, list.length);
         open(dir+list[i]);
         getStatistics(area, mean, min, max, std);
         threshold = mean + 2.5*std;
         setThreshold(30, 80);
         run("Analyze Particles...", "size=100-650 summarize");
         close;
     }
     selectWindow("Summary");
     saveAs("Text", getDirectory("home")+"Summary.txt");