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, 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 a color value or as an alpha value of a node. The module can handle single-channel, RGB, and RGBA input images. The mapping of channels to attributes depends on the combination of input image type and 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 values, 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, trilinear 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 if the image values do not range within the interval [0, …, 1]. For example, if the image values range within [0, …, 255], set the corresponding ScaleValue to 255.
If only color or alpha is modified, the remaining channels of the nodes remain untouched. This allows for the assignment of color and alpha attributes individually, using different input images.
Ensure that the SoWEMRenderer
rendering the modified WEM is set to display either the LUT values (attach a LUT module as well) or the nodes’ colors.
Input Fields¶
The module takes a WEM and an ML image as inputs.
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¶
Field Index¶
Alpha Scale Value : Float |
Label : String |
setAlphaValue : Bool |
Apply : Trigger |
listenToFinishNotifications : Bool |
setColorValue : Bool |
Auto Apply : Bool |
listenToRepaintNotifications : Bool |
setLutValue : Bool |
Clear : Trigger |
listenToSelectionChangedNotifications : Bool |
shouldComputeNormals : Bool |
Color Scale Value : Float |
Outside alpha : Float |
triangulationMode : Enum |
Custom Value List : String |
Outside color : Color |
Update Mode : Enum |
Description : String |
Outside value : Double |
Use default value list (LUT) : Bool |
elapsedTime : Float |
Overwrite label and description : Bool |
Use interpolation (not implemented for RGB or RGBA images) : Bool |
id : Integer |
progress : Float |
workDirectlyOnInputWEMs : Bool |
isProcessing : Bool |
Set values for outside nodes : Bool |
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
¶ When pressed, the module computes a new output WEM.
see also WEMGenerator.apply
Clear¶
-
name:
clear
, type:
Trigger
¶ When 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
andDescription
.
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 which all R, G, and B components are divided to bring the R, G, and 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 which the alpha component is divided to bring 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 uses a trilinear image value interpolation.
Set values for outside nodes¶
-
name:
setDefaultForOutsideNodes
, type:
Bool
, default:
FALSE
¶ If checked, the
Outside value
is set for nodes that lie outside the ML image; otherwise, the values of outside nodes remain unchanged.This option works for setting LUT values as well as for setting node colors (in this case, the
Outside color
is set) or alpha values (in this case, theOutside 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; otherwise, a new PVL is generated and written to using the name provided in the
Custom Value List
.