ApplyModalityLUT2 Method (ILEADRasterProcess)

Visual Basic example

Visual C++ example

 

Syntax

short ApplyModalityLUT2 (LPDispatch pRaster, VARIANT Data, long lFirstStoredPixelValueMapped, ModalityLUTConstants Flags);

Overview

Refer to Examining and Altering Bitmaps.

Remarks

Remaps the bitmap pixels through a lookup-table (LUT). In DICOM, this is referred to as "applying a non-linear Modality LUT".

This method is similar to the RemapIntensity because it remaps the bitmap pixel values through a LUT. The method is different than RemapIntensity in that:

1.

It allows you to specify an incomplete LUT. Values less than the first mapped index will go to the first entry in the palette. Values higher than "first mapped index" + "LUT length" will go to the last entry in the LUT.

2.

It only works on grayscale bitmaps. Calling this method for non-grayscale bitmaps will return an error

3.

It can create signed bitmaps. The output bitmap will be signed (if UT_SIGNED is set), or unsigned (LUT_SIGNED is not set).

The values in the LUT will be masked so only the useful bits in the bitmap are considered. The values are considered as if the bitmap pixel values are normalized so LowBit = 0.

If the bitmap is unsigned, the indexes are unsigned. The indexes are between 0..65535.

It’s recommended to always set the LUT_UPDATE_MIN_MAX flag.

This method is helpful in applying what is referred to as a "Non-Linear Modality LUT" in the DICOM world. According to the DICOM standard a "Modality LUT" defines the transformation of manufacturer-dependent pixel values into pixel values, which are manufacturer independent (e.g. Hounsfield units for CT, Optical Density for film digitizers, etc.).

This function supports signed data images.

See Also

Elements:

RemapIntensity method, ApplyLinearModalityLUT method, ApplyVOILUT method, ApplyLinearVOILUT method

Topics:

Raster Image Functions: Modifying Intensity Values

 

Changing Brightness and Contrast