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 surface smooth (Laplacian), or a smoothing of the surface’s normals.
Usage¶
Note that the module will not smooth single-colored faces. If a WEM patch consists of only single-colored faces, the module will smooth no polygons and print a warning to the console.
Details¶
In general, the Smoothing Factor
should be adjusted to a value from 0.5 to 0.9. The Num. Smoothing Passes
should be adjusted to a value from 20 to 50. With Num. Smoothing Passes
, choose a low value of smoothing passes, such as 2 or 5.
If Use normals smoothing
is chosen, only the node normals are smoothed; no node’s position is modified. This way, you can enhance the overall appearance without modifying the volume or surface area at all. It is recommended to be used as late as possible in the WEM-processing pipeline.
Note that the smoothed normals are stored in the WEM and are used for the visualization, but the normals are recomputed by modules like WEMReducePolygons
or WEMSubdivide
. So, if a WEMReducePolygons
module is used after smoothing, the result of an eventual normal smoothing is lost. In such a case, 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
¶ If pressed, the smoothing algorithm is applied on 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
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 a smoothing factor. A value of 0 means no smoothing at all.
Num. Smoothing Passes (smoothingPassesLaplace)¶
-
name:
smoothingPassesLaplace
, type:
Integer
, default:
10
, minimum:
0
¶ Sets the number of smoothing passes for Laplacian surface smoothing.
Use displacement adjustment¶
-
name:
useDisplacementAdjustment
, type:
Bool
, default:
TRUE
¶ If checked, the surrounding of the currently smoothed node is displaced in 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 almost equilateral. When the WEM features highly irregular or elongated polygons, the resulting WEM will probably look very rough or even broken.
Use border preservation¶
-
name:
useBorderPreservation
, type:
Bool
, default:
TRUE
¶ If checked, no border nodes’ positions or normals are altered.