resetMinAndMax() not being applied immediately?

Posted by Kenneth Sloan-2 on
URL: http://imagej.273.s1.nabble.com/resetMinAndMax-not-being-applied-immediately-tp5020600.html

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