ImageGear Professional for Windows ActiveX
Medical Component Grayscale Look Up Tables

The ImageGear Medical component provides a set of methods that allow you to create grayscale look up tables (LUTs) according to DICOM display attributes, such as VOI LUT, Modality LUT, Presentation LUT, etc.

Use the IGMedCtl Control.BuildGrayscaleLUT Method to build a grayscale LUT based on DICOM display settings. This function supports both linear and non-linear Modality and VOI LUTs, as well as the presentation state related LUTs.

Once you have built the LUT, you can copy it either to IGPage Object, or to IGPageDisplay Object using IGPage Object.UpdateGrayscaleLUTFrom Method or IGPageDisplay Object.UpdateGrayscaleLUTFrom Method.

When ImageGear loads a grayscale DICOM image, it builds a grayscale LUT and attaches it to the image. This LUT can be obtained with the IGPage Object.GetGrayscaleLUTCopy Method.

Example:

 
Copy Code
Dim MedContrast As IGMedContrast
Dim ModLUT As IIGLUT 
Dim GrayLUT As IIGLUT
` Create MedContrast object
Set MedContrast = IGMedCtl1.CreateObject(MED_OBJ_CONTRAST)
If (medPage.DataSetLUTExists(DCM_TAG_ModalityLUT)) Then
        Set ModLUT = medPage.GetDataSetLUTCopy(DCM_TAG_ModalityLUT)
        MedContrast.ModalityLUT.CopyFrom(ModLUT)
Else
        MedContrast.RescaleSlope = 1.0
        MedContrast.RescaleIntercept = 0.0
End If
MedContrast.WindowCenter = 1024
MedContrast.WindowWidth = 2048
` Build a grayscale LUT based on display settings 
Set GrayLUT = IGCoreCtl1.CreateObject(IG_OBJ_LUT)
GrayLUT.ChangeAttrs(16, True, 8, False)
IGMedCtrl1.BuildGrayscaleLUT(MedContrast, GrayLUT)
` Copy LUT to the image. 
IGPage.UpdateGrayscaleLUTFrom(GrayLUT)

See Also:

Grayscale Look Up Tables

Working with Grayscale Look-Up Tables

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback