WEMSurfaceDistance¶
-
MLModule
¶ genre WEMProcessing
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLWEMModules
definition MLWEMModules.def see also WEMImageData
,SoWEMRenderer
inherits from WEMProcessor
keywords measure
,minimal
Purpose¶
The module WEMSurfaceDistance
calculates the minimal distances of the nodes of one WEM to the nodes of another WEM.
These distances are stored in the nodes’ WEMPrimitiveValueList entries of the output WEM for a later LUT coloring or for further analysis.
Usage¶
Connect to WEM surfaces into the module’s inputs and connect the output to a renderer. Use the Min. Dist.
and Max. Dist.
values of the statistics section for LUT range adjustment.
Details¶
The nodes’ positions of the first input WEM are stored internally in a spherical space tree, which is build in O(n*log(n)), with n being the number of nodes. Then, this space tree is used to find the minimum distances to all node of the second input WEM. These obtained distances are stored in the according WEMPrimitiveValueList of the nodes of the output WEM.
Note that distances may be negative; if so, the second surface is under the first one, regarding the surface normal direction.
The module also outputs the positions of the nodes with the overall minimal distance.
The module produces three WEMPrimitiveValueLists: LUT, LUT Perpendicular and LUT Tangential.
- In LUT the closest distance of a node to another node of the other WEM is stored.
- In LUT Perpendicular the distance vector is projected onto the node’s normal; this gives a measure of how close the node of the other WEM is in that node’s normal direction.
- In LUT Tangential the distance is biased by a sideway shift; the distance value is larger if the corresponding closest node lies closer to the tangential plane of a node.
In the image above, all other nodes that lie on the sphere d have the same (unsigned) distance to the node N; this distance is stored in LUT. The node A lies in normal direction, thus the value in LUT Perpendicular is the same as the LUT value; the LUT Perpendicular value for node B is 0. For LUT Tangential, the distance to A is zero distance while the distance to node B is the actual distance.
Input Fields¶
inWEM¶
-
name:
inWEM
, type:
WEM(MLBase)
¶ A WEM surface for measuring the minimal distances to another WEM surface. This input WEM will be the copied to the output and the LUT values will be filled with the minimal distances.
For accessing this object via scripting see the Scripting Reference:MLWEMWrapper
.
inWEM2¶
-
name:
inWEM2
, type:
WEM(MLBase)
¶ A WEM surface for measuring the minimal distances to another WEM surface.
For accessing this object via scripting see the Scripting Reference:MLWEMWrapper
.
Output Fields¶
outWEM¶
-
name:
outWEM
, type:
WEM(MLBase)
¶ The output is the first of the input WEMs, of which the lutValue variable are modified to reflect the according node’s minimal distance to the surface of the second WEM.
For accessing this object via scripting see the Scripting Reference:MLWEMWrapper
.
Parameter Fields¶
Field Index¶
addEdgesToNearestNodes : Bool |
isProcessing : Bool |
numEntries : Integer |
Apply : Trigger |
Label : String |
Overwrite label and description : Bool |
Auto Apply : Bool |
listenToFinishNotifications : Bool |
progress : Float |
Clear : Trigger |
listenToRepaintNotifications : Bool |
relativeError : Float |
Compute signed distances : Bool |
listenToSelectionChangedNotifications : Bool |
shouldComputeNormals : Bool |
Custom Value List : String |
Max. Dist. : Float |
Start Pos. : Vector3 |
Description : String |
Max. Norm. : Float |
triangulationMode : Enum |
elapsedTime : Float |
Min. Dist. : Float |
Update Mode : Enum |
End Pos. : Vector3 |
Min. Norm. : Float |
Use default value list : Bool |
id : Integer |
Normalize distances : Bool |
workDirectlyOnInputWEMs : Bool |
Visible Fields¶
Auto Apply¶
-
name:
autoApply
, type:
Bool
, default:
TRUE
¶ If checked, the output WEM is computed anew on any parameter field 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 output WEM is computed anew.
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
Compute signed distances¶
-
name:
shouldComputeSignedDistances
, type:
Bool
, default:
FALSE
¶ If checked, the distances are signed, reflecting the spacial configuration of the surfaces (below / over). If unchecked, only the distances’ magnitudes are stored in the nodes’ WEMPrimitiveValueList.
Min. Dist.¶
-
name:
minimumDistance
, type:
Float
, persistent:
no
¶ Shows the minimum minimal distances of nodes of the two input WEMs.
Max. Dist.¶
-
name:
maximumDistance
, type:
Float
, persistent:
no
¶ Shows the maximum minimal distances of nodes of the two input WEMs.
Min. Norm.¶
-
name:
minNormDist
, type:
Float
, persistent:
no
¶ Shows the normalized minimum minimal distances of nodes of the two input WEMs.
Max. Norm.¶
-
name:
maxNormDist
, type:
Float
, persistent:
no
¶ Shows the normalized maximum minimal distances of nodes of the two input WEMs.
Normalize distances¶
-
name:
shouldNormalizeDist
, type:
Bool
, default:
FALSE
¶ If checked, all distances range in [0..1] or in [-1..1] (if signed distances are used), where 1 denotes the largest minimal distance. This option is useful if always the same (relative) LUT should be used.
Start Pos.¶
-
name:
startPosition
, type:
Vector3
, persistent:
no
¶ Shows the position of the node of the first WEM with the overall minimum distance.
End Pos.¶
-
name:
endPosition
, type:
Vector3
, persistent:
no
¶ Shows the position of the node of the second WEM with the overall minimum distance.