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!
Hello World
Simple Operations
Output
Working with Arrays
Geometric Objects
Display
Parametric Objects
Example Name |
Classes Demonstrated |
Description |
ParametricObjectsDemo |
vtkParametricBoy, vtkParametricConicSpiral, vtkParametricCrossCap, vtkParametricDini, vtkParametricEllipsoid, vtkParametricEnneper, vtkParametricFigure8Klein, vtkParametricKlein, vtkParametricMobius, vtkParametricRandomHills, vtkParametricRoman, vtkParametricSpline, vtkParametricSuperEllipsoid, vtkParametricSuperToroid, vtkParametricTorus |
All the objects are displayed in a 4X4 array. |
ParametricObjects |
|
Uncomment the object that you wish to be displayed. |
Implicit Functions
Working with PolyData
Example Name |
Classes Demonstrated |
Description |
BooleanOperationPolyDataFilter |
vtkBooleanOperationPolyDataFilter |
This example performs a boolean operation (Intersection, Union, Difference) of two PolyData |
ColoredTriangle |
vtkTriangle |
|
CombinePolyData |
vtkAppendPolyData |
This example combines Polydata objects, and displays the result to the screen. |
CurvaturesDemo |
vtkCurvatures, vtkColorTransferFunction |
Demonstrates how to get the Gaussian and Mean curvatures of a surface. |
DottedLine |
vtkActor::GetProperty::SetLineStipplePattern |
|
FilledPolygon |
vtkCutter |
|
ImplicitPolyDataDistance |
vtkImplicitPolyDataDistance |
|
IterativeClosestPoints |
vtkIterativeClosestPointTransform |
|
KochSnowflake |
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 |
|
MeshLabelImage |
vtkDiscreteMarchingCubes |
|
Outline |
vtkOutlineFilter |
|
PolyDataContourToImageData |
vtkLinearExtrusionFilter,vtkPolyDataToImageStencil |
|
PolyDataToImageDataStencil |
vtkPolyDataToImageStencil |
|
RotationAroundLine |
vtkTransformPolyDataFilter |
|
RuledSurfaceFilter |
vtkRuledSurfaceFilter |
|
SolidColoredTriangle |
vtkTriangle |
|
SubdivisionFilters |
vtkLoopSubdivisionFilter |
vtkButterflySubdivisionFilter |
TriangleColoredPoints |
vtkUnsignedCharArray |
|
TriangleCornerVertices |
vtkCellArray |
|
TriangleCorners |
vtkXMLPolyDataWriter |
|
WarpVectorpy |
vtkLine, vtkDoubleArray, vtkPolyData, vtkWarpVector |
This example warps/deflects a line. |
WriteTriangleToFile |
vtkTriangle |
|
py |
vtkPolyData |
|
Working with 3D Data
Working with Structured 3D Data
This section includes vtkImageData, vtkStructuredGrid, and vtkRectilinearGrid.
Working with Meshes
This section includes examples of manipulating meshes.
Miscellaneous
Visualization
Example Name |
Classes Demonstrated |
Description |
Animation |
vtkTimerCallback |
|
AssignCellColorsFromLUT |
vtkNamedColors, vtkPlaneSource, vtkLookupTable, vtkColorTransferFunction |
Demonstrates how to assign colors to cells in a vtkPolyData structure using lookup tables. |
Camera |
vtkCamera |
|
ClampGlyphSizes |
vtkGlyph3D |
Use vtkGlyph3D with ClampingOn to limit glyph sizes |
ColorActor |
vtkActor::GetProperty()::SetColor |
|
CubeAxesActor |
vtkCubeAxesActor |
|
CurvatureBandsWithGlyphs |
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. |
ElevationBandsWithGlyphs |
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. |
GlyphTable |
vtkGlyph3D |
Vary the shapes of glyphed points using a glyph table |
HardwareSelector |
vtkHardwareSelector |
|
InteractorStyleTrackballActor |
vtkInteractorStyleTrackBallActor |
|
InteractorStyleTrackballCamera |
vtkInteractorStyleTrackBallCamera |
|
MultipleViewports |
vtkRenderer::SetViewport |
|
NamedColorPatches |
vtkNamedColors |
Creates a HTML file called VTKNamedColorPatches.html showing the available colors in the vtkNamedColors class. |
NamedColors |
vtkNamedColors |
Demonstrates how to use the vtkNamedColor class |
PointSize |
vtkActor::GetProperty()::SetPointSize |
|
ProgGlyph |
vtkProgrammableGlyphFilter |
Vary the shapes of glyphed points using a programmable glyph filter |
QuadraticSurface |
vtkQuadric |
|
SphereTexture |
vtkTextureMapToSphere |
Apply an ImageData texture to an sphere |
Streamlines |
vtkStreamLine |
Seed streamlines with vectors from a structured grid |
TextSource |
vtkTextSource |
|
UnstructuredTransientVolumeRendering |
vtkUnstructuredGridVolumeRayCastMapper |
|
WindowTitle |
vtkRenderWindow::SetWindowName |
|
Working with vtkImageData
Working with ExodusII Data
Example Name |
Classes Demonstrated |
Description |
Read |
vtkExodusIIReader |
A simple script for reading and viewing ExodusII data interactively. |
Graphs
User Interaction
Infovis
Geovis
Utilities
Web
Example Name |
Classes Demonstrated |
Description |
RemoteRenderer |
Web/Python |
Use vtk to show an interactive visualization on a web page. Remote rendering. |
PyQt