[Dcmlib] Image conversion

olivier.stern at swing.be olivier.stern at swing.be
Tue Aug 9 15:59:32 CEST 2005



Hello,
 
I have a little trouble converting images. I got DICOM images with 16 bits allocated, 12 bits stored and 11 as high bit. I'd like to change them to 8 bits allocated, 8 bits stored and 7 as high bit.
 
What I've done first was taking the highest value of pixels on one image and the lowest, and made a conversion to value between 0 and 255 (thanks to Jean-Perre Roux). But this conversion wasn't the same from one image to another because the highest value and the lowest change. What I need is a constant conversion so what I 've done is: as the highest theoric value that a file with 12 bits stored can take is 4095 and a file with 8 bits stored is 255, all pixels of the original images were devised by 16 (4096/256 = 16). But the output image was very dark, either deleting 0x0028,0x1050 and 0x0028,0x1051. If I devise by 4 I get a relatively good result but I can't say why. Could anyone explain me if what I m doing is correct?

Olivier
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.creatis.insa-lyon.fr/pipermail/dcmlib/attachments/20050809/4bf681bb/attachment.html>


More information about the Dcmlib mailing list