Re: convert uint16 image to uint8 image in ImageJ
Posted by
Albert Cardona on
Dec 06, 2007; 12:41am
URL: http://imagej.273.s1.nabble.com/convert-uint16-image-to-uint8-image-in-ImageJ-tp3697849p3697850.html
> In what way is in app. ImageJ performs this task: convert uint16 to uint8
> image? i am specially interesting in intensity rescaling from [0 65535] to
> [0 255].
>
ImagePlus imp = IJ.getImage()
imp.setProcessor(null, imp.getProcessor().convertToByte(true));
The above is equivalent to the menu command: Image / type / 8-bit
which you can run as:
IJ.run("8-bit");
--
Albert Cardona
http://www.mcdb.ucla.edu/Research/Hartenstein/acardona