WEMImageData

MLModule
genre WEMProcessing
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLWEMModules
definition MLWEMModules.def
see also SoWEMRenderer, WEMInfo
inherits from WEMProcessor
keywords read, out

Purpose

The module WEMImageData sets the image values of a connected ML image to the nodes of a WEM that lies within a connected ML-image.

The module can set either the nodes’ LUT values or the nodes’ color values, or both.

Usage

Connect a WEM and an ML image to the module.

Details

The module assigns image values to WEMNodes. Values may be assigned to either a PVL, as color value, or as alpha value of a node. The module can handle single channel-, RGB- and RGBA-input images. Which channels are mapped to which attribute depends on the combination of input images type and the mapping type.

For PVL values, the first channel is always used.

For node colors, the RGB channels are used, IF available. For single channel images, this channel is copied to the node’s R, G, and B value, resulting in shades of gray.

For alpha values, the first channel is always used UNLESS the input image is of type RGBA. In this case, the correct alpha-channel is used.

For single channel input images, tri-linear interpolation can be applied to the sampled values. This functionality is not implemented for RGB or RGBA images, and is ignored if such a type of image is attached (the first channel will not be interpolated in this case).

For color and alpha values, an additional scale factor can be applied. This is useful in case that the image values do not range within an interval of [0..1]. E.g. if the image values range within [0..255], set the according Scale Value to 255.

If only color or alpha is modified, the remaining channels of the nodes remain untouched. This allows to assign color and alpha attributes individually, using different input images.

Make sure that the SoWEMRenderer that renders the modified WEM is set to display either the LUT values (attach a LUT module as well), or is set to display the nodes’ colors.

Windows

Default Panel

../../../Modules/ML/MLWEMModules/mhelp/Images/Screenshots/WEMImageData._default.png

Input Fields

The module takes a WEM and an ML image as inputs.

input0

name: input0, type: Image

inWEM

name: inWEM, type: WEM(MLBase)
For accessing this object via scripting see the Scripting Reference: MLWEMWrapper.

Output Fields

The module’s output is a WEM where image values are set as colors or LUT values, or both.

outWEM

name: outWEM, type: WEM(MLBase)
For accessing this object via scripting see the Scripting Reference: MLWEMWrapper.

Parameter Fields

Visible Fields

Auto Apply

name: autoApply, type: Bool, default: TRUE

If checked, the module computes a new output WEM on every parameter change.

see also WEMGenerator.autoApply

Update Mode

name: updateMode, type: Enum, default: AutoUpdate, deprecated name: autoUpdate

Defines how this module should react on any input field change.

see also WEMGenerator.updateMode

Apply

name: apply, type: Trigger

If pressed, the module computes a new output WEM.

see also WEMGenerator.apply

Clear

name: clear, type: Trigger

If pressed, the output WEM is cleared (made empty).

see also WEMGenerator.clear

Overwrite label and description

name: overwriteLabelDescription, type: Bool, default: FALSE

If checked, label and description strings are set in the output WEM to Label and Description.

see also WEMGenerator.overwriteLabelDescription

Label

name: label, type: String

Sets a label string in the output WEM.

see also WEMGenerator.label

Description

name: description, type: String

Sets a description string in the output WEM.

see also WEMGenerator.description

Color Scale Value

name: colorScaleValue, type: Float, default: 1, minimum: 1

Sets a value by that all R,G and B components are divided in order to get the R,G,B values into the range [0..1].

The minimum value is 1.

Alpha Scale Value

name: alphaScaleValue, type: Float, default: 1, minimum: 1

Sets a value by that the alpha component is divided in order to get it into the range [0..1].

The minimum value is 1.

Use interpolation (not implemented for RGB or RGBA images)

name: useInterpolation, type: Bool, default: FALSE

If checked, the module use a trilinear image value interpolation.

Set values for outside nodes

name: setDefaultForOutsideNodes, type: Bool, default: FALSE

If checked, the Outside value is set to nodes that lie outside the ML image, otherwise, the values of outside nodes remain unchanged.

This option works for the setting of LUT values as well as for the setting of node colors (here, the Outside color is set) or alpha values (here, the Outside alpha is set) .

Outside value

name: defaultValue, type: Double, default: 0

Sets the default LUT value for nodes that lie outside the ML image.

Outside color

name: defaultColor, type: Color, default: 1 1 1

Sets the default color for nodes that lie outside the ML image.

Outside alpha

name: defaultAlpha, type: Float, default: 1

Sets the default alpha value for nodes that lie outside the ML image.

Use default value list (LUT)

name: useLUTPrimitiveValueList, type: Bool, default: TRUE

If checked, the image values are written into the default PVL named LUT, else a new PVL is generated and written into by the name provided in the Custom Value List.

Custom Value List

name: customPrimitiveValueList, type: String, default: Image Data

Sets a name for the PVL the image values are written into.

Hidden Fields

isProcessing

name: isProcessing, type: Bool, persistent: no

see WEMGenerator.isProcessing

elapsedTime

name: elapsedTime, type: Float, persistent: no

see WEMGenerator.elapsedTime

id

name: id, type: Integer, default: 0

see WEMGenerator.id

shouldComputeNormals

name: shouldComputeNormals, type: Bool, default: TRUE

see WEMGenerator.shouldComputeNormals

workDirectlyOnInputWEMs

name: workDirectlyOnInputWEMs, type: Bool, default: FALSE

see WEMProcessor.workDirectlyOnInputWEMs

listenToFinishNotifications

name: listenToFinishNotifications, type: Bool, default: TRUE

see WEMProcessor.listenToFinishNotifications

listenToRepaintNotifications

name: listenToRepaintNotifications, type: Bool, default: TRUE

see WEMProcessor.listenToRepaintNotifications

listenToSelectionChangedNotifications

name: listenToSelectionChangedNotifications, type: Bool, default: TRUE

see WEMProcessor.listenToSelectionChangedNotifications

progress

name: progress, type: Float, persistent: no

see WEMProcessor.progress

triangulationMode

name: triangulationMode, type: Enum, default: Strip

see WEMProcessor.triangulationMode

setLutValue

name: setLutValue, type: Bool, default: TRUE

If checked, the image values are written into the chosen PVL

setColorValue

name: setColorValue, type: Bool, default: FALSE

If checked, the color of the nodes is modified.

setAlphaValue

name: setAlphaValue, type: Bool, default: FALSE

If checked, the alpha value of the nodes is modified.