WEMSurfaceDistance

MLModule
genre WEMProcessing
status stable
authors Bart De Dobbelaer, Olaf Konrad
package MeVisLab/Standard
dll MLWEMModules
definition MLWEMModules.def
see also WEMImageData, SoWEMRenderer

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' WEMPrimitveValueList 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.

Windows

Default Panel

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

Input Fields

inWEM

name: inWEM, type: 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.

inWEM2

name: inWEM2, type: MLBase

A WEM surface for measuring the minimal distances to another WEM surface.

Output Fields

outWEM

name: outWEM, type: 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.

Parameter Fields

Visible Fields

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.

Use default value list

name: useLUTPrimitiveValueList, type: Bool, default: TRUE

If checked, the default WEMPrimitiveValueList named LUT is used to store the minmial distances.

Custom Value List

name: customPrimitiveValueList, type: String, default: Surface Distance

Sets a name for a WEMPrimitiveValueList the values should be written into. If the named list does not exist yet, it is generated.

Hidden Fields

isProcessing

name: isProcessing, type: Bool, default: FALSE

elapsedTime

name: elapsedTime, type: Float, default: 0.001

id

name: id, type: Integer, default: 0

autoClear

name: autoClear, type: Bool, default: FALSE

removePreviousWEMs

name: removePreviousWEMs, type: Bool, default: TRUE

show

name: show, type: Bool, default: TRUE

editable

name: editable, type: Bool, default: TRUE

useFaceDiffuseColor

name: useFaceDiffuseColor, type: Bool, default: TRUE

usePolygonOffset

name: usePolygonOffset, type: Bool, default: FALSE

listenToFinishNotifications

name: listenToFinishNotifications, type: Bool, default: TRUE

forwardRepaintNotifications

name: forwardRepaintNotifications, type: Bool, default: TRUE

forwardSelectionNotifications

name: forwardSelectionNotifications, type: Bool, default: TRUE

progress

name: progress, type: Float, persistent: no

useInputWEMToCreateOutputWEM

name: useInputWEMToCreateOutputWEM, type: Bool, persistent: no

triangulationMode

name: triangulationMode, type: Enum, default: Strip

Values:

Title Name
Center node Center node
Fan Fan
Strip Strip

relativeError

name: relativeError, type: Float, default: 0

numEntries

name: numEntries, type: Integer, default: 200

addEdgesToNearestNodes

name: addEdgesToNearestNodes, type: Bool, default: FALSE