Login  Register

Calculating mean and standard deviation from a summary

Posted by Jeremy Goodwin on Jul 02, 2015; 3:54pm
URL: http://imagej.273.s1.nabble.com/Calculating-mean-and-standard-deviation-from-a-summary-tp5013398.html

Hi,



Is it possible to write a macro (or is there a macro0 which will calculate
the mean particle count, the standard deviation and the min and max counts,
after processing a batch of images?



I’m a bit lost on how to approach this.  Is easy to do in Excel, but I’d
like to automate it during batch processing.



This is the batch macro that I’m using - saves all my output images and the
summary file.



macro "Batch" {

dir1 = getDirectory("Choose Source Directory ");

dir2 = getDirectory("Choose Destination Directory ");

list = getFileList(dir1);

setBatchMode(true);

for (i=0; i<list.length; i++) {

 showProgress(i+1, list.length);

 open(dir1+list[i]);



run("8-bit");

run("Bandpass Filter...", "filter_large=100 filter_small=10 suppress=None
tolerance=5 autoscale saturate");

run("Auto Threshold...", "method=Mean white");

run("Analyze Particles...", "size=200-Infinity show=Outlines clear
summarize in_situ");

saveAs("TIFF", dir2+list[i]);

selectWindow("Summary");

saveAs("Text", dir2+"Summary.xls");

close();

}



Yours



jez

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