Purpose

The module DicomLUT generates a lookup table (LUT) object from the DICOM tags of the input image.

The generated LUT is a composition of multiple lookups, optionally including the DICOM Modality LUT, a DICOM VOI (volume of interest) LUT, a differential window transformation (shift/stretch) applied to the VOI LUT, and an additional LUT provided at the inLUT input field of this module.

Usage

Connect a DICOM image to the module’s image input and select the DICOM LUT components to be evaluated.

Optionally connect an additional LUT object to the module’s LUT input.

Details

A DICOM image may define the following lookup tables to be applied to the image data:

  • The Modality LUT mapping the stored voxel values to the so-called output voxel values (e.g. in Hounsfield units for CT data). The modality LUT is either defined as a linear mapping by the Rescale Slope and Rescale Intercept tags, or by a data table in the Modality LUT Sequence.
  • One ore more VOI LUTs mapping the output voxel values to the visible gray value range. This mapping can be a ramp or a sigmoid function defined by the Window Center and Window Width tags, or an arbitrary table stored in the VOI LUT Sequence.
  • Presentation LUTs are currently not supported.

The VOI LUT Function tag defines how to calculate the lookup table based on the Window Center and Window Width tag values. Allowed values for the VOI LUT Function tag are LINEAR, LINEAR_EXACT and SIGMOID. LINEAR_EXACT has been added to the DICOM standard in 2012. There are two ways to calculate the linear lookup table:

[1] y = ((x - c) / w + 0.5) * (ymax - ymin) + ymin

[2] y = ((x - (c - 0.5)) / (w-1) + 0.5) * (ymax - ymin) + ymin

The behavior of the DicomLUT module has been changed with MeVisLab version 3.2.1.

Older module versions do not know the VOI LUT Function type LINEAR_EXACT and use calculation [1] for the VOI LUT Function LINEAR.

DicomLUT modules of version 3.2.1 or later can either use calculation [1] or [2] for the VOI LUT Function LINEAR. If the hidden flag useCorrectDicomLinearLutInterpretation is set to True formula [2] is used, otherwise formula [1]. The legacy value for this flag is False ensuring that the behavior of existing networks is not changed. For the VOI LUT Function LINEAR_EXACT formula [1] is used independent of the flag.

The field values of Window Center and Window Width are always interpreted as LINEAR_EXACT. If you want to write the related DICOM tree into a file, those values have to be adapted to match the real VOI LUT Function.

The output pixel value range to which the VOI LUT is applied can be modified by a differential window transformation, specified by the Window Shift and Window Stretch fields. The window shift value shifts the output pixel value range by a positive or negative offset, the window stretch value expands or reduces the range by a relative factor.

The DICOM Modality LUT and/or one of the VOI LUTs can optionally be composed with an additional LUT provided at the module’s LUT input field. The output values of the Modality LUT have an absolute reference and can hence be used as input values to an absolute LUT (i.e. a LUT with an absolute index range). The output values of a VOI LUT are only defined relative to the visible gray value range, hence the mapping to the index range of an absolute LUT would be undefined. As a consequence, the composition of a VOI LUT with an additional, absolute LUT provided at the module’s LUT input field results in an invalid output.

A modality LUT (either linear or non-linear) stored with an XA (X-Ray Angiography) or XRF (Radio Fluoroscopy) DICOM image is ignored by the DicomLUT module, as the modality LUT has special semantics in these types of images.

See LUT Functions for general information about ML lookup tables.

Windows

Default Panel

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

Input Fields

input0

name: input0, type: Image

A DICOM image can be connected to the module’s image input.

If no image is connected, or if the image has no DICOM tags defining a Modality or VOI LUT, default LUTs are assumed.

inLUT

name: inLUT, type: LUTFunction(MLBase)

A lookup table (LUTFunction) object can be connected to the module’s inLUT input field as an additional lookup table to be composed with the selected DICOM LUTs.

Output Fields

outLUT

name: outLUT, type: LUTFunction(MLBase)

The lookup table generated by this module is presented as a LUTFunction object at the outLUT field.

Parameter Fields

Visible Fields

Stored Min

name: storedMin, type: Double, persistent: no

Show the minimum value of the stored LUT value.

Max (storedMax)

name: storedMax, type: Double, persistent: no

Show the maximum value of the stored LUT value.

Output Min

name: outputMin, type: Double, persistent: no

Show the minimum output value (after rescaling).

Max (outputMax)

name: outputMax, type: Double, persistent: no

Show the maximum output value (after rescaling).

Type (modalityLutType)

name: modalityLutType, type: Enum, persistent: no

Defines the type of the modality LUT.

Values:

Title Name Description
Undefined Undefined No modality LUT is defined.
Linear Linear The modality LUT is defined as a linear rescaling with the Rescale Slope and Intercept as given below.
Non Linear NonLinear The modality LUT is defined as a discrete data table.

Rescale Slope

name: rescaleSlope, type: Double, persistent: no

Sets the slope value for transforming the stored value to the output value.

outputValue = storedValue * slope + intercept

Intercept

name: rescaleIntercept, type: Double, persistent: no

Sets the interscept value for transforming the stored value to the output value.

outputValue = storedValue * slope + intercept

Voi Luts Available

name: voiLutsAvailable, type: Integer, persistent: no

Shows the number of available LUT indices.

VOI LUT Index

name: voiLutIndex, type: Integer, default: -1, minimum: 0, maximum: -1

Sets the current VOI LUT index.

Description

name: voiLutDescription, type: String, persistent: no

Shows a descriptive string about the current VOI LUT.

Type (voiLutType)

name: voiLutType, type: Enum, persistent: no

Defines the type of the current VOI LUT.

Values:

Title Name Description
Undefined Undefined No VOI LUT is defined.
Linear Linear The VOI LUT is defined as a ramp function with the Window Center and Window Width values.
Sigmoid Sigmoid The VOI LUT is defined as a sigmoid function with the Window Center and Window Width values.
Non Linear NonLinear The VOI LUT is defined as a discrete data table.
Linear Exact Linear_Exact The VOI LUT is defined as a ramp function with the Window Center and Window Width values.

Window Center

name: windowCenter, type: Double, persistent: no

Sets the position of the VOI LUT function.

Window Width

name: windowWidth, type: Double, persistent: no

Sets the width of the VOI LUT function.

DICOM LUT

name: dicomLUT, type: Enum, default: ModalityVOILUT

Defines the DICOM LUTs included in the composition of the output LUT.

Values:

Title Name Description
None None No DICOM LUT is used, the output LUT is identical to the additional input LUT (if connected) or represents a default ramp LUT.
Modality LUT ModalityLUT The output LUT represents the DICOM Modality LUT, optionally composed with the additional input LUT.
VOI LUT VOILUT The output LUT represents the DICOM VOI LUT selected by the VOI LUT Index field, optionally composed with the additional input LUT.
Modality & VOI LUT ModalityVOILUT The output LUT represents the composition of the DICOM Modality LUT with the VOI LUT selected by the VOI LUT Index field. The result is optionally composed with the additional input LUT.

Window Shift

name: windowShift, type: Double, default: 0, minimum: :field:`minWindowShift`, maximum: :field:`maxWindowShift`

Sets a shift value for the output pixel value range to which the VOI LUT is applied by a positive or negative offset.

Window Stretch

name: windowStretch, type: Double, default: 1, minimum: 0, maximum: 5

Sets a value to extend or to reduce the output pixel value range to which the VOI LUT is applied by a relative factor.

Reset Window

name: resetWindow, type: Trigger

If pressed, the Window Shift is set to 0 and the Window Stretch is set to 1.

Output LUT valid

name: outLutValid, type: Bool, persistent: no

Shows whether the output LUT is valid.

Hidden Fields

voiLutDescriptionList

name: voiLutDescriptionList, type: String, persistent: no

List of VOI LUT descriptions, separated by “\”.

minWindowShift

name: minWindowShift, type: Double, persistent: no

maxWindowShift

name: maxWindowShift, type: Double, persistent: no

useCorrectDicomLinearLutInterpretation

name: useCorrectDicomLinearLutInterpretation, type: Bool, default: TRUE

Flag to determine that the window center shall be reduced by 0.5 and the window width by 1.0 which leads to the DICOM conform calculation for linear LUTs. This is only relevant when the VOI LUT Function tag is set to LINEAR.

legacyValue: False