WEMSmooth¶
-
MLModule
¶ genre WEMProcessing
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLWEMModules
definition MLWEMModules.def see also SoWEMRenderer
inherits from WEMProcessor
keywords surface
,Laplace
Purpose¶
The module WEMSmooth
smooths a WEM by applying either a (Laplacian) smoothing of the surface or a smoothing of the surface’s normals.
Usage¶
Note that the module will not smooth single-colored faces. If a WEM patch consists solely of single-colored faces, the module will not smooth any polygons and will print a warning to the console.
Details¶
In general, the Smoothing Factor
should be adjusted to a value between 0.5 and 0.9. The Num. Smoothing Passes
should be adjusted to a value between 20 and 50. For Num. Smoothing Passes
, choose a low value for smoothing passes, such as 2 or 5.
If Use normals smoothing
is checked, only the node normals are smoothed; no node positions are modified. This way, you can enhance the overall appearance without altering the volume or surface area at all. It is recommended to use this option as late as possible in the WEM processing pipeline.
Note that the smoothed normals are stored in the WEM and used for visualization, but the normals are recomputed by modules like WEMReducePolygons
or WEMSubdivide
. Therefore, if a WEMReducePolygons
module is used after smoothing, the result of any normal smoothing is lost. In such cases, use another WEMSmooth with only normal smoothing enabled directly before the SoWEMRenderer
.
Input Fields¶
inWEM¶
-
name:
inWEM
, type:
WEM(MLBase)
¶ - For accessing this object via scripting see the Scripting Reference:
MLWEMWrapper
.
Output Fields¶
outWEM¶
-
name:
outWEM
, type:
WEM(MLBase)
¶ The smoothed WEM.
For accessing this object via scripting see the Scripting Reference:MLWEMWrapper
.
Parameter Fields¶
Field Index¶
Apply : Trigger |
listenToFinishNotifications : Bool |
Smoothing Factor : Float |
Auto Apply : Bool |
listenToRepaintNotifications : Bool |
triangulationMode : Enum |
Clear : Trigger |
listenToSelectionChangedNotifications : Bool |
Update Mode : Enum |
Description : String |
Num. Smoothing Passes (smoothingPassesLaplace) : Integer |
Use border preservation : Bool |
elapsedTime : Float |
Num. Smoothing Passes (smoothingPassesNormals) : Integer |
Use displacement adjustment : Bool |
id : Integer |
Overwrite label and description : Bool |
Use normals smoothing : Bool |
isProcessing : Bool |
progress : Float |
Use surface smoothing : Bool |
Label : String |
shouldComputeNormals : Bool |
workDirectlyOnInputWEMs : Bool |
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 smoothing algorithm is applied on 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
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
Use surface smoothing¶
-
name:
useLaplacianSmooth
, type:
Bool
, default:
TRUE
¶ If checked, a Laplacian surface smoothing is performed.
Smoothing Factor¶
-
name:
smoothingFactor
, type:
Float
, default:
0.2
, minimum:
0
, maximum:
1
¶ Sets the smoothing factor. A value of 0 means no smoothing.
Num. Smoothing Passes (smoothingPassesLaplace)¶
-
name:
smoothingPassesLaplace
, type:
Integer
, default:
10
, minimum:
0
¶ Sets the number of smoothing passes for the Laplacian surface smoothing.
Use displacement adjustment¶
-
name:
useDisplacementAdjustment
, type:
Bool
, default:
TRUE
¶ If checked, the surrounding area of the currently smoothed node is displaced in such a way that the overall shrinking effect is diminished.
NOTE: This option works best if all the polygons of the WEM are roughly the same size and nearly equilateral. If the WEM features highly irregular or elongated polygons, the resulting WEM will likely appear very rough or even broken.
Use border preservation¶
-
name:
useBorderPreservation
, type:
Bool
, default:
TRUE
¶ If checked, the positions and normals of border nodes are not altered.