Skip to content

Snippets

Description

Snippets are chunks of code that can be cut (snipped) and pasted into examples. We want each example to be stand-alone, so we do not keep the snippet code in a library.

Available snippets

Snippet Description
Callbacks Implementing callbacks.
CameraOrientationWidget Placement Define the parameters that label, color and position a vtkCameraOrientationWidget.
CameraPosition Get the camera position and focal point.
CheckVTKVersion Check the VTK version returning True if the requested VTK version is >= the current version.
DrawViewportBorder Draw a border around a renderer's viewport.
GetProgramParameters Get the program parameters.
GetTextPositions Get viewport positioning information for a list of names.
Make2DSliderWidget Implement 2D slider widgets.
Permute Permute image and other geometric data to maintain proper orientation regardless of the acquisition order.
PointToGlyph Represent points as glyphs.
ReadPolyData Uses the appropriate vtkPolyData reader to read any vtkPolyData file.
ScreenShotCallback Take a screenshot from the render window by pressing a key on the keyboard.
Slider3D Implement a 3D slider widget.
VTKDataClasses The VTK immutable data classes for constants.
WriteImage Take a screenshot from the render window and write it to a file. The file extension selects the writer to use.