http://imagej.273.s1.nabble.com/resetMinAndMax-not-being-applied-immediately-tp5020600p5020616.html
Yes - Java. I am doing resetMinAndMax on the FloatProcessor, BEFORE there
is an ImagePlus. The code that creates the FloatProcessors knows how it
StackWindow.
then back again.
I will try adding UpdateAndDraw calls AFTER I create the StackWindow. But -
(not yet created) ImagePlus.
Thanks for the reply.
> Hi Kenneth,
>
> It seems you are programming in Java.
> In this case, either call IJ.resetMinAndMax(imp) or do the
> (re)setMinAndMax on the ImageProcessor, then updateAndDraw() on the
> ImagePlus.
>
>
> Michael
> ________________________________________________________________
>
> On 02/05/2018 01:08, Kenneth Sloan wrote:
> > I have an ImageStack containing FloatProcessors.
> >
> > Most of the images have values in [0.0, 255.0]
> >
> > ONE of the images may have values in [0.0, 700.0]
> >
> > I am trying to use resetMinAndMax to adjust the range of values mapped
> > to [0,255] for display purposes.
> >
> > It seems to me that this does not always take effect immediately. In
> particular,
> > the adjustment appears to take effect only after scrolling in the
> ImageStack away
> > from the image, and then back again.
> >
> > Is there some sort of "update" call that I need to make? If so, I seem
> to
> > have overlooked it in the documentation for the FloatProcessor API.
> >
> > I had similar issues when displaying a single image (not as part of a
> stack), but
> > my current code seems to do the right thing. I'm not sure why. I don't
> like
> > not knowing...
> >
> > Similarly, earlier attempts tried to use setMinAndMax.
> >
> > In the future, I may want to use an auto setting for Adjust Brightness &
> Contrast,
> > but, for now I'm happy with resetMinAndMax - when it actually takes
> effect!
> >
> > If it matters - I typically apply the resetMinAndMax to the
> FloatProcessor *before*
> > making the ImageStack visible.
> >
> > All of this is embedded in a rather large Java plugin - but I can try to
> produce a minimal
> > demonstration version, if that will help.
> >
> > I suspect I've simply missed a "DoIt!" method, somewhere.
> >
> > --
> > Kenneth Sloan
> >
[hidden email]
> > Vision is the art of seeing what is invisible to others.
> >
> > --
> > ImageJ mailing list:
http://imagej.nih.gov/ij/list.html> >
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>