|
Available in LEADTOOLS Medical Imaging toolkits. |
LUT Encoding Overview
Modality LUT
A "Modality LUT " allows the transformation of manufacturer-dependent pixel values into manufacturer-independent pixel values (e.g. Hounsfield units for CT images). The "Modality LUT" may be contained within an image, a presentation state (that references an image), or as a "Standalone Modality LUT"(that references an image). The "Rescale Slope" (0028,1053) and "Rescale Intercept" (0028,1052) elements are used to describe the transformation when it is linear, while the "Modality LUT Sequence" (0028,3000) element is used to describe non-linear transformations. In both cases it is implied that the transformation can only occur for grayscale data, that is, images with "Photometric Interpretation" values of "MONOCHROME1" or "MONOCHROME2".
LEADTOOLS offers a number of functions to manipulate the "Modality LUT". L_DicomGetModalityLUTAttributes and L_DicomSetModalityLUT can be used to retrieve and update the values of the elements that describe a "Modality LUT". The data type DICOMMLUTATTRIBS describes all the attributes related to a "Modality LUT ". If the transformation defined by the LUT is linear then the "bIsRescaleSlopeIntercept" member of the structure will be set and "fRescaleIntercept" and "fRescaleSlope" will hold the values for "Rescale Intercept" (0028,1052) and "Rescale Slope" (0028,1053) respectively. The "bIsModalityLUTSequence" member will be set if the transformation is non-linear and "LUTDescriptor" will hold the values of the "LUT Descriptor" (0028,3002). To get the "LUT Data" (0028,3006) under the "Modality LUT Sequence" (0028,3000) use L_DicomGetModalityLUTData.To remove the "Modality LUT " from a DICOM dataset call L_DicomDeleteModalityLUT.
VOI LUT
A "VOI LUT" allows the transformation of the modality pixel values into pixel values that are meaningful for print or display. This transformation is applied after any "Modality LUT". The "VOI LUT" may be contained within an image, or a presentation state (that references an image), or as a "Standalone VOI LUT" (that references an image). "Window Center" (0028,1050) and "Window Width" (0028,1051) are used to describe the transformation when it’s linear, while the "VOI LUT Sequence" (0028,3010) is used to describe non-linear transformations. In both cases it is implied that the transformation can only occur for grayscale data (images with "Photometric Interpretation" values of "MONOCHROME1" and "MONOCHROME2"). If multiple values are present for the "Window Center" and "Window Width", both attributes shall have the same number of values and shall be considered as pairs. Multiple values indicate that multiple alternative views may be presented. If multiple items are present in VOI LUT Sequence (0028,3010), only one may be applied to the image for display. Multiple items indicate that multiple alternative views may be presented.
LEADTOOLS offers a number of functions to manipulate the "VOI LUT ". The L_DicomGetWindowCount function can be used to retrieve the number of values under the "Window Center" and "Window Width" elements, while L_DicomGetVOILUTCount can be used to retrieve the number of items under the "VOI LUT" sequence (0028,3010).Use L_DicomGetWindow and L_DicomSetWindow to retrieve and update the attributes that describe "Window Center" and "Window Width". If you want to delete all the elements related to a linear "VOI LUT" call L_DicomDeleteWindow.
If the "VOI LUT" is non-linear, you can call L_DicomGetVOILUT to get the format of the "LUT Data" under the "VOI LUT Sequence" and call L_DicomGetVOILUTData to get the table data ("LUT Data") itself. To set the "LUT Data" use L_DicomSetVOILUT which will set both the format of the data and the data itself. If you want to delete all the elements related to a non-linear "VOI LUT" call L_DicomDeleteVOILUT.
Palette Color Table
A "Palette Color Lookup Table" is used inside 8 and 16 bit color images where the pixel value is used as an index into each of the Red, Blue, and Green Palette
Color Lookup Tables (0028,1101-1103&1201-1203). The DICOM standard defines two types of tables: "Contiguous Palette Color Tables" where the data for each table is represented by a single contiguous stream and "Segmented Palette Color Tables" where the data is stored in each table as a series of segments. Both types are supported by LEADTOOLS.
LEADTOOLS offers a number of functions to manipulate a "Palette Color Table". You can call L_DicomGetPaletteColorLUTAttributes to retrieve the attributes that describe a "Palette Color Lookup Table" and L_DicomSetPaletteColorLUTAttributes to set them. L_DicomGetPaletteColorLUTData can be used to get the table entries under "Red"," Green" or "Blue" "Palette Color Lookup Table Data", while L_DicomSetPaletteColorLUTData can be used to set them.
To remove the "Palette Color Lookup" tables from a DICOM dataset call L_DicomDeletePaletteColorLUT.