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.
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 Threshold : Double |
Auto Apply : Bool |
listenToRepaintNotifications : Bool |
shouldComputeNormals : Bool |
Clear : Trigger |
listenToSelectionChangedNotifications : Bool |
Subdivision Mode : Enum |
Description : String |
Local Subdivision : Bool |
triangulationMode : Enum |
elapsedTime : Float |
Max. Edge Length : Float |
Update Mode : Enum |
id : Integer |
Overwrite label and description : Bool |
workDirectlyOnInputWEMs : Bool |
isProcessing : Bool |
progress : Float |
|
Label : String |
PVL Name : String |
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
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
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.