Re: convert uint16 image to uint8 image in ImageJ
Posted by
Marko Usaj on
Dec 06, 2007; 1:01am
URL: http://imagej.273.s1.nabble.com/convert-uint16-image-to-uint8-image-in-ImageJ-tp3697849p3697851.html
Thank you for you replay...
Have you already also now the algorithm which perform that?
Probably 16BPP intensity value is Divided by 65535 and then multiplied
by 255...and the is performing some rounding the number...in what way?
Floor? Near neighbor?...etc.
Thank you!
Marko
-----Original Message-----
From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of
Albert Cardona
Sent: 6. december 2007 1:41
To:
[hidden email]
Subject: Re: convert uint16 image to uint8 image in ImageJ
> 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