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.

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

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

Use normals smoothing

name: useNormalSmooth, type: Bool, default: FALSE

If checked, a normal smoothing is performed.

Note that the normal smooth is applied after applying an 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