Python Examples

Please see this page to learn how to setup your environment to use VTK in Python.

It would be appreciated if there are any Python VTK experts who could convert any of the c++ examples to Python!

Info

This table shows the VTK classes covered by the examples.

Info

This table shows VTK classes that do not have an example. Please add examples in your area of expertise!

Hello World

Example Name Classes Demonstrated Description Image
CylinderExample vtkPolyDataMapper vtkActor vtkRenderer vtkRenderWindow vtkRenderWindowInteractor Cylinder example from the VTK Textbook and source code. A hello world example

Simple Operations

Example Name Classes Demonstrated Description Image
DistanceBetweenPoints(cxx) vtkMath::Distance2BetweenPoints

Input and Output

Output

Example Name Classes Demonstrated Description Image
PLYWriter vtkPLYWriter
STLWriter vtkSTLWriter

Input

Example Name Classes Demonstrated Description Image
STLReader vtkSTLReader
UnstructuredGridReader vtkUnstructuredGridReader Using vtkUnstructuredGridReader to read a (legacy) *.vtk file
VTPReader vtkXMLPolyDataReader Needs fixing.
Importers
Example Name Classes Demonstrated Description Image
3DSImporter(cxx) vtk3DSImporter Import a 3D Studio scene that includes multiple actors.

Working with Arrays

Example Name Classes Demonstrated Description Image
GetValues GetTuple3
RenameArray SetName

Image Format

Output

Example Name Classes Demonstrated Description Image
ImageWriter(cxx) vtkBMPWriter vtkJPEGWriter vtkPNMWriter vtkPostScriptWriter vtkTIFFWriter vtkPNGWriter vtkWindowToImageFilter Write an imagefile based on the file extension.

Geometric Objects

Example Name Classes Demonstrated Description Image
SourceObjectsDemo(cxx) vtkSphereSource vtkConeSource vtkCylinderSource vtkCubeSource vtkPlaneSource vtkTextSource vtkPointSource vtkDiskSource vtkLineSource Examples of source objects that procedurally generate polygonal models. These nine images represent just some of the capability of VTK. From upper left in reading order: sphere, cone, cylinder, cube, plane, text, random point cloud, disk (with or without hole), and line source. Other polygonal source objects are available; check subclasses of vtkPolyDataAlgorithm.

Display

Example Name Classes Demonstrated Description Image
Arrow(cxx) vtkArrowSource
Axes(cxx) vtkAxesActor
Cell3DDemonstration(cxx) vtkHexagonalPrism vtkHexahedron vtkPentagonalPrism vtkPolyhedron vtkPyramid vtkTetra vtkVoxel vtkWedge vtkUnstructuredGrid Sample objects are generated from the classes derived from vtkCell3D and displayed.
ColoredLines(cxx) vtkCellData vtkLine
Cone(cxx) vtkConeSource
Cube(cxx) vtkCubeSource
Cube1 vtkCubeSource
Cylinder(cxx) vtkCylinderSource
DataSetSurface vtkDataSetSurfaceFilter
Disk(cxx) vtkDiskSource A circle with a hole in it.
Frustum(cxx) vtkFrustumSource
GeometricObjectsDemo(cxx)
Hexahedron(cxx) vtkHexahedron
LineSource vtkLineSource
LongLine(cxx) vtkLine
OrientedArrow(cxx) vtkArrowSource
Plane(cxx) vtkPlaneSource
PlanesIntersection(cxx) vtkPlanesIntersection
Planes(cxx) vtkPlanes vtkHull We create a convex hull of the planes for display purposes.
PlatonicSolid(cxx) vtkPlatonicSolidSource All five platonic solids are displayed.
PointSource vtkPointSource
Point(cxx) vtkPoints
Polyline(cxx) vtkPolyLine This example demonstrates how to create a polygon through several ordered points.
PolygonIntersection(cxx) vtkPolygon IntersectWithLine()
Polygon(cxx) vtkPolygon
Pyramid(cxx) vtkPyramid
Quad(cxx) vtkQuad
RegularPolygonSource(cxx) vtkRegularPolygonSource
Sphere(cxx) vtkSphereSource
TessellatedBoxSource(cxx) vtkTessellatedBoxSource Generate a box with tessellated sides.
Tetrahedron(cxx) vtkTetra
TextActor vtkTextActor 2D "HUD-type" text
TriangleStrip(cxx) vtkTriangleStrip
Triangle(cxx) vtkTriangle
Vertex(cxx) vtkVertex

Parametric Objects

Example Name Classes Demonstrated Description Image
ParametricObjectsDemo(cxx) vtkParametricBoy vtkParametricConicSpiral vtkParametricCrossCap vtkParametricDini vtkParametricEllipsoid vtkParametricEnneper vtkParametricFigure8Klein vtkParametricKlein vtkParametricMobius vtkParametricRandomHills vtkParametricRoman vtkParametricSpline vtkParametricSuperEllipsoid vtkParametricSuperToroid vtkParametricTorus Demonstration of of the vtkParametric classes added by Andrew Maclean. All the objects are displayed in a 4X4 array.
ParametricObjects(cxx) Uncomment the object that you wish to be displayed.

Implicit Functions and Iso-surfaces

Example Name Classes Demonstrated Description Image
Boolean vtkImplicitBoolean Demonstrate booleans of two different implicit functions
CutWithScalars(cxx) vtkContourFilter Cut a surface with scalars.
ExtractData(cxx) vtkSampleFunction Implicit functions used to select data: Two ellipsoids are combined using the union operation used to select voxels from a volume. Voxels are shrunk 50 percent.
Hello(cxx) vtkImplicitModeller Implicit modelling used to thicken a stroked font.
IceCream(cxx) vtkImplicitBoolean vtkSampleFunction How to use boolean combinations of implicit functions to create a model of an ice cream cone.
ImplicitDataSet(cxx) vtkImplicitDataSet A cube is used to define an implicit function (through vtkImplicitDataSet) which is then used to clip a sphere.
ImplicitSphere(cxx) vtkSphere An implicit representation of a sphere.
Lorenz(cxx) vtkContourFilter Visualizing a Lorenz strange attractor by integrating the Lorenz equations in a volume.
MarchingCases(cxx) vtkMarchingCubes Explore the Marching Cubes cases.
Quadric vtkQuadric Create an ellipsoid using an implicit quadric
Sphere vtkSphere Demonstrate sampling of a sphere implicit function

Working with PolyData

Example Name Classes Demonstrated Description Image
BooleanOperationPolyDataFilter(cxx) vtkBooleanOperationPolyDataFilter This example performs a boolean operation (Intersection, Union, Difference) of two PolyData
ColoredTriangle vtkTriangle Creates a file TriangleColored.vtp.
CombinePolyData(cxx) vtkAppendPolyData This example combines Polydata objects, and displays the result to the screen.
Cube vtkPolyData
CurvaturesDemo vtkCurvatures vtkColorTransferFunction Demonstrates how to get the Gaussian and Mean curvatures of a surface.
FilledPolygon vtkCutter
ImplicitPolyDataDistance(cxx) vtkImplicitPolyDataDistance
IterativeClosestPoints vtkIterativeClosestPointTransform
KochSnowflake(cxx) vtkPolyData vtkCellArray vtkPoints vtkPolyLine This example draws a Koch snowflake fractal using recursive functions and some of the convenient tools in the toolkit.
LineOnMesh vtkCellLocator vtkParametricSpline
MeshLabelImageColor vtkDiscreteMarchingCubes
Outline(cxx) vtkOutlineFilter
PolyDataContourToImageData(cxx) vtkLinearExtrusionFilter vtkPolyDataToImageStencil
PolyDataToImageDataStencil vtkPolyDataToImageStencil
RotationAroundLine(cxx) vtkTransformPolyDataFilter
RuledSurfaceFilter(cxx) vtkRuledSurfaceFilter
SmoothMeshGrid vtkLoopSubdivisionFilter vtkButterflySubdivisionFilter
SolidColoredTriangle vtkTriangle Writes out a file TriangleSolidColor.vtp.
TriangleColoredPoints(cxx) vtkUnsignedCharArray
TriangleCornerVertices vtkCellArray
TriangleCorners vtkXMLPolyDataWriter
WarpVector(cxx) vtkLine vtkDoubleArray vtkPolyData vtkWarpVector This example warps/deflects a line.
WriteTriangleToFile vtkTriangle

Working with 3D Data

Example Name Classes Demonstrated Description Image
Bottle(cxx) vtkRotationalExtrusionFilter Rotationally symmetric objects.
ExtractSelection(cxx) vtkExtractSelection
ExtractSelectionCells(cxx) vtkExtractSelection Extract cell, select cell.
Finance(cxx) vtkGaussianSplatter Visualization of multidimensional financial data. The gray/wireframe surface represents the total data population. The red surface represents data points delinquent on loan payment.
Spring(cxx) vtkRotationalExtrusionFilter Rotation in combination with linear displacement and radius variation.

Working with Structured 3D Data

This section includes vtkImageData, vtkStructuredGrid, and vtkRectilinearGrid.

vtkImageData

Example Name Classes Demonstrated Description Image
ImageWeightedSum(cxx) vtkImageWeightedSum Add two or more images.

vtkStructuredGrid

Example Name Classes Demonstrated Description Image
SGrid(cxx) vtkStructuredGrid Creating a structured grid dataset of a semi-cylinder. Vectors are created whose magnitude is proportional to radius and oriented in tangential direction.

vtkStructuredPoints

Example Name Classes Demonstrated Description Image
Vol(cxx) vtkStructuredPoints vtkContourFilter Creating a image data dataset. Scalar data is generated from the equation for a sphere. Volume dimensions are 26 x 26 x 26.

vtkRectilinearGrid

Example Name Classes Demonstrated Description Image
RectilinearGrid(cxx) vtkRectilinearGrid create a rectilinear grid
RGrid(cxx) vtkRectilinearGrid Creating a rectilinear grid dataset. The coordinates along each axis are defined using an instance of vtkDataArray.

Working with Unstructured 3D Data

This section includes vtkUnstructuredGrid.

vtkUnstructuredGrid

Example Name Classes Demonstrated Description Image
UGrid(cxx) vtkUnstructuredGrid Creation of an unstructured grid.

Working with Meshes

This section includes examples of manipulating meshes.

Example Name Classes Demonstrated Description Image
ClipDataSetWithPolydata(cxx) vtkClipDataSet vtkImplicitPolyDataDistance vtkRectilinearGrid clip a vtkRectilinearGrid with arbitrary polydata. In this example, use a vtkConeSource to generate polydata to slice the grid, resulting in an unstructured grid.
DelaunayMesh(cxx) vtkDelaunay2D vtkMinimalStandardRandomSequence vtkExtractEdges vtkGlyph3D vtkTubeFilter Two-dimensional Delaunay triangulation of a random set of points. Points and edges are shown highlighted with sphere glyphs and tubes.

Rendering

Example Name Classes Demonstrated Description Image
CameraBlur(cxx) Example of a scene rendered with focal depth.
ColoredSphere(cxx) vtkSphereSource vtkElevationFilter A simple sphere.
Cone3(cxx) vtkRenderWindow Four frames of output, based on the VTK example Cone3.py.
Cone4(cxx) vtkRenderWindow Modifying properties and transformation matrix based on the VTK example Cone4.py.
DottedLine This needs a re-work, see StippledLine.cxx
FlatVersusGouraud(cxx) vtkProperty::SetInterpolationToFlat vtkProperty::SetInterpolationToGouraud Flat and Gouraud shading. Different shading methods can dramatically improve the look of an object represented with polygons. On the top, flat shading uses a constant surface normal across each polygon. On the bottom, Gouraud shading interpolates normals from polygon vertices to give a smoother look.
Mace(cxx) An example of multiple inputs and outputs.
Model(cxx) vtkRenderer vtkRenderWindow vtkRenderWindowInteractor Illustrative diagram of graphics objects.
MotionBlur(cxx) vtkRenderStepsPass vtkSimpleMotionBlurPass Example of motion blur.
Rainbow(cxx) vtkLookupTable Use and manipulation of vtkLookupTables.
Rotations(cxx) vtkActor::RotateX,Y,Z vtkRenderer::EraseOff Rotations of a cow about her axes.
SpecularSpheres(cxx) vtkProperty Demonstrates the effect of specular lighting on spheres.
StripFran(cxx) vtkDecimatePro vtkStripper Triangle strip examples. (a) Structured triangle mesh consisting of 134 strips each of 390 triangles. (b) Unstructured triangle mesh consisting of 2227 strips of average length 3.94, longest strip 101 triangles. Images are generated by displaying every other triangle strip.
TransformSphere(cxx) vtkSphereSource vtkElevationFilter vtkTransform vkTransformFilter The addition of a transform filter to ColoredSphere.
WalkCow(cxx) vtkBYUReader renWin::EraseOff() vtkActor This generates Figs. 3-31, 3-32, 3-33 found in VTKTextbook.pdf.

Texture Mapping

Example Name Classes Demonstrated Description Image
AnimateVectors(cxx) vtkTexture vtkGlyph3D One frame from a vector field animation using texture maps.
TextureCutQuadric(cxx) vtkBooleanTexture vtkImplicitTextureCoords Cut a quadric with boolean textures.
TextureCutSphere(cxx) vtkImplicitTextureCoords Examples of texture thresholding. (b) Boolean combination of two planes to cut nested spheres.
TexturePlane(cxx) vtkTexture Example of texture mapping.
TextureThreshold(cxx) vtkTexture vtkThresholdTextureCoords vtkStructuredGridGeometryFilter Demonstrate the use of scalar thresholds to show values of flow density on three planes.

Visualization

Example Name Classes Demonstrated Description Image
AlphaFrequency(cxx) vtkLinearExtrusionFilter vtkVectorText Linearly extrude fonts to show letter frequencies in text.
AnatomicalOrientation(cxx) vtkAnnotatedCubeActor vtkAxesActor vtkOrientationMarkerWidget vtkTransform Show a labelled set of anatomical planes transecting a human figure.
AssignCellColorsFromLUT(cxx) vtkNamedColors vtkPlaneSource vtkLookupTable vtkColorTransferFunction Demonstrates how to assign colors to cells in a vtkPolyData structure using lookup tables.
Blow(cxx) vtkUnstructuredGridReader vtkWarpVector vtkConnectivityFilter Ten frames from a blow molding finite element analysis.
BluntStreamlines(cxx) vtkStructuredGridGeometryFilter vtkStreamTracer Demonstrates airflow around a blunt fin using streamlines.
Camera(cxx) vtkCamera Positioning and aiming the camera.
CameraModel1(cxx) vtkCameraActor Illustrate camera movement.
CameraModel2(cxx) vtkCameraActor Illustrate camera movement.
CarotidFlow(cxx) vtkStreamTracer vtkThresholdPoints Visualizing blood flow in the human carotid arteries. Streamtubes of flow velocity are generated.
CarotidFlowGlyphs(cxx) vtkGlyph3D vtkThresholdPoints Visualizing blood flow in human carotid arteries. Cone glyphs indicate flow direction and magnitude.
ClampGlyphSizes vtkGlyph3D Use vtkGlyph3D with ClampingOn to limit glyph sizes
ClipSphereCylinder(cxx) vtkImplicitBoolean vtkClipPolyData A plane clipped with a sphere and an ellipse. The two transforms place each implicit function into the appropriate position. Two outputs are generated by the clipper.
ColorActor vtkActor::GetProperty()::SetColor Colour the actor.
CombustorIsosurface(cxx) vtkContourFilter Marching cubes surface of flow density.
ComplexV(cxx) vtkHedgeHog ComplexV from the VTK Textbook.
ContourQuadric(cxx) vtkQuadric vtkSampleFunction vtkContourFilter Contouring a quadric function.
CreateBFont(cxx) vtkClipPolyData vtkImageDataGeometryFilter A scanned image clipped with a scalar value of 1/2 its maximum intensity produces a mixture of quadrilaterals and triangles.
CubeAxesActor(cxx) vtkCubeAxesActor
CurvatureBandsWithGlyphs(cxx) vtkCurvatures vtkBandedPolyDataContourFilter vtkLookupTable vtkColorSeries vtkGlyph3D Demonstrates the coloring of a surface by partitioning the gaussian curvature of a surface into bands and using arrows to display the normals on the surface.
CutStructuredGrid(cxx) vtkCutter Cut through structured grid with plane. The cut plane is shown solid shaded. A computational plane of constant k value is shown in wireframe for comparison. The colors correspond to flow density. Cutting surfaces are not necessarily planes: implicit functions such as spheres, cylinders, and quadrics can also be used.
Cutter(cxx) vtkCutter
DecimateFran(cxx) vtkDecimatePro Examples of decimation algorithm. (a) Decimation of laser digitizer data.
DecimateHawaii(cxx) vtkDecimatePro Examples of decimation algorithm. (b) Decimation of terrain data.
DisplacementPlot(cxx) vtkColorTransferFunction vtkWarpVector vtkVectorDot Show modal lines for a vibrating beam.
ElevationBandsWithGlyphs(cxx) vtkBandedPolyDataContourFilter vtkLookupTable vtkColorSeries vtkGlyph3D Demonstrates the coloring of a surface by partitioning the elevation into bands and using arrows to display the normals on the surface.
ExponentialCosine(cxx) vtkWarpScalar Carpet plots. Visualization of an exponential cosine function. Function values are indicated by surface displacement. Colors indicate derivative values.
GlyphTable vtkGlyph3D Vary the shapes of glyphed points using a glyph table
Hanoi(cxx) Towers of Hanoi.
Hawaii(cxx) vtkElevationFilter vtkColorSeries vtkLookupTable Visualize elevations by coloring the scalar values with a lookup table.
HardwareSelector vtkHardwareSelector
HeadBone(cxx) vtkMarchingCubes Marching cubes surface of human bone.
HeadSlice(cxx) vtkContourFilter Marching squares used to generate contour lines.
HyperStreamline(cxx) vtkHyperStreamline Example of hyperstreamlines, the four hyperstreamlines shown are integrated along the minor principle stress axis. A plane (colored with a different lookup table) is also shown.
InteractorStyleTrackballActor vtkInteractorStyleTrackBallActor
InteractorStyleTrackballCamera vtkInteractorStyleTrackBallCamera
IronIsoSurface(cxx) vtkContourFilter Marching cubes surface of iron-protein.
Kitchen(cxx) vtkStreamTracer vtkStructuredGrid Demonstrates stream tracing in a kitchen.
LoopShrink(cxx) A network with a loop. VTK 5.0 does not allow you to execute a looping visualization network; this was possible in previous versions of VTK.
Motor(cxx) vtkBYUReader vtkStructuredPointsReader vtkTexture vtkImplicitTextureCoords Texture cut used to reveal internal structure of a motor. Two cut planes are used in combination with transparent texture.
MultipleViewports(cxx) vtkRenderer::SetViewport
NamedColors(cxx) vtkNamedColors Demonstrates how to use the vtkNamedColors class.
NamedColorPatches(cxx) vtkNamedColors Creates a HTML file called VTKNamedColorPatches
NormalsDemo(cxx) vtkPolyDataNormals Demo different options to generate normals.
Office(cxx) vtkPointSource vtkStreamTracer Using random point seeds to create streamlines.
OfficeTube(cxx) vtkStreamTracer vtkTubeFilter The stream polygon. Sweeping a polygon to form a tube.
OrientedGlyphs(cxx) vtkGlyph3D Create oriented glyphs from vector data.
PineRootConnectivity(cxx) vtkMCubesReader vtkPolyDataConnectivityFilter Applying the connectivity filter to remove noisy isosurfaces.
PineRootDecimation(cxx) vtkMCubesReader vtkDecimatePro vtkConnectivityFilter Applying the decimation and connectivity filters to remove noisy isosurfaces and reduce data size.
PlateVibration(cxx) vtkWarpVector vtkVectorDot Demonstrates the motion of a vibrating beam.
PointDataSubdivision(cxx) vtkLinearSubdivisionFilter Vary the shapes of glyphed points using a programmable glyph filter
ProbeCombustor(cxx) vtkProbeFilter Probing data in a combustor. Probes are regular arrays of 50 by 50 points that are then passed through a contouring filter.
PseudoVolumeRendering(cxx) vtkCutter vtkContourFilter 100 cut planes with opacity of 0.05. Rendered back-to-front to simulate volume rendering.
QuadraticSurface(cxx) vtkQuadric
QuadricVisualization(cxx) vtkQuadric vtkSampleFunction vtkContourFilter Visualizing a quadric function.
SingleSplat(cxx) vtkGaussianSplatter Elliptical splatting. (a) Single elliptical splat with eccentricity E=10. Cone shows orientation of vector.
SpikeFran(cxx) vtkGlyph3D Glyphs indicate surface normals on model of human face. Glyph positions are randomly selected.
SplatFace(cxx) vtkGaussianSplatter Elliptical splatting. (b) Surface reconstructed using elliptical splats into 100^3 volume followed by isosurface extraction. Points regularly subsampled and overlaid on original mesh.
SphereTexture vtkTextureMapToSphere Apply an ImageData texture to an sphere
Streamlines(cxx) vtkStreamLine Seed streamlines with vectors from a structured grid
StreamlinesWithLineWidget(cxx) vtkCallbackCommand vtkLineWidget Using the vtkLineWidget to produce streamlines in the combustor dataset. The StartInteractionEvent turns the visibility of the streamlines on; the InteractionEvent causes the streamlines to regenerate themselves.
TensorAxes(cxx) vtkPointLoad vtkTensorGlyph Display the scaled and oriented principal axes of the stress tensor.
TensorEllipsoids(cxx) vtkPointLoad vtkTensorGlyph Display the scaled and oriented principal axes as tensor ellipsoids representing the stress tensor.
TextSource(cxx) vtkTextSource
UnstructuredTransientVolumeRendering vtkUnstructuredGridVolumeRayCastMapper
VelocityProfile(cxx) vtkMultiBlockPLOT3DReader vtkStructuredGridGeometryFilter vtkAppendPolyData vtkWarpVector Warping the geometry of three planes to show flow momentum.
VectorText(cxx) vtkVectorText Display high resolution text.
WarpCombustor(cxx) vtkWarpScalar vtkMultiBlockPLOT3DReader Carpet plots. Carpet plot of combustor flow energy in a structured grid. Colors and plane displacement represent energy values.
WindowTitle(cxx) vtkRenderWindow::SetWindowName

Working with Images

Example Name Classes Demonstrated Description Image
BackgroundImage(cxx) vtkJPEGReader vtkImageCanvasSource2D vtkImageActor vtkSuperquadricSource Display an image as the "background" of a scene, and render a superquadric in front of it.

Image Processing

Example Name Classes Demonstrated Description Image
ImageWarp(cxx) vtkBMPReader vtkImageLuminance vtkWarpScalar vtkMergeFilter Combine the imaging and visualization pipelines to deform an image in the z-direction. The vtkMergeFilter is used to combine the warped surface with the original color data.
ImageGradient(cxx) vtkImageMagnify vtkImageGaussianSmooth vtkImageGradient vtkImageEuclideanToPolar vtkImageExtractComponents vtkImageHSVToRGB Create an imaging pipeline to visualize gradient information.

Working with vtkImageData

Example Name Classes Demonstrated Description Image
SumVTKImages vtkImageWeightedSum A function to simplify the summing of images, where you can pass a list of images and
WriteReadVtkImageData vtkImageData vtkXMLImageDataReader vtkXMLImageDataWriter

Working with ExodusII Data

Example Name Classes Demonstrated Description Image
ReadExodusData vtkExodusIIReader A simple script for reading and viewing ExodusII data interactively.

Graphs

Example Name Classes Demonstrated Description Image
EdgeWeights(cxx) vtkMutableDirectedGraph vtkGraphLayoutView
NOVCAGraph(cxx) vtkUnstructuredGrid vtkXMLUnstructuredGridWriter
SelectedVerticesAndEdges(cxx) vtkAnnotationLink vtkGraphLayoutView
VisualizeGraph(cxx) vtkMutableDirectedGraph vtkGraphLayoutView

Volume Rendering

Example Name Classes Demonstrated Description Image
SimpleRayCast(cxx) vtkFixedPointVolumeRayCastMapper Volume rendering of a high potential iron protein.

User Interaction

Example Name Classes Demonstrated Description Image
CallBack(cxx) vtkCallbackCommand vtkOrientationMarkerWidget Setting up a callback with client data. Two different methods are demonstrated.
HighlightPickedActor vtkPropPicker vtkInteractorStyleTrackballCamera Pick and highlight an actor based on mouse clicks.
MouseEventsObserver(cxx) vtkCallbackCommand Use an observer.
MouseEvents(cxx) vtkInteractorStyleTrackballCamera Subclass the interactor style.

Infovis

Example Name Classes Demonstrated Description Image
ParallelCoordinatesExtraction vtkExtractSelection vtkAnnotationLink Extract data based on a selection in a Parallel Coordinates View
ParallelCoordinatesView(cxx) vtkRTAnalyticSource vtkParallelCoordinatesView vtkParallelCoordinatesRepresentation Plotting data attributes in a Parallel Coordinates View
ScatterPlot(cxx) vtkChartXY
SelectedGraphIDs vtkAnnotationLink vtkRandomGraphSource vtkGraphLayoutView Callback on vtkAnnotationLink in a Graph Layout View when selection is changed
SpiderPlot(cxx) vtkSpiderPlotActor

Geovis

Example Name Classes Demonstrated Description Image
GeoAssignCoordinates(cxx) vtkGeoAssignCoordinates vtkMutableDirectedGraph vtkGraphMapper Draws a sphere, based on longituds and latitudes.

Widgets

Example Name Classes Demonstrated Description Image
BalloonWidget(cxx) vtkBalloonWidget vtkBalloonRepresentation Uses a vtkBalloonWidget to draw labels when the mouse stays above an actor.
BoxWidget(cxx) vtkBoxWidget This 3D widget defines a region of interest that is represented by an arbitrarily oriented hexahedron with interior face angles of 90 degrees (orthogonal faces). The object creates 7 handles that can be moused on and manipulated.
CompassWidget vtkCompassWidget vtkCompassRepresentation Draws an interactive compass.
ContourWidget(cxx) vtkContourWidget vtkOrientedGlyphContourRepresentation Draw a contour (line) which can be deformed by the user
OrientationMarkerWidget(cxx) vtkAnnotatedCubeActor vtkOrientationWidget Draws two cubes. One of them can be clicked to be rotated, and will rotate the second one. The second one has annotations on it, and can also be moved.
ScalarBarWidget vtkScalarBarWidget The ScalarBarWidget displays a scalar bar that is movable and changes orientation automatically when close to the borders of the image. It needs a ScalarBarActor
SphereWidget(cxx) vtkSphereWidget This 3D widget defines a sphere that can be interactively placed in a scene.
TextWidget(cxx) vtkTextWidget Annotate a VTK image with movable text

Utilities

Example Name Classes Demonstrated Description Image
Delaunay2D(cxx) vtkDelaunay2D
LUTUtilities(cxx) vtkLookupTable vtkColorSeries A utility class for vtkLookupTable allowing you to output the table contents or to compare tables.
Screenshot(cxx) vtkWindowToImageFilter
Variant(cxx) vtkVariant
VTKWithNumpy vtkImageImport
VTKVersion vtkVersion

Animation

Example Name Classes Demonstrated Description Image
Animation(cxx) vtkRenderWindowInteractor Move a sphere across a scene.

PyQt

Example Name Classes Demonstrated Description Image
EmbedInPyQt vtkRenderWindowInteractor Shows how to easily embed VTK in PyQt with QVTKRenderWindowInteractor, first example
EmbedInPyQt2 vtkRenderWindowInteractor Shows how to embed VTK in PyQt with QVTKRenderWindowInteractor, second example