TableLUT¶
-
MLModule
¶ genre LUT
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLLUTTools
definition MLLUTTools.def see also LUTPrimitive
,RampLUT
,LinearLUT
,LUTInfo
,LUTCurve
,ApplyLUT
,SoMLLUT
,SoLUTEditor
keywords lookup
,sampling
,point
Purpose¶
The module TableLUT
generates a lookup table (LUT) object from a table of sampling points (as a string), each consisting of an index value and up to four channel values.
Different methods for the interpolation of the LUT entry values between the sampling points are available.
Usage¶
Specify a list of LUT sampling points in the Sampling Points
field, press Apply and connect the outLUT output field to a SoMLLUT
module to use the LUT in a 2D/3D viewer, or to an ApplyLUT
module to apply the LUT to an ML image.
Details¶
Table Format¶
The sampling points table consists of at least two sampling points separated by newline, comma, forward or backslash characters. The values for each sampling point entry are separated by spaces. Each sampling point entry must consist of one index and one to four channel values. All sampling point entries must contain the same number of values. The sampling points must be sorted in increasing index value order.
Visual Type¶
The visual type of the output LUT depends on the number of channel entry values specified for each sampling point:
Channels | Visual Type | Description |
---|---|---|
1 | L | Single luminance channel |
2 | LA | Luminance and alpha channels |
3 | RGB | Red, green and blue channels |
4 | RGBA | Red, green, blue and alpha channels |
Interpolation¶
If Color Interpolation
is set to Constant, the intervals between two sampling points are filled by repeating the values at the lower interval bounds. In the other interpolation modes, a linear interpolation is performed for the luminance and alpha 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.
Parameter Fields¶
Field Index¶
Color Interpolation : Enum |
Index Range Reference : Enum |
Max Value : Double |
Min Value : Double |
Sampling Points : String |
Status : String |
Valid : Bool |
Visible Fields¶
Index Range Reference¶
-
name:
indexRangeReference
, type:
Enum
, default:
RelativeTo01
¶ Defines whether the generated LUT is absolute or relative and how the index values specified in the sampling points table are related to the LUT index range.
Values:
Title | Name | Description |
---|---|---|
Absolute | Absolute | The LUT is absolute and defined for the index range as specified in the sampling points table. |
Relative To [0,1] | RelativeTo01 | The LUT is relative and defined for the index range [0, 1]. The function defined by the sampling points table is restricted to the interval [0, 1], the part of the function outside of this interval is ignored. |
Relative To Table Range | RelativeToTableRange | The LUT is relative and defined for the index range [0, 1]. The index value range specified in the sampling points table is mapped to the interval [0, 1]. |
Sampling Points¶
-
name:
samplingPoints
, type:
String
, default:
0 0 0 0 1, 1 1 1 1 1,
¶ Sets the sampling points as a string.
Color Interpolation¶
-
name:
colorInterpolation
, type:
Enum
, default:
RGB
¶ Defines how the interpolation of the LUT values between two consecutive sampling points takes place.
For luminance and alpha channels, the RGB and HLS interpolations are identical.
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. |