[Dcmlib] Image conversion
Benoit Regrain
benoit.regrain at creatis.insa-lyon.fr
Wed Aug 10 10:38:30 CEST 2005
Hi,
Your calculus seem good.
In your original and final image, what are the maximum and minimum in the pixel values ?
If the ratio between the max and the number of possible values for the original and final images
are same, then your conversion is correct.
In this case, it will only be a lookup table problem.
Cheers
Benoit Regrain
----- Original Message -----
From: olivier.stern at swing.be
To: Dcmlib at creatis.insa-lyon.fr
Sent: Tuesday, August 09, 2005 3:59 PM
Subject: [Dcmlib] Image conversion
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
------------------------------------------------------------------------------
_______________________________________________
Dcmlib mailing list
Dcmlib at creatis.insa-lyon.fr
http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.creatis.insa-lyon.fr/pipermail/dcmlib/attachments/20050810/7a0160ce/attachment.html>
More information about the Dcmlib
mailing list