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.
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
¶ 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
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 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, 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, else a new PVL is generated and written into by the name provided in the
Custom Value List
.