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.

Windows

Default Panel

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

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

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 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

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.

Use normals smoothing

name: useNormalSmooth, type: Bool, default: FALSE

If checked, normal smoothing is performed.

Note that normal smoothing is applied after any optional surface smoothing.

Num. Smoothing Passes (smoothingPassesNormals)

name: smoothingPassesNormals, type: Integer, default: 2, minimum: 0

Sets the number of smoothing passes for normal smoothing.

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