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 | Use multiple camera orientation widgets in a window with the provision to relabel the axes labels and change axis colors. |
| 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. |
| 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, the default key is "k". The file extension selects the writer to use. |
| Slider2D | Implement a 2D slider widget. |
| Slider3D | Implement a 3D slider widget. |
| VTKDataClasses | The VTK immutable data classes for constants. These are usually used in the initialization VTK classes or to replace the Set/Get functions that set and get these constants. |
| WriteImage | Take a screenshot from the render window and write it to a file. The file extension selects the writer to use. |