On Mar 21, 2014, at 12:06 PM, Peter Mc wrote:
> Hi everyone;
>
> Performing a few conversions from 32-bits real images stack to 16 - bit
> images stack, I just realized that each frame is being scaled from 0 to
> 65535 so guess that each frame is being scaled independently instead
> considering a common scale factor (e.g. 65535 / (wholeStackMax -
> wholeStackMin )) Am I right? Do I have to program the conversion myself or
> something is already implemented?
The Image>Type>16-bit command converts the images in a 32-bit stack using a common scale factor of
scale = 65535/(max-min)
were min and max define the display range that is set in the Image>Adjust>Brightness/Contrast dialog. To convert using a scale factor based on the whole stack min and max use this simple macro
Stack.getStatistics(voxelCount, mean, stackMin, stackMax);
setMinAndMax(stackMin, stackMax);
run("16-bit");
-wayne
> --
> View this message in context:
http://imagej.1557.x6.nabble.com/32-bit-images-to-16-bit-images-tp5007036.html> Sent from the ImageJ mailing list archive at Nabble.com.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html