Question for a macro

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Question for a macro

Michelina Nascimbeni
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");