> Hi,
>
> I'm trying to write a macro that will determine the gray value 3.5
> standard
> deviations higher than the mean, from a selected region of the image.
> Apparently, this was possible on an older version of ImageJ running on
> Mac
> OS 9, but I'm using OS X and the macro language has changed. I have no
> previous experience writing macros, so please bear with me.
>
> The problem I'm having is with setting the lower limit on the
> threshold. I'd
> like it to be a variable equal to the parameters given above,
> "3.5*StdDev +
> Mean" (actually, rounded to the next integer), but I don't really know
> how
> to go about defining such a variable.
Use the getRawStatistics() macro function to get the standard deviation
and setThreshold() to set the Threshold. Here is an example:
getRawStatistics(nPixels, mean, min, max, stdDev);
t1 = 3.5*stdDev+mean;
t2 = max;
setThreshold(t1, t2);
-wayne