Re: How to apply auto window/level adjust to a new image from within a plugin?
Posted by
Ron Kneusel on
Jun 26, 2007; 5:21pm
URL: http://imagej.273.s1.nabble.com/How-to-apply-auto-window-level-adjust-to-a-new-image-from-within-a-plugin-tp3699000p3699002.html
Michael-
Thanks for the tip. I will certainly give this a try but isn't there a way
to actually call the same functionality as the menu command? I see in the
plugins tutorial that you can call menu commands but I'm not clear on the
format of the arguments or even what to call.
Ron
>you can try
> new ContrastEnhancer().stretchHistogram(ip, 0.5);
>where ip is the ImageProcessor and 0.5 is the percentage of
>saturated pixels. Don't forget imp.updateAndDraw(); thereafter
>(where imp is the ImagePlus that contains ip).
>
>Michael
_________________________________________________________________
Make every IM count. Download Messenger and join the im Initiative now.
Its free.
http://im.live.com/messenger/im/home/?source=TAGHM_June07