VTKPolyDataToWEM

MLModule

genre

VTKAdapters

author

MeVis Medical Solutions AG

package

MeVisLab/VTK

dll

WEMVTKAdapters

definition

MLWEMVTKAdapters.def

see also

MLToVTKImage, VTKToMLImage, VTKView, SoVTK, WEMToVTKPolyData, MLBaseToVTKPolyData, VTKInputInfos

inherits from

WEMGenerator

keywords

WEM, VTK, polydata, winged, edge, mesh, convert, conversion, adapter, interface

Purpose

The module VTKPolyDataToWEM converts a vtkPolyData object to a WEM.

The vtkPolyData object must consist of triangles only. If there are any other cells, try to convert them with VTK Python classes like vtkTriangleFilter.

Windows

Default Panel

../../../Modules/ML/MLWEMVTKAdapters/mhelp/Images/Screenshots/VTKPolyDataToWEM._default.png

Input Fields

inputPolyData

name: inputPolyData, type: VTKObjectWrapper(MLBase)

The input is a Base field for a vtkObjectTypeWrapper, which contains a vtkPolyData object.

Output Fields

outWEM

name: outWEM, type: WEM(MLBase)

The output connector is a Base field for a WEM object.

For accessing this object via scripting, see the Scripting Reference: MLWEMWrapper.

Parameter Fields

Field Index

Apply: Trigger

Generate edges: Bool

VTK Scalar: String

Auto apply: Bool

id: Integer

WEM PVL: String

clear: Trigger

isProcessing: Bool

Compute WEM normals: Bool

label: String

Convert colors: Bool

Normal Computation: Enum

description: String

overwriteLabelDescription: Bool

Do scalar: Bool

Status: String

elapsedTime: Float

Update Mode: Enum

Visible Fields

Auto apply

name: autoApply, type: Bool, default: TRUE

If checked, all changes are immediately applied and the output is updated. If disabled, then Apply must be pressed to activate the settings.

see also WEMGenerator.autoApply

Update Mode

name: updateMode, type: Enum, default: AutoUpdate

Defines when and/or how the resulting WEM is updated on inputs changes.

see also WEMGenerator.updateMode

Apply

name: apply, type: Trigger

When pressed, the output is computed with the current field settings.

see also WEMGenerator.apply

Compute WEM normals

name: shouldComputeNormals, type: Bool, default: TRUE

If checked, the face and node normals are computed by the WEM library.

This field only has an effect if Normal Computation is set to ComputeWEMNormalsIfRequested.

see also WEMGenerator.shouldComputeNormals

Normal Computation

name: normalComputation, type: Enum, default: ConvertFromVTK

Defines how the normals are computed.

Values:

Title

Name

Description

Convert From VTK

ConvertFromVTK

The VTK face and node normals are copied and converted to WEM normals if present.

If no node normals are present, a warning message is printed to the debug console and no node normals are set.

No Normals At All

NoNormalsAtAll

No normals are converted or computed at all.

Compute WEM Normals If Requested

ComputeWEMNormalsIfRequested

The face and node normals are computed by the WEM library if the field Compute WEM normals is checked.

Otherwise, no normals are set at all.

Convert colors

name: convertColors, type: Bool, default: FALSE

If checked, colors of the vtkPolyData object are converted and assigned to the resulting WEM. Otherwise, the default WEM color is used.

The default WEM color is (1, 1, 1, 0.6) in RGBA format and is stored in each WEMNode.

The node colors, whether converted or default, are visible if SoWEMRenderer.colorMode is set to WEM_COLOR_NODE_COLORS.

If no colors are present, a warning message is printed to the debug console.

Status

name: status, type: String, persistent: no

Shows some information, which is typically about the connected input object.

VTK Scalar

name: vtkScalar, type: String

Sets the name of the VTK’s scalar values of the nodes that should be converted to the WEM’s Primitive Value List (PVL).

WEM PVL

name: wemPVL, type: String, default: LUT

Sets the name of the target WEM’s Primitive Value List (PVL) for the VTK’s scalar node values.

Do scalar

name: doScalar, type: Bool, default: FALSE

If checked, the VTK’s scalar values stored under the name VTK Scalar associated with each node are added to the WEM’s Primitive Value List (PVL).

Generate edges

name: generateEdges, type: Bool, default: FALSE

If checked, edges in the WEM are generated.

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

overwriteLabelDescription

name: overwriteLabelDescription, type: Bool, default: FALSE

see WEMGenerator.overwriteLabelDescription

label

name: label, type: String

see WEMGenerator.label

description

name: description, type: String

see WEMGenerator.description