HELP! Image and Hounsfield Units Advice...

720 views
Skip to first unread message

Ben Callister

unread,
Oct 17, 2012, 7:18:27 PM10/17/12
to fo-d...@googlegroups.com
hello-
 
when I us fo-dicom's DicomImage.RenderImage(...) to get a System.Drawing.Image, the new instance is a 24-bit Bitmap, with RGB values set to the exact value for any given pixel. here are my questions:
 
1) since the RGB values are always the same for any given pixel, does that mean that I will always only have up to 255 shades of gray because that is all that can be stored in a single byte channel?
 
2) assuming #1 is true, is this how the data actually exists in the native dicom file (only up to 255 possible values for any given pixel)? or is this a transformation that DicomImage.RenderImage(...) is performing? if the latter, is there a way to get the native values instead?
 
3) I need to be able to calculate Hounsfield Units for any given pixel and am having a bit of trouble. i see online that the formula is the following:
 
HU = pixel_intensity * rescale_slope + rescale_intercept
 
i am able to read the rescale_slope and rescale_intercept from the DICOM tags using fo-dicom. however, these AWLAYS seem to come back as 1.0 and -1024 respectively (at least from the source GE workstation i am using). will these values remain constant for an entire study, or can they change for any given image within a series?
 
i am assuming that pixel_intensity is the color value that is within the pixel itself, which is always in the 0-255 range as mentioned above and is the same for each of the R, G, and B channels. therefore:
 
HU = ((150 * 1.0) - 1024) = -874      (given a pixel value of 150)
 
however, i know something about the distribution of my pixel values and i know that 150 should be in the Contrast range. yet, that translates to -874 above in HU. and this must be wrong because Contrast in HU should be ~200-700 HU.
 
can anyone help me understand what i am doing wrong? many thanks in advance!

Colby Dillion

unread,
Oct 18, 2012, 12:04:38 AM10/18/12
to fo-d...@googlegroups.com
The RGB values are a result of the output of the DICOM Grayscale Standard Display Function which is implemented in the GenericGrayscalePipeline class. These values are 8 bit output values and are not HU. The values in the pixel data of a CT image can be either signed or unsigned and are generally 12 to 16 bits in length.

The best way to get HU out of CT pixel data would be to use the PixelDataFactory class to extract the pixels and then use the ModalityLUT class to rescale them to HU. These classes will abstract away the process of accessing the pixel data and the output will be an array of Int32s (already rescaled to HU) regardless of how the pixel data is stored. You can look at the DicomImage and GenericGrayscalePipeline classes to get an idea of how to create and use the IPixelData and ILUT based classes.

Colby
Reply all
Reply to author
Forward
0 new messages