WEMIsoSurface

MLModule
genre WEMGenerate
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLWEMModules
definition MLWEMModules.def
see also SoWEMRenderer
inherits from WEMGenerator
keywords generate

Purpose

The module WEMIsoSurface generates the iso surface of a scalar volume image at a certain threshold (interval).

Usage

Adjust the iso threshold value and supply the module with a scalar volume image. Use a SoWEMRenderer to generate an Open Inventor scene and to render the resulting scene.

The generated WEM may be modified by a filter (such as WEMSmooth, WEMDemergePatches, WEMSubdivide, or WEMReducePolygons) after being generated and before being rendered.

Details

The Neighboring Cells algorithm behind the WEMIsoSurface is similar to the well-known Marching Cubes algorithm: a volume (image) is scanned by discretizing it in cells. At each of the cells’ corners, the image values are measured. The assignment of corner values lead to a set amount of configurations. There are 256 configurations, because in comparison to the iso threshold, a corner can be either inside or outside of the boundary to be generated. So, a corner can yield two different states and there are eight corners which sums up to 28 = 256 configurations.

In the Marching Cubes algorithm, there is a list of triangles for each configuration. Those triangles are generated in each cell, resulting in a closed surface. In the Neighboring Cells algorithm, however, each configuration leads to the generation of zero to four nodes in each cell. Those nodes are associated to edges of the cell where a surface will go through. After generating the nodes, the links or surface parts will be established in a second processing pass. Like in the Marching Cubes algorithm, there will be some ambiguities, but they are detected and resolved at construction time.

The WEMIsoSurface features two iso values: a minimum and a maximum iso value. The usage of both values can be toggles. Since the generated iso surface is always closed, we can think of an inside and an outside? surface(s). A voxel value less than the minimum value or greater than the maximum value will result in an outside, all other voxel values will result in an inside. If one of the values is not set to be used, the according minimum or maximum image value is considered instead.

In general, if the image values are positive use the minimum iso value, if the image values are negative use the maximum iso value. In both cases, turn off the usage of the image’s minimum or maximum value.

If interpolation is activated, each cell’s edge that is associated with a certain node is interpolated linearly, and the interpolated node’s position is set to the centroid of all these interpolated cell’s edges positions. If the interpolation is turned off, all nodes are positioned into the middle of their cells, which results in a voxel-precision iso surface.

The Cell Ext parameter determines the scanning cells’ sizes proportional to the voxel size of the input image. If the cell extend is set to 1/1/1, each voxel will be scanned. If the cell extend is set to 2/1/1, only every second voxel in x-direction is scanned. The values of the cell extend may be rational numbers, e.g. 0.5/1/2.3. The interpolation type of subvoxel resolution cell extends is Nearest Neighbor.

While the surface generation process, the image voxel values are stored for the generated WEMNodes in a WEMPrimitiveValueList called LUT. If there is more than one voxel value associated to a WEMNode, the highest value is stored in the considered WEMNode. These values may be used later on in the SoWEMRenderer, where these values lead to a coloring of the surface, if a LUT is used.

Windows

Default Panel

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

Input Fields

The module has one input which must be an image of a scalar data type.

input0

name: input0, type: Image

Output Fields

The module’s output is a WEM, which is always a 2-manifold (so, there are no holes or any other borders, and all internal pointer links of the primitives are correct).

outWEM

name: outWEM, type: WEM(MLBase)
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, the module computes a new output WEM on any parameter change.

see also WEMGenerator.autoApply

Update Mode

name: updateMode, type: Enum, default: AutoUpdate, deprecated name: autoUpdate

If checked, the module computes a new output WEM on any change of the input image.

see also WEMGenerator.updateMode

Overwrite label and description

name: overwriteLabelDescription, type: Bool, default: FALSE

If checked, the label and description string of the output WEM are set to Label and Description, respectively.

see also WEMGenerator.overwriteLabelDescription

Label

name: label, type: String

Sets a label string to the output WEM.

see also WEMGenerator.label

Description

name: description, type: String

Sets a description string to the output WEM.

see also WEMGenerator.description

Iso Min. Value

name: isoMinValue, type: Double, default: 1200

Sets the minimum threshold value: the iso surface is generated between pairs of voxels where one voxel’s value exceeds or equals this value and the other voxel’s value fall below this value.

Iso Max. Value

name: isoMaxValue, type: Double, default: 2000

Sets the maximum threshold value.

Use image min. value

name: useMinValue, type: Bool, default: FALSE

If checked, the image’s minimum value is taken as the minimum iso value. Use this option with images with negative values.

Use image max. value

name: useMaxValue, type: Bool, default: TRUE

If checked, the image’s maximum value is taken as the maximum iso value. Since a voxel value is tested against this value by equal or larger (>=), no surface will be generated at all due to this value.

Cell Ext.

name: cellExtend, type: Vector3, default: 3 3 3

Sets the cell extends of the Neighboring Cells.

If the extend is set to 1/1/1, each voxel will be investigated which is the default. If the extend is set to 2/2/2, every second voxel will be investigated. The cell extend can be set to an anisotropic value, like 2/1/3.

All dimension parameters can be of float type, i.e. 1.2/0.5/3.4. Interpolation is nearest-neighbor.

World coordinates

name: useWorldCoords, type: Bool, default: TRUE

If checked, the resulting WEM is generated in world coordinates. If unchecked, the WEM is generated in voxel coordinates.

Interpolate

name: useInterpolation, type: Bool, default: TRUE

If checked, a trilinear interpolation is applied to find the best approximation of the nodes’ positions that reflects the image’s values.

If unchecked, each node is generated in the centre of its cell, causing the resulting WEM to have voxel precision.

Write values to faces

name: useFaceValueList, type: Bool, default: FALSE

If checked, a PVL for the faces is established, holding the nearest image value for each face. Note that all of those faces are now locked for WEMReducePolygons, WEMSmooth, and WEMSubdivide operations. If the user attempts to use any of the those module, a warning is printed to the console.

Write values to nodes

name: useLUTValueList, type: Bool, default: TRUE

If checked, a PVL for the nodes is established, holding the image value for each node. The PVL is called LUT.

Remove nodes with valence 3

name: useValenceThreeRemoval, type: Bool, default: TRUE

If checked, all nodes with a valence of three are deleted, if all their incident edges yield an angle greater than 90 degrees.

Remove zero-length edges

name: useZeroLengthEdgeRemoval, type: Bool, default: TRUE

If checked, all edges with a zero length are removed from the resulting WEM. Such edges cause incident faces to have a zero area.

Remove edges after generation

name: useEdgeRemoval, type: Bool, default: FALSE

If checked, all edges are removed from the output WEM after its generation.

Time Point Index (-1=all)

name: timePointIndex, type: Integer, default: 0, minimum: -1, maximum: :field:`maxTimePointIndex`

Sets the time point index to generate iso-surfaces from. If set to -1, iso-surfaces for all time point indexes are generated.

Generate in Background

name: startTask, type: Trigger

If pressed, the module generates a WEM in the background.

Apply

name: startTaskSynchronous, type: Trigger, deprecated name: apply

If pressed, the module conputes a new output WEM.

Cancel

name: cancelTask, type: Trigger

If pressed while the module generates a WEM in the background, that generation is being canceled and the module returns an empty WEM.

Use Voxel Sampling

name: useVoxelSampling, type: Bool, default: TRUE

If checked, the module uses the simple Voxel Sampling to scan the voxel image instead of the more granular Cell Ext..

Voxel Sampling

name: voxelSampling, type: Integer, default: 3, minimum: 1

Sets a voxel sampling size for scanning the voxel image. The value is used as a sampling step in each main direction.

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

clear

name: clear, type: Trigger

see WEMGenerator.clear

shouldComputeNormals

name: shouldComputeNormals, type: Bool, default: TRUE

see WEMGenerator.shouldComputeNormals

progress

name: progress, type: Float, persistent: no

useQuadrification

name: useQuadrification, type: Bool, default: FALSE

maxTimePointIndex

name: maxTimePointIndex, type: Integer, persistent: no

taskVerboseLogging

name: taskVerboseLogging, type: Bool, default: FALSE

taskFinished

name: taskFinished, type: Trigger

taskCanceled

name: taskCanceled, type: Trigger

status

name: status, type: String, persistent: no