WEMSubdivide

MLModule
genre WEMProcessing
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLWEMModules
definition MLWEMModules.def
see also WEMReducePolygons
inherits from WEMProcessor
keywords split, surface

Purpose

The module WEMSubdivide can be used for subdividing a WEM in order to produce more nodes, edges and face without modifying the overall geometry.

Details

Note: This module works on triangles only!

The WEMSubdivide module searches exhaustively in a WEM for edges with a length that exceeds an adjustable length threshold. Such an edge is split by inserting a node into the middle of the concerning edge (and additionally two edges and two faces are inserted into the WEM). Internally, a priority queue is used and because of that, the longest edges are split first. Additionally, after each run of splitting edges, the module tries to optimize the triangles by applying a edge-swap operation. Also, the faces’ normals are smoothed before checking for a potential swap.

Tips

The average edge length can be determined with the WEMInfo.

Windows

Default Panel

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

Input Fields

inWEM

name: inWEM, type: WEM(MLBase)

Any valid WEM that contains only triangles.

For accessing this object via scripting see the Scripting Reference: MLWEMWrapper.

Output Fields

outWEM

name: outWEM, type: WEM(MLBase)

The subdivided WEM.

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, all parameter changes take immediately effect.

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 splitting algorithm is applied to the 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

Subdivision Mode

name: subdivisionMode, type: Enum, default: Adaptive Subdivision

Selects subdivision mode.

Values:

Title Name Description
Split Each Edge Once Split Each Edge Once Each edge is split into two edges, independent of the edge length.
Adaptive Subdivision Adaptive Subdivision Each edge is recursively split into half until the resulting new edges are not longer than Max. Edge Length. Hence, each edge results in 2^n edges, with n being determined adaptively per edge.

Max. Edge Length

name: maxEdgeLength, type: Float, default: 1

Sets the maximum length an edge can have in a WEM. If any edge exceeds this length, it will be split by inserting a node into the middle of such an edge.

Local Subdivision

name: localSubdivision, type: Bool, default: FALSE

If enabled, the PVL Name PVL is used to determine if an edge should be subdivided.

PVL Name

name: localSubdivisionPVL, type: String, default: LUT

The name of the PVL to use (node and edge PVLs are supported).

PVL Threshold

name: localSubdivisionPVLThreshold, type: Double, default: 1

The threshold for the PVL value. If the PVL value is >= the threshold, the edge can be subdivided.

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