Purpose

The module LinearLUT generates a lookup table (LUT) object by interpolation between two specified entries.

The interpolation is performed in gray (luminance) or RGB values, with or without alpha channel. Color interpolation is performed in either RGB or HLS color space.

The generated LUT can be used with the ApplyLUT module or within 2D/3D viewers (in conjunction with SoMLLUT).

Details

A linear interpolation is performed for the luminance (L) and alpha (A) values. For color values, interpolation can be performed in either the RGB or the HLS color space. The HLS color space represents a color by its hue, arranged circular in the order red-yellow-green-cyan-blue-magenta-red, its lightness, and its saturation. With respect to the hue, the interpolation is performed either in positive or negative circular direction.

See LUT Functions for general information about ML lookup tables.

Windows

Default Panel

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

Output Fields

outLUT

name: outLUT, type: LUTFunction(MLBase)

Parameter Fields

Field Index

Color Interpolation: Enum Visual Type: Enum
End Alpha: Double  
End Color: Color  
Max: Double  
Min: Double  
Relative: Bool  
Start Alpha: Double  
Start Color: Color  

Visible Fields

Visual Type

name: visualType, type: Enum, default: RGBA

Defines the visual type of a LUT defines the number and visual interpretation of the LUT channels.

Values:

Title Name Description
L L Single luminance channel.
La LA Luminance and alpha channels.
Rgb RGB Red, green and blue channels.
Rgba RGBA Red, green, blue and alpha channels.

Relative

name: relative, type: Bool, default: TRUE

If checked, the generated LUT is relative, i.e. the index value interval [0..1] is rescaled to the true image value range before applying the LUT.

If the LUT is absolute, on the other hand, the image values are used as index values directly, without rescaling.

Min

name: minIndex, type: Double, default: 0

Sets the index value associated with the start color and alpha values.

Max

name: maxIndex, type: Double, default: 1

Sets the index value associated with the end color and alpha values.

Start Color

name: startColor, type: Color, default: 0 0 0

Sets the color of the start of the interpolation.

End Color

name: endColor, type: Color, default: 1 1 1

Sets the color of the end of the interpolation.

Start Alpha

name: startAlpha, type: Double, default: 0, minimum: 0, maximum: 1

Sets the alpha value of the start of the interpolation.

End Alpha

name: endAlpha, type: Double, default: 1, minimum: 0, maximum: 1

Sets the alpha value of the end of the interpolation.

Color Interpolation

name: colorInterpolation, type: Enum, default: RGB

Defines the color space in which the interpolation takes place for an RGB or RGBA lookup table.

Values:

Title Name Description
Rgb RGB Interpolation is performed on red, green and blue values.
Hls HLS Interpolation is performed on hue (shortest circular distance), lightness and saturation values.
HLSpositive HLSpositive Interpolation is performed on hue (positive circular distance), lightness and saturation values.
HLSnegative HLSnegative Interpolation is performed on hue (negative circular distance), lightness and saturation values.
Constant Constant Interpolation is performed by replicating the LUT values of the next lower sampling point.
Srgb SRGB Interpolation is performed in the sRGB color space.