Login  Register

ResultTable

Posted by Schmidt, Dr. Harald on Mar 04, 2010; 6:44am
URL: http://imagej.273.s1.nabble.com/ResultTable-tp3689109.html

Hello to all,
I wrote a macro, analysing all images in a folder. The macro works well
but I have two questions refering to the ResultTable:
1. I wrote the macro with IJvers1.42q and get only the results for the
second analysis (as expected). Using an newer version (1.43o) I get the
results of both analysis, although this is not stated in the macro. What
makes this difference?
2. The results for each image are added to the next free row. Is there
any way for adding the results to the next free column?
Thanks a lot
Harald

This is the macro:
dir1 = getDirectory("Choose Source Directory ");
dir2 = getDirectory("Choose Destination Directory ");
list = getFileList(dir1);
setBatchMode(true);
run("Set Measurements...", "area display redirect=None decimal=9");
for (i=0; i<list.length; i++) {
showProgress(i+1, list.length);
open(dir1+list[i]);
run("Auto Threshold", "method=Otsu white");
run("Invert");
run("Analyze Particles...", "size=20-? circularity=0.00-1.00 show=Masks
exclude");
run("Skeletonize");
run("Analyze Particles...", "size=0-? circularity=0.00-1.00 show=Nothing
display");
saveAs("tif", dir2+list[i]);
close();
close();
}
selectWindow("Results");
saveAs("Measurements", dir2 + "Results.xls");
run("Clear Results");
run("Close");