VTKView

MacroModule
genre VTKMacros
author MeVis Medical Solutions AG
package MeVisLab/VTK
definition VTKView.def
see also View2D, View3D, SoExaminerViewer
keywords vtkRenderer, Viewer, Examiner

Purpose

The VTKView is a convenience macro which allows to show a rendered VTK object using the VTK class vtkRenderer. Some display settings are available in the tab Properties. The tabs Input Connectors and Output Connectors allow to show or hide different input and output connectors.

The mostly used input is the dataSetMapper input, which allows to connect a VTK data source either directly or via scripting (as shown in the example network).

Usage

This module can be used as a viewer for VTK data sets.

In the render view the following interactions are available:

  • Key R: Center the scene
  • Key S: Use solid rendering
  • Key W: Use wireframe rendering
  • Left-Mouse button dragging: Rotate the scene
  • Shift-Left-Mouse button or middle mouse button dragging: Translate the scene
  • Right-Mouse dragging or Mouse Scroll Wheel: Scale the scene

Tips

  • This module can be used either as viewer or as a convenience module to simplify VTK module networks. It also can be used inside an existing network to have a short look at the output of data outputs.
  • The example network contains a VTKView macro with a scripted cone input. Use setObject on the input field to set any VTK object as input.
  • Simultaneous use of the render widget and the outputRenderer object in another render window can lead to crashes, which can be avoided by setting Enable the render tab to off.

Windows

Default Panel

../../../Modules/Macros/VTKView/mhelp/Images/Screenshots/VTKView._default.png

Camera

../../../Modules/Macros/VTKView/mhelp/Images/Screenshots/VTKView.Camera.png

Input Fields

The number of input connectors is configurable; at least the connector for data sets is enabled by default, all other inputs need to be configured in the Output Connectors panel.

inputMapperLookupTable (hidden)

name: inputMapperLookupTable, type: VTKObjectWrapper(MLBase), deprecated name: dataSetMapperinputLookupTable\_vtkScalarsToColors,polyDataMapperinputLookupTable\_vtkScalarsToColors

Sets the LookupTable on the internal vtkDataSetMapper.

inputActorBackfaceProperty (hidden)

name: inputActorBackfaceProperty, type: VTKObjectWrapper(MLBase), deprecated name: actorinputBackfaceProperty\_vtkProperty

Set the BackfaceProperty on the internal VTKActor.

inputActorTexture (hidden)

name: inputActorTexture, type: VTKObjectWrapper(MLBase), deprecated name: actorinputTexture\_vtkTexture

Set the Texture on the internal VTKActor.

inputRendererViewProp1 (hidden)

name: inputRendererViewProp1, type: VTKObjectWrapper(MLBase), deprecated name: rendererinputvtkPropActor0

This input is added as ViewProp to the internal vtkOpenGLRenderer.

inputDataSet

name: inputDataSet, type: VTKObjectWrapper(MLBase), deprecated name: dataSetMapperinputInput\_vtkDataSet,datsaSetMapperinputInput\_vtkDataSet,polyDataMapperinputInput\_vtkPolyData

Sets the input vtkDataSet on the internal vtkDataSetMapper. Outputs of vtkAlgorithm objects are automatically extracted.

inputRendererViewProp2 (hidden)

name: inputRendererViewProp2, type: VTKObjectWrapper(MLBase), deprecated name: rendererinputvtkPropActor2

This input is added as ViewProp to the internal vtkOpenGLRenderer.

Output Fields

The module has a configurable number of outputs; the only default one corresponds to the actor output of the internal VTKActor module. It can be disabled in the Output Connectors panel with the Actor Output checkbox.

outputRenderer (hidden)

name: outputRenderer, type: VTKObjectWrapper(MLBase)

This gives acces to the internal vtkOpenGLRenderer object.

outputActor

name: outputActor, type: VTKObjectWrapper(MLBase), deprecated name: actorOutputActor

This gives acces to the internal VTKActor object.

outputDataSetMapper (hidden)

name: outputDataSetMapper, type: VTKObjectWrapper(MLBase)

This gives acces to the internal vtkDataSetMapper object.

outputProperty (hidden)

name: outputProperty, type: VTKObjectWrapper(MLBase)

This gives acces to the internal vtkProperty object.

Parameter Fields

Visible Fields

LookupTable Input

name: showLookupTableInput, type: Bool, default: FALSE

Activates the visibility of the lookup table input that set the lookup table in the internal vtkDataSetMapper object.

Texture Property Input

name: showTextureInput, type: Bool, default: FALSE

Activates the visibility of the texture input that set the texture in the internal VTKActor object.

BackfaceProperty Input

name: showBackfacePropertyInput, type: Bool, default: FALSE

Activates the visibility of the BackfaceProperty input of the internal VTKActor object.

Property1 Input

name: showActorProperty0Input, type: Bool, default: FALSE

Activates the visibility of the first property input of the internal vtkRenderer object.

Property2 Input

name: showActorProperty2Input, type: Bool, default: FALSE

Activates the visibility of the second property input of the internal vtkRenderer object.

Data Set Mapper Input

name: showDataSetMapperInput, type: Bool, default: TRUE

Activates the visibility of the data set input of the internal vtkDataSetMapper object.

Actor Output

name: showActorOutput, type: Bool, default: TRUE

Activates the visibility of the output connector with the internal VTKActor object.

Data Set Mapper Output

name: showDataSetMapperOutput, type: Bool, default: FALSE

Activates the visibility of the output connector with the internal vtkDataSetMapper object.

Property Output

name: showPropertyOutput, type: Bool, default: FALSE

Activates the visibility of the output connector with the internal vtkProperty object.

Renderer Output

name: showRendererOutput, type: Bool, default: FALSE

Activates the visibility of the output connector with the internal vtkRenderer object.

Please also see the notes for Enable the render tab.

Enable the render tab

name: enableRenderWidget, type: Bool, default: TRUE

Enable the render tab in this module panel.

This can be disabled when the vtkRenderer object created by this module is used with an external vtkRenderWindow - like with a VTKRemoteRendering - as a vtkRenderer can only used with one vtkRenderWindow at a time. Shared ownership can lead to crashes.

Background Color

name: background, type: Color, default: 0 0 0

This is the Background parameter for the internal vtkRenderer object.

Position

name: position, type: Vector3, default: 0 0 0

Defines the Position parameter for the internal VTKActor object.

Scalar Visibility

name: scalarVisibility, type: Bool, default: FALSE

Defines the ScalarVisibility parameter for the internal vtkDataSetMapper object.

Scalar Range

name: scalarRange, type: Vector2, default: 0 0

Defines the ScalarRange property for the internal vtkDataSetMapper object.

Image Color

name: color, type: Color, default: 1 1 1

Defines the object color for the internal vtkProperty object.

Rendering Mode

name: representation, type: Enum, default: Surface

Rendering mode (point, wireframe, surface) for the internal vtkProperty object.

Values:

Title Name
Points Points
Wireframe Wireframe
Surface Surface

Use Camera

name: useCamera, type: Bool, default: TRUE

If switched off, the internal camera is not used, and the camera properties have no effect.

For documentation of the camera properties, see the documentation of vtkCamera from VTK.

Hidden Fields

repaint

name: repaint, type: Trigger

This field triggers a repaint of the vtkRenderWidget control (if visible).