Re: Antwort: Re: How to call "Contrast Enhancer" from Java plugin
Posted by
Wayne Rasband on
Sep 08, 2009; 8:13pm
URL: http://imagej.273.s1.nabble.com/How-to-call-Contrast-Enhancer-from-Java-plugin-tp3691264p3691267.html
> Hi Wayne,
>
> thanks for the hint, I now understand the difference between IJ.run
> and
> IJ.runPlugIn!
>
> However, this seems to reveal some bug in the contrast enhancer:
>
> If you look in the sourecode of the "B&C" window, you see that the
> "Auto"
> button that I would like to use has it´s own built-in contrast enhan
> cer
> which seems to work fine. HOWEVER, it records
>
> run("Enhance Contrast", "saturated=0.5");
>
> instead! What I find with my data that there seems to be a bug in
> the true
> ContrastEnhancer, the result is NOT the same and depends strongly on
> the %
> value given, for 0.1 there is practically no
> effect, while 0.5 percent leads to a strongly asymmetrical clipping
> of
> much more than 0.5%!
A saturation value of 0.35 seems to produce results closest to what
you get when clicking on "Auto" in the "B&C" window, so I changed the
value that gets recorded from 0.5 to 0.35.
-wayne