statistics of an entire stack
Posted by Jonathan Leong on
URL: http://imagej.273.s1.nabble.com/statistics-of-an-entire-stack-tp3692981.html
hello imagej users,
i'm trying to obtain statistics (e.g. mean pixel value or standard deviation
of all pixel values) of entire stacks using macros. would any of you be able
to show me how to do this?
in particular, my task is to use a macro to open a stack, determine its mean
pixel value and the standard deviation of the pixel values (of all pixels in
the stack, not just a single slice), and then use that information as
parameters for further processings, e.g. thresholding.
if i want to do this "by hand," i can simply use ctl-h to use the histogram
function. however, i'm not sure how to do something like this in a macro - i
can of course do a "Run("histogram", "stack")" but then i am not quite able
to extract the mean/std values that i need.
at this point my solution is to actually open the stack in matlab and pass
the necessary parameters to the iamgej macro as an argument. this offers
additional flexibility since i can calculate whatever i want in matlab - it
is just extremely slow to open stacks in matlab.
any ideas very much appreciated!
thanks in advance,
jonathan