ImageGear Professional v18.2 > User Guide > Using ImageGear > Using ImageGear MD Component > Displaying Medical Grayscale Images |
Many of the medical images use more than 8 bits per grayscale pixel. The main concern in displaying such images is that commonly used monitors can display only 256 shades of gray, which corresponds to 8 bits per pixel. The 16-bit pixels need to be mapped in some way to 8-bit pixels. ImageGear uses two approaches for this mapping.
If a 9..16 bit grayscale image has been loaded from a non-DICOM file, its pixels are mapped to 8g by left shifting the pixels by (n-8), where n is the bit depth of the image. For example, if the image has 12 bits per pixel, its pixels will be left shifted by 4 bits, so the 8 most significant bits of the 12-bit pixel will be used. This mapping is done only for image display, and does not affect the image stored in memory.
When ImageGear loads a DICOM image, it creates a 16-bit to 8-bit, or 8-bit to 8-bit display Look Up Table (16x8 LUT or 8x8 LUT), and attaches it to the image. This LUT gives more flexibility in displaying medical images, allowing the display of a certain range of pixel intensities with the best contrast.
DICOM image files may contain several Look Up Tables that describe how the image shall be displayed. "Modality" LUT specifies transform of image pixels into modality meaningful values, such as optical density or Hounsfield Units. "Value of Interest" LUT (VOI LUT) specifies what range of pixel intensities should be shown on the screen. Most often, both these LUTs are linear, and thus are presented by a pair of values that are similar to brightness and contrast. For Modality LUT, these are Rescale Intercept (0028, 1053) and Rescale Slope (0028, 1053). For VOI LUT, these are Window Center (0028, 1050) and Window Width (0028, 1051). The standard also allows the usage of non-linear LUTs. These LUTs are represented as an array of values that map source image intensities to the output range.
If all of these values are found in the file, they are all used to build the 16x8 LUT. If Rescale values are not found, default values (Intercept = 0.0, Slope=1.0) are substituted. If VOI LUT values are not found, the image is scanned for min and max pixel intensities, and the LUT is built to display the min intensity as black and max intensity as white. The values between min and max are linearly scaled between black and white.
Grayscale LUTs can be attached to IGPage Object or to IGPageDisplay Object. In the latter case, if there are multiple IGPageDisplay objects corresponding to the same IGPage, they can have different LUTs, allowing the display of the same image with different contrast settings simultaneously, in different windows.
Use methods of IGPage Object and IGPageDisplay Object to access the LUTs attached to them. Use IGMedCtl Control.BuildGrayscaleLUT Method, together with methods and properties of IGMedContrast Object, to build grayscale LUTs according to DICOM display settings.
Grayscale LUTs (16x8, 8x8) only work with grayscale images. They do not work with bitonal, indexed (paletted), or color images. |
The following table lists display methods of the Medical Component:
Feature | API Reference |
---|---|
Adjust 16x8 or 8x8 Display LUT |
IGMedDisplay Object.AdjustContrastFrom Method |
Control Pixel Padding | |
Create pseudocoloring LUTs |
This section provides information about the following: