InteractiveRampLUT

MacroModule

genre

View2D

author

MeVis Medical Solutions AG

package

MeVisLab/Standard

definition

viewers.def

see also

SoView2D, View2DExtensions, RampLUT, SoMouseGrabber

keywords

ramp, lut, interactive, mouse

Purpose

The module InteractiveRampLUT combines a RampLUT module with mouse interaction (performed with SoMouseGrabber) to achieve an interactively modifiable ramp LUT.

Usage

Add this module to your Open Inventor scene before the object where the LUT should be applied to. If required, adapt the mouse button configuration.

Windows

Default Panel

../../../Modules/Macros/Viewers/mhelp/Images/Screenshots/InteractiveRampLUT._default.png

Input Fields

input0

name: input0, type: Image

Connect the image that provides the minimum and maximum values of the image to display (so the correct LUT values can be selected).

Output Fields

nodeOut

name: nodeOut, type: SoNode

Connect this to your Open Inventor scene to get the interaction on the LUT and to apply the LUT in one go.

outInteraction

name: outInteraction, type: SoNode

This output provides only the interaction on the LUT, but does not apply the LUT.

outBaseLUT

name: outBaseLUT, type: LUTFunction(MLBase)

The current LUT as a separate Base object.

Parameter Fields

Field Index

alphaCenterRescaled: Double

centerRescaled: Double

Relative: Bool

alphaFactor: Double

colorFactor: Color

Scale current LUT to new image: Bool

alphaWidthRescaled: Double

Compute LUT Anew: Trigger

Shift: Enum

Alt: Enum

Compute LUT on each image change: Bool

startColor: Color

Apply: Bool

Compute LUT on initialization: Bool

Synchronize Gray and Alpha: Bool

Button1: Enum

Control: Enum

Use Managed Interaction: Bool

Button2: Enum

Enable: Bool

Width (width): Double

Button3: Enum

endColor: Color

Width (alphaWidth): Double

Center (center): Double

Max Value: Double

widthRescaled: Double

Center (alphaCenter): Double

Min Value: Double

Visible Fields

Apply

name: on, type: Bool, default: TRUE

If checked, the LUT is applied to the image.

Compute LUT Anew

name: computeLUTAnew, type: Trigger

When pressed, the LUT is computed anew based on the input image’s DICOM tags.

The DICOM tags used to compute the LUT are: WindowCenter, WindowWidth, SlopeIntercept, and SlopeRescale.

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, the image values are used as index values directly without rescaling.

Synchronize Gray and Alpha

name: alphaSync, type: Bool, default: TRUE

If checked, the values for the alpha value ramp always follow the values for the gray value ramp.

Min Value

name: imageMinValue, type: Double, persistent: no

Shows the input image’s minimum value (or 0 if no image is attached).

Max Value

name: imageMaxValue, type: Double, persistent: no

Shows the input image’s maximum value (or 1 if no image is attached).

Center (center)

name: center, type: Double, default: 0.5

Sets the center index value of the ramp, either as an absolute image value or relative to [0..1].

Width (width)

name: width, type: Double, default: 0.5

Sets the width value of the ramp, either as an absolute image value range or relative to [0..1].

Center (alphaCenter)

name: alphaCenter, type: Double, default: 0.5

Sets the center index value of the ramp, either as an absolute image value or relative to [0..1].

Width (alphaWidth)

name: alphaWidth, type: Double, default: 0.5

Sets the width value of the ramp, either as an absolute image value range or relative to [0..1].

Enable

name: mouseOn, type: Bool, default: TRUE

If checked, the interactive changing of the ramp LUT by dragging the mouse is enabled.

Button1

name: mouseButton1, type: Enum, default: IGNORED

Defines whether mouse button 1 (left mouse button) must be pressed for dragging.

Values:

Title

Name

​Pressed

​PRESSED

​Released

​RELEASED

​Ignored

​IGNORED

Button2

name: mouseButton2, type: Enum, default: IGNORED

Defines whether mouse button 2 (middle mouse button) must be pressed for dragging.

Values:

Title

Name

​Pressed

​PRESSED

​Released

​RELEASED

​Ignored

​IGNORED

Button3

name: mouseButton3, type: Enum, default: PRESSED

Defines whether mouse button 3 (right mouse button) must be pressed for dragging.

Values:

Title

Name

​Pressed

​PRESSED

​Released

​RELEASED

​Ignored

​IGNORED

Shift

name: mouseShift, type: Enum, default: RELEASED

Defines whether the Shift key must be pressed for dragging.

Values:

Title

Name

​Pressed

​PRESSED

​Released

​RELEASED

​Ignored

​IGNORED

Control

name: mouseCtrl, type: Enum, default: RELEASED

Defines whether the Control key must be pressed for dragging.

Values:

Title

Name

​Pressed

​PRESSED

​Released

​RELEASED

​Ignored

​IGNORED

Alt

name: mouseAlt, type: Enum, default: RELEASED

Defines whether the Alt key must be pressed for dragging.

Values:

Title

Name

​Pressed

​PRESSED

​Released

​RELEASED

​Ignored

​IGNORED

Compute LUT on initialization

name: shouldComputeLUTOnInitialization, type: Bool, default: TRUE

If checked, the module computes the LUT automatically based on the input image on initialization, i.e., after a saved network has been loaded. Otherwise, the stored LUT values (center, width) are used.

Compute LUT on each image change

name: shouldComputeLUTOnEachImageChange, type: Bool, default: TRUE

If checked, the module computes a default LUT on each update of the input image.

Scale current LUT to new image

name: scaleLUTForNewImage, type: Bool, default: TRUE, deprecated name: useRelativeIfNoInputImage

If checked, the scale of the current LUT is applied to any newly connected image.

In other words, if the LUT is defined using absolute values, its relative appearance remains unchanged when the input image changes.

If the input image is disconnected temporarily, the previous scaling is stored and reapplied once a new image is connected.

Keep this option unchecked if you want to use the same absolute LUT for different images. Otherwise, on disconnecting the input image, a relative LUT is computed and on connecting a different image, this relative LUT is used to compute the next absolute LUT. This results in having always the same appearance for images with a different image value range.

If a relative LUT is used by checking Relative, this setting has no effect and is therefore disabled in the GUI.

If checked, Compute LUT on each image change would overwrite the new LUT, so it is also disabled in the GUI.

Use Managed Interaction

name: useManagedInteraction, type: Bool, default: FALSE

If checked, Managed Interaction is used for the mouse interaction.

This is useful if the rest of the interaction in the scene also uses Managed Interaction, since otherwise, there might overlapping interactions.

Hidden Fields

startColor

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

endColor

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

centerRescaled

name: centerRescaled, type: Double, default: 0.5, minimum: lutRescale.outputMin, maximum: lutRescale.outputMax

Center rescaled according to the DICOM tags RescaleIntercept and RescaleSlope.

widthRescaled

name: widthRescaled, type: Double, default: 0.5, minimum: lutRescale.outputRangeNeg, maximum: lutRescale.outputRange

Width rescaled according to the DICOM tags RescaleIntercept and RescaleSlope.

alphaCenterRescaled

name: alphaCenterRescaled, type: Double, default: 0.5, minimum: alphaRescale.outputMin, maximum: alphaRescale.outputMax

Center rescaled according to the DICOM tags RescaleIntercept and RescaleSlope.

alphaWidthRescaled

name: alphaWidthRescaled, type: Double, default: 0.5, minimum: alphaRescale.outputRangeNeg, maximum: alphaRescale.outputRange

Width rescaled according to the DICOM tags RescaleIntercept and RescaleSlope.

colorFactor

name: colorFactor, type: Color, default: 1 1 1

Sets a color factor applied to the LUT entry values.

alphaFactor

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

Sets an alpha factor applied to the LUT entry values.