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
CameraPosition Output the camera position while moving the image.
CheckVTKVersion Check the VTK version returning True if the requested VTK version is >= the current version.
PointToGlyph Represent points as glyphs.
GetProgramParameters Get the program parameters.
ReadPolyData Uses the appropriate vtkPolyData reader to read any vtkPolyData file.
WriteImage Take a screen shot from the render window and write it to a file. The file extension selects the writer to use.