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

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

Usage

Add this module to your Inventor scene before the object 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 which 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 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

Visible Fields

Apply

name: on, type: Bool, default: TRUE

Enable this flag to really apply the LUT to your image.

Compute LUT Anew

name: computeLUTAnew, type: Trigger

If pressed, the LUT is computed anew on base of the input image’s DICOM tags.

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

Compute LUT on each image change

name: shouldComputeLUTOnEachImageChange, type: Bool, default: FALSE

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

Use relative LUT if no input image

name: useRelativeIfNoInputImage, type: Bool, default: TRUE

If checked, the module uses a relative LUT in [0..1] if no input image is attached.

If there was an input image attached and the module used an absolute LUT and the image is detached while this flag is checked, the module uses the same LUT as before just in relative bounds.

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.

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

Enable this to allow to interactively change the ramp lut by dragging the mouse.

Button1

name: mouseButton1, type: Enum, default: IGNORED

Defines if 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 if 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 if 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 if 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 if 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 if the Alt key must be pressed for dragging.

Values:

Title Name
Pressed PRESSED
Released RELEASED
Ignored IGNORED

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.

useManagedInteraction

name: useManagedInteraction, type: Bool, default: FALSE

Use Managed Interaction 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.