[Dcmlib] Image conversion
Jean-Pierre Roux
jpr at creatis.insa-lyon.fr
Fri Aug 19 14:14:19 CEST 2005
olivier.stern at swing.be wrote:
>
> 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.
>
You have first to retrieve the maximum maximorum and the minimum
minimorum for the whole serie, and use those *two* values to rescale
*all* the images.
> 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
>
Probabely, the actual maximum pixel value is much less than 4095 (that's
the highest possible value on 12 bits, not the max value held in the images)
Jean-Pierre.
> 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
>
More information about the Dcmlib
mailing list