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 methods to manipulate the "Modality LUT". DicomDataSet.GetModalityLutAttributes and DicomDataSet.SetModalityLut can be used to retrieve and update the values of the elements that describe a "Modality LUT" respectively. The properties defined by the class DicomModalityLutAttributes describe all the attributes related to a "Modality LUT ". If the transformation defined by the LUT is linear then DicomModalityLutAttributes.IsRescaleSlopeIntercept is set to true and DicomModalityLutAttributes.RescaleIntercept and DicomModalityLutAttributes.RescaleSlope hold the values for "Rescale Intercept" (0028,1052) and "Rescale Slope" (0028,1053), respectively. DicomModalityLutAttributes.IsModalityLutSequence is set to true if the transformation is non-linear and DicomModalityLutAttributes.NumberOfEntries, DicomModalityLutAttributes.FirstStoredPixelValueMapped, and DicomModalityLutAttributes.EntryBits hold the values of the "LUT Descriptor" (0028,3002). To get the "LUT Data" (0028,3006) under the "Modality LUT Sequence" (0028,3000) use DicomDataSet.GetModalityLutData.To remove the "Modality LUT " from a DICOM Data Set call DicomDataSet.DeleteModalityLut.
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 methods and properties to manipulate the "VOI LUT". The DicomDataSet.GetWindowCount property can be used to obtain the number of values under the window center element, while DicomDataSet.VoiLutCount can be used to obtain the number of items under the "VOI LUT Sequence" (0028,3010). Use DicomDataSet.GetWindow and DicomDataSet.SetWindow 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 DicomDataSet.DeleteWindow.
If the "VOI LUT" is non-linear, you can call DicomDataSet.GetVoiLut to get the format of the "LUT Data" under the "VOI LUT Sequence" and call DicomDataSet.GetVoiLutData to get the table data ("LUT Data") itself. To set the "LUT Data" use DicomDataSet.SetVoiLut 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 DicomDataSet.DeleteVoiLut.
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 methods to manipulate a "Palette Color Table". You can call DicomDataSet.GetPaletteColorLutAttributes to retrieve the attributes that describe a "Palette Color Lookup Table" and DicomDataSet.SetPaletteColorLutAttributes to set them. DicomDataSet.GetPaletteColorLutData can be used to get the table entries under "Red", " Green" or "Blue" "Palette Color Lookup Table Data", while DicomDataSet.SetPaletteColorLutData can be used to set them. To remove the "Palette Color Lookup" tables from a DICOM Data Set call DicomDataSet.DeletePaletteColorLut.
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries