Purpose

The module ApplyLUT applies a lookup table (LUT) to an input image.

The voxel values of the input image are used as LUT index values, the LUT entry values are rescaled relative to the Max Entry parameter and stored in the output image.

Usage

Connect a source image to the module’s input image field and a lookup table object to the LUT input field. Specify the maximum entry used for the output image. The LUT entry values are rescaled to the interval [0..Max Entry].

A multi-channel LUT and/or a multi-channel input image are handled as follows:
  • If the input LUT consists of a single channel and the option Replicate single channel LUT is enabled, the LUT is applied to all channels of the input image independently. The channels of the output image correspond to the input image channels.
  • In all other cases, the first channel of the input image is used to obtain the index values for the lookup table. The remaining input image channels are ignored. The output image channels correspond to the channels of the lookup table.

Details

Max Entry values larger than 65535 and non-integer input images or images with a voxel value range not representable by 16 bit are not supported.

See LUT Functions for general information about ML lookup tables.

Tips

The example network shows how a linear LUT is displayed in a diagram and applied to a gray wedge test pattern. The data type and value range of the output image is controlled by the Max Entry parameter of the ApplyLUT module.

Windows

Default Panel

../../../Modules/ML/MLLUTTools/mhelp/Images/Screenshots/ApplyLUT._default.png

Input Fields

The source image, which must be of integer type with a voxel value range representable by 16 bit, is connected to the image input field. The lookup table (a LUTFunction object) is connected to the inLUT field.

input0

name: input0, type: Image

The input image. NOTE: Floating point input images get mapped to a lookup table of 12-bit width, scaling the input min/max range to the 12-bit range of that table.

inLUT

name: inLUT, type: LUTFunction(MLBase)

The input ml::LUTFunction that is applied.

Output Fields

output0

name: output0, type: Image

The resulting output image is presented at the output image field. The data type of the output image is derived implicitly from the specified Max Entry:

Range Output Datatype
0 < Max Entry <= 1 float
1 < Max Entry <= 255 uint8
255 < Max Entry <= 65535 uint16

Parameter Fields

Visible Fields

Max Entry

name: maxEntry, type: Double, default: 255, minimum: 0, maximum: 65535

Sets the maximum image voxel value stored in the output image.

The LUT entry values are rescaled to the interval [0 … Max Entry].

Replicate single channel LUT

name: replicateSingleChannelLUT, type: Bool, default: FALSE

If checked and if the LUT consists of a single channel, it is applied to all input image channels independently.