Purpose

The WEMToVTKPolyData module converts a WEM to a vtkPolyData object. It is an adaptor module between the WEM package and VTK modules in MeVisLab.

Usage

The example network shows two viewers containing surface views of the Bone.tiff example data set. With the WEMImageData additional scalar values from the image are assigned to the WEM which are assigned as scalar attributes to the vtkPolyData object. On the left hand side of the SoExaminerViewer the vtkPolyData object is rendered as inventor object with a SoVTK. The right hand side shows the render result from the SoWEMRenderer. The VTKView displays the vtkPolyData object directly as vtkObject.

Windows

Default Panel

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

Input Fields

inWEM

name: inWEM, type: WEM(MLBase)

The input connector is a Base field for WEM objects (usually provides at outputs of many WEM modules).

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

Output Fields

outputPolyData

name: outputPolyData, type: VTKObjectWrapper(MLBase)

The output is a Base field for a vtkObjectTypeWrapper which passes a vtkPolyData object. It can be used to connect to VTK modules which expect vtkPolyData.

Parameter Fields

Visible Fields

Auto Apply

name: autoApply, type: Bool, default: TRUE

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

Apply

name: apply, type: Trigger

Applies changed parameters and updates the output object is Auto Apply

Mesh Type

name: meshType, type: Enum, default: PolygonMesh

Selects the type of created vtkPolyData.

Values:

Title Name Description
Points Points The WEM is converted to a set of vtkPoints; surface information is not converted.
Polygon Mesh PolygonMesh The WEM is converted to a set of vtkPoints and vtk polygons.

Convert Normals

name: convertNormals, type: Bool, default: TRUE

If enabled then normals from the WEM object are also copied to the corresponding vertices of the vtkPolyData object.

Convert Scalars

name: convertScalars, type: Bool, default: TRUE

If enabled then for each vertex of the WEM the first value of the corresponding Primitive Value List (PVL) is set as scalar value of corresponding point of the vtkPolyData object. Since multiple PVL’s might be available in the WEM, a specific one can be selected via its name which is given in Pvl Name For Scalars. LUT is the default PVL normally available in a WEM. If the scalar value cannot be determined from the WEM for any reason then 0 is used instead.

Pvl Name For Scalars

name: pvlNameForScalars, type: String, default: LUT

Pvl Name For Scalars selects the Primitive Value List (PVL) from which scalar values can be retrieved to be converted to scalar attributes in the vtkPolyData object if Convert Scalars is enabled. Multiple PVLs can be specified separated by commas. For each converted PVL a vtkFloatArray is added to the pointData of the generated vtkPolyData object. Each vtkFloatArray contains the scalars for the corresponding vertices in the created vtkPolyData object.

Status

name: status, type: String, persistent: no

Shows some information, normally some information about the connected input obejct.

Hidden Fields

isProcessing

name: isProcessing, type: Bool, persistent: no

elapsedTime

name: elapsedTime, type: Float, persistent: no

autoUpdate

name: autoUpdate, type: Bool, default: TRUE

autoClear

name: autoClear, type: Bool, default: TRUE

listenToFinishingNotifications

name: listenToFinishingNotifications, type: Bool, default: TRUE

listenToRepaintNotifications

name: listenToRepaintNotifications, type: Bool, default: TRUE

listenToSelectionChangedNotifications

name: listenToSelectionChangedNotifications, type: Bool, default: TRUE