mode from histogram

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

mode from histogram

donny008
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?



thnku

--
Donny George
Reply | Threaded
Open this post in threaded view
|

Re: mode from histogram

Wayne Rasband
> 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