ApplyModalityLUT Method (ILEADRasterProcess)

Visual Basic example

Visual C++ example

 

Syntax

short ApplyModalityLUT (LPDispatch pRaster, ILEADRasterVariant *Data, long lFirstStoredPixelValueMapped, ModalityLUTConstants Flags);

Overview

Refer to Examining and Altering Bitmaps.

Remarks

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

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

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 method supports 12 and 16-bit grayscale images. Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

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