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 to subdivide a WEM in order to produce more nodes, edges, and faces without modifying the overall geometry.

Details

Note: This module works on triangles only!

The WEMSubdivide module searches exhaustively in a WEM for edges with lengths that exceed an adjustable length threshold. Such an edge is split by inserting a node into the middle of the corresponding edge (and additionally, two edges and two faces are inserted into the WEM). Internally, a priority queue is used; because of this, the longest edges are split first. Additionally, after each run of splitting edges, the module attempts to optimize the triangles by applying an edge-swap operation. Furthermore, 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

Field Index

Apply: Trigger

listenToFinishNotifications: Bool

PVL Name: String

Auto Apply: Bool

listenToRepaintNotifications: Bool

PVL Threshold: Double

Clear: Trigger

listenToSelectionChangedNotifications: Bool

shouldComputeNormals: Bool

Description: String

Local Subdivision: Bool

Subdivision Mode: Enum

elapsedTime: Float

Max Iterations: Integer

triangulationMode: Enum

id: Integer

Max. Edge Length: Float

Update Mode: Enum

isProcessing: Bool

Overwrite label and description: Bool

workDirectlyOnInputWEMs: Bool

Label: String

progress: Float

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

When pressed, the subdividing algorithm is applied to the 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 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

Defines the 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 in half until the resulting new edges are not longer than Max. Edge Length. Thus, each edge results in 2n edges, with n being determined adaptively for each 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 in the middle of that edge.

Local Subdivision

name: localSubdivision, type: Bool, default: FALSE

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

PVL Name

name: localSubdivisionPVL, type: String, default: LUT

Sets the name of the Primitive Value List (PVL) to use (only node and edge PVLs are supported).

PVL Threshold

name: localSubdivisionPVLThreshold, type: Double, default: 1

Sets the threshold for the Primitive Value List (PVL) value. If the PVL value is greater than or equal to the threshold, the edge can be subdivided.

Max Iterations

name: maxIterations, type: Integer, default: 1000000

Sets the maximum number of iterations. A value of -1 indicates that no limit is imposed.

By iteration, a splitting of an edge is meant. If the algorithm stops before all edges have been split according to the length criterion, the result is a valid WEM containing edges longer than the Max. Edge Length.

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