VTKView¶
- MacroModule¶
genre
author
MeVis Medical Solutions AG
package
definition
see also
keywords
Purpose¶
The VTKView is a convenience macro that allows to render a VTK object using the VTK class vtkRenderer.
Some display settings are available in the tab Properties.
On the tabs Input Connectors and Output Connectors, the visibility of different input and output connectors can be toggled.
The most used input is the dataSetMapper input that 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 in an existing network to have a quick look at the content of data outputs.
The example network contains a
VTKViewmacro with a scripted cone input. UseMLABMLBaseField.setObjecton the input field to set any VTK object as input.Simultaneous use of the render widget and the
outputRendererobject in another render window can lead to crashes, which can be avoided by settingEnable the render tabto off.
Windows¶
Camera¶
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.
inputDataSet¶
- name: inputDataSet, type: VTKObjectWrapper(MLBase), deprecated name: dataSetMapperinputInput\_vtkDataSet,polyDataMapperinputInput\_vtkPolyData¶
Sets the input vtkDataSet on the internal
vtkDataSetMapper. Outputs ofvtkAlgorithmobjects are automatically extracted.
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.
outputActor¶
- name: outputActor, type: VTKObjectWrapper(MLBase), deprecated name: actorOutputActor¶
This gives access to the internal
VTKActorobject.
Parameter Fields¶
Field Index¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Visible Fields¶
LookupTable Input¶
- name: showLookupTableInput, type: Bool, default: FALSE¶
If checked, the lookup table input that sets the lookup table in the internal
vtkDataSetMapperobject is visible.
Texture Property Input¶
- name: showTextureInput, type: Bool, default: FALSE¶
If checked, the texture input that sets the texture in the internal
VTKActorobject is visible.
BackfaceProperty Input¶
- name: showBackfacePropertyInput, type: Bool, default: FALSE¶
If checked, the BackfaceProperty input of the internal
VTKActorobject is visible.
Property1 Input¶
- name: showActorProperty0Input, type: Bool, default: FALSE¶
If checked, the first property input of the internal
vtkRendererobject is visible.
Property2 Input¶
- name: showActorProperty2Input, type: Bool, default: FALSE¶
Activates the visibility of the second property input of the internal
vtkRendererobject.
Data Set Mapper Input¶
- name: showDataSetMapperInput, type: Bool, default: TRUE¶
If checked, the data set input of the internal
vtkDataSetMapperobject is visible.
Actor Output¶
- name: showActorOutput, type: Bool, default: TRUE¶
If checked, the output connector with the internal
VTKActorobject is visible.
Data Set Mapper Output¶
- name: showDataSetMapperOutput, type: Bool, default: FALSE¶
If checked, the output connector with the internal
vtkDataSetMapperobject is visible.
Property Output¶
- name: showPropertyOutput, type: Bool, default: FALSE¶
If checked, the output connector with the internal
vtkPropertyobject is visible.
Renderer Output¶
- name: showRendererOutput, type: Bool, default: FALSE¶
If checked, the output connector with the internal
vtkRendererobject is visible.See also the notes for
Enable the render tab.
Enable the render tab¶
- name: enableRenderWidget, type: Bool, default: TRUE¶
If checked, the render tab in this module panel is enabled.
This can be disabled when the
vtkRendererobject created by this module is used with an externalvtkRenderWindow- such as aVTKRemoteRendering- because avtkRenderercan only used with onevtkRenderWindowat a time.Note that shared ownership can lead to crashes.
Background Color¶
- name: background, type: Color, default: 0 0 0¶
Sets the Background parameter for the internal
vtkRendererobject.
Position¶
- name: position, type: Vector3, default: 0 0 0¶
Sets the Position parameter for the internal
VTKActorobject.
Scalar Visibility¶
- name: scalarVisibility, type: Bool, default: FALSE¶
Sets the ScalarVisibility parameter for the internal
vtkDataSetMapperobject.
Scalar Range¶
- name: scalarRange, type: Vector2, default: 0 0¶
Sets the ScalarRange property for the internal
vtkDataSetMapperobject.
Image Color¶
- name: color, type: Color, default: 1 1 1¶
Sets the object color for the internal
vtkPropertyobject.
Rendering Mode¶
- name: representation, type: Enum, default: Surface¶
Defines the rendering mode (point, wireframe, surface) for the internal
vtkPropertyobject.
Values:
Title |
Name |
Deprecated Name |
|---|---|---|
Points |
Points |
0 |
Wireframe |
Wireframe |
1 |
Surface |
Surface |
2 |