On Aug 16, 2013, at 10:48 AM, sreeyuth wrote:
> Hi,
>
> I have around 440 images in my stack. From each image, I want to get the
> total number of pixels having negative values. So in the end I expect a list
> which has just 2 columns, Slice Number and No. of pixels having negative
> values in that slice.
Here is a macro that does this:
saveSettings;
run("Clear Results");
run("Set Scale...", "distance=0 known=0");
setThreshold(-99999, -0.00001);
run("Set Measurements...", "area limit");
for (n=1; n<=nSlices; n++) {
setSlice(n);
run("Measure");
}
restoreSettings;
-wayne
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html