Login  Register

Re: convert 12 bit to 8 bit images faithfully

Posted by Michael Schmid on Oct 21, 2014; 5:46pm
URL: http://imagej.273.s1.nabble.com/convert-12-bit-to-8-bit-images-faithfully-tp5010135p5010136.html

Hi Hao,

you can simply set the display range to 0-4095 (Set in The Brighness&Contrast Panel). If you select "8-bit" then the 0-4095 range will be mapped to 0-255. You can easily have a macro for this. This is what the Macro recorder would tell you:
  setMinAndMax(0, 4095);
  run("8-bit");

(This assumes that Edit>Options>Conversions" has "Scale when converting" enabled; otherwise 0-255 will be mapped to 0-255 and everything from 256-2095 will become 255)

It should be noted that a conversion from 12 to 8 bits is never "faithful": You will always lose information; in your case 16 gray levels will be mapped to one!

Michael
________________________________________________________________
On Oct 21, 2014, at 19:09, Hao Wu wrote:

> Hi, everyone!
>
> I have been using ImageJ to export my 12 bit images for a long time. Today
> I find out it is not a good idea because the "8  bit" function is not
> working the way I thought. Instead of converting 0~4095 to 0~255, actually
> it converts from min~max of that particular image to 0~255. I am wondering,
> does anybody happen to know any plugins, macros or software to faithfully
> do the conversion? Thank you very much!
>
> Best,
> Hao

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html