Login  Register

Set Measurement failed in macro

Posted by Krs5 on Oct 05, 2017; 7:50pm
URL: http://imagej.273.s1.nabble.com/ImageJ-Reslice-command-Image-Stacks-Reslice-tp5019450p5019506.html

Dear list


I noticed some strange behaviour when using different Set Measurements together with the ROI manager in a macro.


example code


run("Blobs (25K)");
setAutoThreshold("Default");
setOption("BlackBackground", false);
run("Convert to Mask");
run("Set Measurements...", "display redirect=None decimal=0");
run("Analyze Particles...", "size=1-Infinity summarize add");
run("Set Measurements...", "feret's display redirect=None decimal=3");
roiManager("Measure");

As soon as the second Set Measurements runs area data is already displayed in the Results window, even before anything is measured, labelled as blobs.gif. The last line adds a second series of data to the Results table now labelled as ROIs but still the results are for area and not feret's data. Strangely enough the first few times the values for area were the correct values but after I moved some code around they now show zeros.

Also hitting "Measure" in the ROI menu after running the macro still gives the same result. Checking the settings under Analyze > Set Measurements shows however that Feret's diameter is selected and not Area.

I have tested it on several PCs, all Windows 7 using the latest updated version of Fiji.

So it seems to be that there is somewhere a bug.

Best wishes

Kees

Dr Ir K.R. Straatman
Senior Experimental Officer
Advanced Imaging Facility
Centre for Core Biotechnology Services
University of Leicester
www.le.ac.uk/advanced-imaging-facility<http://www.le.ac.uk/advanced-imaging-facility>


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