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!