Re: mode from histogram
Posted by
Wayne Rasband on
URL: http://imagej.273.s1.nabble.com/mode-from-histogram-tp3692480p3692481.html
> hello
>
> I am facing a small issue where i want to set the maximum value of
> Threshold
> of the image to (mode-2). I tried the macro in the format below
>
> run("Threshold");
> setThreshold(0, "mode-2");
>
> would this be logical?
No. Here is a macro that sets the threshold to mode-2:
List.setMeasurements;
mode = List.getValue("Mode");
setThreshold(0, mode-2);
It requires ImageJ 1.42i or later, which adds the
List.setMeasurements, List.getValue() macro functions.
-wayne