VTK/Examples/Cxx

From KitwarePublic
< VTK‎ | Examples
Jump to: navigation, search

Please try the new VTKExamples website.

These are fully independent, compilable examples. There is significant overlap in the examples, but they are each intended to illustrate a different concept and be fully stand alone compilable.

NOTE: The example links now go to the new VTKExamples website.

Hello World

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

Simple Operations

Example Name VTK Classes Demonstrated Description
DistancePointToLine Distance between a point and a line vtkLine
DistanceBetweenPoints Distance between two points vtkMath::Distance2BetweenPoints Computes the distance between two points
UniformRandomNumber Random number (uniform distribution) vtkMath Generates uniform random numbers
GaussianRandomNumber Random number (Gaussian distribution) vtkMath Generates Gaussian random numbers
RandomSequence Random sequence vtkMinimalStandardRandomSequence This is the preferred way to generate random numbers.
ProjectPointPlane Project a point onto a plane vtkPlane Project a point onto a plane
FloatingPointExceptions Floating Point Exceptions vtkFloatingPointExceptions Floating Point Exceptions
PerspectiveTransform Apply a perspective transformation to a point vtkPerspectiveTransform

Input and Output

Graph Formats

3D File Formats

Example Name VTK Classes Demonstrated Description
ConvertFile Convert a file from one type to another
XGMLReader Read a .gml file vtkXGMLReader

Standard Formats

Input
Example Name VTK Classes Demonstrated Description
SimplePointsReader Read a simple "xyz" file of points vtkSimplePointsReader
ParticleReader Read an "xyza" file vtkParticleReader This example reads ascii files where each line consists of points with its position (x,y,z) and (optionally) one scalar or binary files in RAW 3d file format
ReadTextFile Read a plain text file into a polydata vtkPolyData Manually read a file using getline()
ReadPlainTextTriangles Read a plain text file into a polydata vtkPolyData vtkSmartPointer vtkPoints vtkCellArray vtkXMLPolyDataWriter Manually read a plain text file format
DelimitedTextReader Read a delimited file into a polydata vtkDelimitedTextReader
ReadOBJ Read an OBJ (.obj) File vtkOBJReader
VRML Read a VRML (WRL) file vtkVRMLImporter
IndividualVRML Read individual VRML (WRL) actors vtkVRMLImporter This example is used to get each actor and object from a scene and verify axes correspondence
ReadDICOM Read DICOM file vtkDICOMImageReader
ReadDICOMSeries Read a series of DICOM images vtkDICOMImageReader This example demonstrates how to read a series of DICOM images and scroll through slices
DumpXMLFile Report the contents of a VTK XML or legacy file vtkDataSetReader
DEMReader Read DEM (elevation map) files vtkDEMReader
ReadSTL Read stereo lithography STL (.stl) files vtkSTLReader
ReadPLY Read PLY (.ply) files vtkPLYReader
ReadPLOT3D Read PLOT3D (.bin) files vtkPLOT3DReader Read CFD (computational fluid dynamics) data produced by PLOT3D.
ReadPDB Read Protein Data Bank files (.pdb) files vtkPDBReader Read Protein Data Bank Files.
Output
Example Name VTK Classes Demonstrated Description
SimplePointsWriter Write a simple ".xyz" file vtkSimplePointsWriter
WriteSTL Write stereo lithography STL (.stl) files vtkSTLWriter
WritePLY Write PLY (.ply) files vtkPLYWriter
DelimitedTextWriter Write data to a delimited file vtkDelimitedTextWriter

VTK Formats

Input
Example Name VTK Classes Demonstrated Description
ReadUnstructuredGrid Read an unstructured grid (.vtu) file vtkXMLUnstructuredGridReader
ReadPolyData Read a polygonal data (.vtp) file vtkXMLPolyDataReader
ReadImageData Read a image data (.vti) file vtkXMLImageDataReader
ReadStructuredGrid Read a structured grid (.vts) file vtkXMLStructuredGridReader
ReadRectilinearGrid Read a rectilinear grid (.vtr) file vtkXMLRectilinearGridReader
ReadUnknownTypeXMLFile Read an XML file and later decide what kind it is vtkXMLGenericDataObjectReader
Output
Example Name VTK Classes Demonstrated Description
WriteVTU Write a .vtu file vtkXMLUnstructuredGridWriter VTU is an "Unstructured Grid". This format allows for 3D data to be stored.
WriteVTP Write a .vtp file vtkXMLPolyDataWriter VTP is a "PolyData". This format allows for the most complex geometric objects to be stored.
WriteVTI Write a .vti file vtkXMLImageDataWriter VTI is an "ImageData".
XMLStructuredGridWriter Write a .vts file from a vtkStructuredGrid vtkXMLStructuredGridWriter

Legacy VTK Formats

Example Name VTK Classes Demonstrated Description
GenericDataObjectReader Read any type of legacy .vtk file vtkGenericDataObjectReader
StructuredGridReader Read a structured grid (.vtk) file vtkStructuredGridReader
StructuredPointsReader StructuredPointsReader vtkStructuredPointsReader

Image Formats

Input

Example Name VTK Classes Demonstrated Description
ReadBMP Read BMP (.bmp) files vtkBMPReader
JPEGReader Read a JPG image vtkJPEGReader
PNGReader Read a PNG image vtkPNGReader
ReadPNM Read PNM (.pnm) files vtkPNMReader
ReadTIFF Read TIFF (.tif) files vtkTIFFReader
MetaImageReader Read .mha files vtkMetaImageReader
ImageReader2Factory Read most standard image formats. vtkImageReader2Factory This class tries to find an appropriate reader. It is very convenient to use this when you don't know what kind of file to expect.

Output

Example Name VTK Classes Demonstrated Description
WriteBMP Write a BMP (.bmp) file vtkBMPWriter
JPEGWriter Write a JPEG (.jpg) file vtkJPEGWriter
WritePNG Write a PNG (.png) file vtkPNGWriter
WritePNM Write a PNM (.pnm) file vtkPNMWriter
WriteTIFF Write a TIFF (.tif) file vtkTIFFWriter
MetaImageWriter Write a .mha/.mhd + .raw file vtkMetaImageWriter

Geometric Objects

Example Name VTK Classes Demonstrated Description
Cell3DDemonstration Demonstrate the use of vtkCell3D to construct geometric objects. vtkHexagonalPrism vtkHexahedron vtkPentagonalPrism vtkPolyhedron vtkPyramid vtkTetra vtkVoxel vtkWedge vtkUnstructuredGrid Sample objects are generated from the classes derived from vtkCell3D and displayed.
PolygonIntersection Compute the intersection of a line segment with a polygon vtkPolygon IntersectWithLine()
GeometricObjectsDemo A demonstration of all geometric objects that work the same way
Arrow Arrow vtkArrowSource
Axes Axes vtkAxesActor
|Colored Lines vtkCellData vtkLine
Cone Cone vtkConeSource
Cube Cube vtkCubeSource
Cylinder Cylinder vtkCylinderSource
Disk Disk vtkDiskSource A circle with a hole in it.
Dodecahedron Dodecahedron vtkPolyhedron Create a dodecahedron using vtkPolyhedron
Frustum Frustum vtkFrustumSource
Line Line vtkLineSource
LongLine Manually create a polyline vtkLine
Hexahedron Hexahedron vtkHexahedron
OrientedArrow Oriented Arrow vtkArrowSource Orient an arrow along an arbitrary vector
OrientedCylinder Oriented Cylinder vtkCylinderSource Orient a cylinder along an arbitrary vector
Plane Plane vtkPlaneSource
Planes Planes vtkPlanes
PlanesIntersection PlanesIntersection vtkPlanesIntersection
PlatonicSolid PlatonicSolid vtkPlatonicSolidSource
Point Point vtkPoints
Polyhedron Polyhedron vtkPolyhedron
Polygon Polygon vtkPolygon
Pyramid Pyramid vtkPyramid
PolyLine PolyLine vtkPolyLine
Quad Quad vtkQuad
RegularPolygonSource Regular Polygon vtkRegularPolygonSource
Sphere Sphere vtkSphereSource
Triangle Triangle vtkTriangle
TriangleStrip Triangle strip vtkTriangleStrip
Tetrahedron Tetrahedron vtkTetra
Vertex Vertex vtkVertex

Parametric Objects

These examples demonstrate how to create an display one of the many vtkParametric* objects. All of the classes listed can be used in an identical fashion.

Example Name VTK Classes Demonstrated Description
ParametricObjects Create and display a parametric object Uncomment the object that you wish to be displayed.
ParametricObjectsDemo Demonstration of of the vtkParametric* classes added by Andrew Maclean vtkParametricBoy, vtkParametricConicSpiral, vtkParametricCrossCap, vtkParametricDini, vtkParametricEllipsoid, vtkParametricEnneper, vtkParametricFigure8Klein, vtkParametricKlein, vtkParametricMobius, vtkParametricRandomHills, vtkParametricRoman, vtkParametricSpline, vtkParametricSuperEllipsoid, vtkParametricSuperToroid, vtkParametricTorus All the objects are displayed in a 4X4 array.
ParametricObjectsDemo2 Demonstration of additional vtkParametric* classes added by Tim Meehan vtkParametricBohemianDome, vtkParametricBour, vtkParametricCatalanMinimal, vtkParametricHenneberg, vtkParametricKuen, vtkParametricPluckerConoid, vtkParametricPseudosphere All the objects are displayed in a 4X2 array.
ParametricKuenDemo Interactively change the parameters for a Kuen Surface.

vtkParametricKuen

Shows how to interact with parameters for a parametric surface.
ParametricSuperEllipsoidDemo Interactively change the parameters for a SuperEllipsoid Surface.

vtkParametricSuperEllipsoid

Shows how to interact with parameters for a parametric surface.
ParametricSuperToroidDemo Interactively change the parameters for a SuperToroid Surface.

vtkParametricSuperToroid

Shows how to interact with parameters for a parametric surface.

Implicit Functions and Iso-surfaces

Example Name VTK Classes Demonstrated Description
IsoContours Visualize different isocontours using a slider vtkContourFunction isosurface
SampleFunction Sample and visualize an implicit function vtkSampleFunction
ExtractLargestIsosurface Extract largest isosurface vtkPolyDataConnectivityFilter
BandedPolyDataContourFilter BandedPolyDataContourFilter vtkBandedPolyDataContourFilter
FilledContours Create filled contours (vtkClipPolyData) vtkContourFilter
CutWithCutFunction Cut a surface with vtkCutter vtkCutter Cut a surface with an implicit plane using vtkCutter
CutWithScalars Cut a surface with scalars vtkContourFilter Cut a surface with an implicit plane using vtkContourFilter
ImplicitSphere An implicit representation of a sphere vtkSphere
MarchingCubes Marching cubes vtkMarchingCubes Create a voxelized sphere
MarchingSquares Marching squares vtkMarchingSquares Create a contour from a structured point set (image)

Working with 3D Data

Example Name VTK Classes Demonstrated Description
SelectionSource Specify a selection vtkSelectionSource, vtkExtractSelection
WarpTo Bend an object vtkWarpTo
CenterOfMass Compute the center of mass of the points CenterOfMass
BooleanOperationPolyDataFilter Perform boolean operations on two vtkPolyData objects BooleanOperationPolyDataFilter
DistancePolyDataFilter Compute the distance function from one vtkPolyData to another DistancePolyDataFilter
ImplicitPolyDataDistance Compute the distance function in a space around a vtkPolyData ImplicitPolyDataDistance
IntersectionPolyDataFilter Compute the intersection of two vtkPolyData objects IntersectionPolyDataFilter
ShrinkPolyData Move all items in a PolyData towards their centroid vtkShrinkPolyData
VectorFieldNonZeroExtraction Extract non-zero vectors from a vtkImageData vtkExtractSelectedThresholds
MultiBlockMergeFilter Combine MultiBlockDataSets vtkMultiBlockMergeFilter, vtkMultiBlockDataSet
IterateOverLines Iterate through the lines of a PolyData vtkCellArray
AlignFrames Align coordinate frames vtkLandmarkTransform
WarpVector vtkWarpVector vtkWarpVector
FindAllArrayNames Get the names of all of the data arrays vtkPolyData
PolyDataGetPoint Get point locations/coordinates from a vtkPolyData vtkPolyData
NullPoint NullPoint vtkPointData Set everything in PointData at a specified index to NULL
ContoursFromPolyData Create contours from PolyData vtkCutter
ImplicitBoolean OperationsOnImplicitFunctions vtkImplicitBoolean Operations include intersection and union.
ConnectivityFilter Color any dataset type based on connectivity vtkConnectivityFilter
AppendFilter Append different types of data vtkAppendFilter
PerlinNoise Perlin Noise vtkPerlinNoise
Circle Create a circle vtkCutter Create a circle by cutting through a sphere.
ProgrammableFilter Create a custom filter without subclassing vtkProgrammableFilter
TransformPolyData Apply a Transformation to a PolyData vtkTransformPolyDataFilter
CombinePolydata Combine/Append PolyData vtkAppendPolyData
RuledSurfaceFilter Create a surface between lines vtkRuledSurfaceFilter
CleanPolyData Remove coincident points vtkCleanPolyData
CellPointNeighbors Determine which cells share a single point with a specific cell vtkPolyData::GetCellNeighbors connected
CellEdgeNeighbors Determine which cells share an edge with a specific cell vtkPolyData::GetCellNeighbors connected
PolyDataIsoLines Iso lines on the surface of a polydata vtkBandedPolyDataContourFilter
KMeansClustering KMeans Clustering vtkKMeansStatistics
PKMeansClustering Parallel KMeans Clustering vtkPKMeansStatistics
WarpScalar Move vertices along normals vtkWarpScalar
VertexConnectivity Get a list of vertices attached (through an edge) to a vertex vtkPolyData::GetCellPoints Vertex connectivity (connected, neighbor)
DeletePoint DeletePoint vtkPoints, vtkPolyData
ThinPlateSplineTransform ThinPlateSplineTransform vtkThinPlateSplineTransform
PointCellIds Generate point and cell id arrays vtkIdFilter
Reflection Mirror a DataSet vtkReflectionFilter
CellCenters Compute points at the center of every cell vtkCellCenters
ExtractSelection Extract selection points vtkExtractSelection
ExtractSelectedIds Extract selected points vtkExtractSelectedIds extract point, select point
ExtractSelectionOriginalId Extract selection and find correspondence between new and original Id vtkExtractSelection
ExtractSelectionCells Extract selection cells vtkExtractSelection extract cell, select cell
ExtractCellsUsingPoints Extract points but bring cells that are still complete with them vtkExtractSelection, vtkSelection, vtkSelectionNode
QuantizePolyDataPoints Snap (quantize) points to a grid vtkQuantizePolyDataPoints
vtkReverseSense Flip normals vtkReverseSense
vtkPointsProjectedHull Convex hull of points projected onto the coordinate planes vtkPointsProjectedHull
SCurveSpline Create an SCurve spline on a set of points vtkSCurveSpline
KochanekSpline Create an Kochanek spline on a set of points vtkKochanekSpline
ParametricSpline Create a Cardinal spline on a set of points vtkCardinalSpline, vtkParametricSpline, vtkParametricFunctionSource
SelectVisiblePoints Select visible points vtkSelectVisiblePoints
ExtractVisibleCells Extract and highlight visible cells vtkHardwareSelector
vtkStripper Convert triangles to triangle strips vtkStripper
DataSetSurfaceFilter Convert vtkUnstructuredGrid to vtkPolyData vtkDataSetSurfaceFilter
GeometryFilter Convert vtkUnstructuredGrid to vtkPolyData (another way) vtkGeometryFilter
ImplicitModeller Compute the distance from an object to every point on a uniform grid vtkImplicitModeller
TransformFilter Transform a data set vtkTransformFilter
InterpolateTerrain Interpolate terrain vtkProbeFilter Here is a good explanation of what is going on.
InterpolateMeshOnGrid Interpolate a mesh over a grid vtkProbeFilter
PolyDataPointSampler Sample a PolyData vtkPolyDataPointSampler Sample the edges or surfaces of a polydata.
MaskPoints Select a subset (mask) of a point set vtkMaskPoints
LinearExtrusion Linear Extrusion vtkLinearExtrusionFilter Extrude a shape.
RotationAroundLine Rotation around a line vtkTransform, vtkTransformPolyDataFilter
ExtractOutsideSurface Extract the outer surface of a multiple surface polydata vtkPolyDataConnectivityFilter
ContoursToSurface vtkVoxelContoursToSurfaceFilter vtkVoxelContoursToSurfaceFilter
TubeFilter vtkTubeFilter vtkTubeFilter Give lines a thickness (produce a cylinder around lines.
RibbonFilter vtkRibbonFilter vtkRibbonFilter
ShrinkWrap Convex hull using shrink wrapping vtkSmoothPolyDataFilter
vtkHull Convex hull using vtkHull vtkHull
PointInsideObject Check if a point is inside an object vtkSelectEnclosedPoints
PointInsideObject2 Check if a point is inside an object (alternate method) vtkDelaunay3D, vtkPolyData::FindCell This uses a Delaunay triangulation to compute a volume. This gives more of an "is inside convex hull" effect than an "is inside object".
DataBounds Data Bounds vtkPolyData::GetBounds Get the minimum and maximum value in each dimension. (Axis aligned bounding box)
TransformOrder Demonstrate how the order of applying transforms affects the result vtkTransformPolyDataFilter
Outline Outline vtkOutlineFilter Draw the bounding box of the data
TriangleArea Triangle Area vtkTriangle::TriangleArea Compute the area of all triangles in a polydata.
Silhouette Silhouette vtkPolyDataSilhouette
ThresholdingPoints Thresholding Points vtkThresholdPoints
ThresholdingCells Thresholding Cells vtkThreshold
ProcrustesAlignmentFilter Align point sets vtkProcrustesAlignmentFilter
GradientFilter Compute the gradient of a scalar field on a data set vtkGradientFilter
PolyDataToImageData Generate a binarized volume from a closed surface vtkPolyDataToImageStencil
PolyDataContourToImageData Generate a binarized image from a closed contour vtkLinearExtrusionFilter,vtkPolyDataToImageStencil
ExtractPolyLinesFromPolyData Extract polylines from polydata vtkPolyData
FitSplineToCutterOutput Fit a spline to cutter output vtkKochanekSpline, vtkSplineFilter, vtkSpline
MergePoints Remove duplicate (merge) points vtkMergePoints Insert unique point
DecimatePolyline Decimate polyline vtkDecimatePolylineFilter
FieldData Add Global Miscellaneous Data (FieldData) to a Polydata vtkFieldData
PolyDataExtractNormals Extract Normals from a Polydata vtkPolyDataNormals
DetermineArrayDataTypes Determine data types of arrays vtkPolyData
EmbedPointsIntoVolume Embed points into a volume vtkGaussianSplatter
CopyAllArrays Copy all arrays from one vtkPolyData to another vtkPolyData
ColoredPoints Colored Points vtkUnsignedCharArray Add three points to a polydata and associate a color with each of them.
TriangleColoredPoints Triangle - Colored Points vtkUnsignedCharArray Set the color of each point of a triangle. You will be able to interpolate the colors across the triangle.
TriangleSolidColor Triangle - Solid Color vtkUnsignedCharArray Create a solid colored triangle.
ColorCells Color Cells vtkLookupTable Color individual cells of a polydata with scalar index
ColorCellsWithRGB Color Cells with RGB vtkCellData Color individual cells of a polydata with rgb colors
PolyDataCellNormals Add/Get Normals to/from cells in a Polydata vtkCellData
PolyDataPointNormals Add/Get Normals to/from points in a Polydata vtkPointData
MiscPointData Add Miscellaneous Data to Points in a Polydata vtkPointData, vtkFloatArray
GetMiscPointData Get Miscellaneous Data from Points in a Polydata vtkDoubleArray
MiscCellData Add Miscellaneous Data to Cells in a Polydata vtkCellData
GetMiscCellData Get Miscellaneous Data from Cells in a Polydata vtkCellData
ExternalContour Get the External Contour from Polydata vtkWindowToImageFilter, vtkContourFilter
TransformPipeline Combining the transformation, in order to manipulate a group of vtkActor. vtkTransform Shown in the example robot arm motion.
WarpSurface Warp a surface along its normal vtkWarpVector
ProgrammableSource Create points using a programmable source vtkProgrammableSource Generates points for a strange attractor
ProjectSphere Unroll a sphere or spherical-like model vtkProjectSphereFilter Unrolls a spherical-like model

Data Type Conversions

Example Name VTK Classes Demonstrated Description
PolyDataToUnstructuredGrid Convert a vtkPolyData to a vtkUnstructuredGrid vtkAppendFilter

Point cloud operations

Example Name VTK Classes Demonstrated Description
ExtractSurface Create a surface from Unorganized Points using Point filters vtkExtractSurface,vtkPCANormalEstimation,vtkSignedDistance
ExtractSurfaceDemo Create a surface from Unorganized Points using Point filters (DEMO) vtkExtractSurface,vtkPCANormalEstimation,vtkSignedDistance
PointSource Generate a random point cloud vtkPointSource
DownsamplePointCloud Downsample a point cloud vtkCleanPolyData Remove points so that there are no points within a tolerance of any point.
DensifyPoints Add points to a point cloud vtkDensifyPointCloudFilter Add points to a point cloud.
ExtractCluster Extract connected clusters of points vtkEuclideanClusterExtraction From a set of randomly distributed spheres, extract connected clusters.
NormalEstimation Estimate normals of a point cloud vtkPCANormalEstimation Estimate the normals of a random points that lie on a sphere.
FitImplicitFunction Extract points within a distance to an implicit function vtkFitImplicitFunction Select points that are close to an implicit surface.
SignedDistance Compute signed distance to a point cloud vtkSignedDistance
UnsignedDistance Compute unsigned distance to a point cloud vtkUnsignedDistance
PointOccupancy Show which voxels contain points vtkPointOccupancy
RadiusOutlierRemoval Remove outliers vtkRadiusOutlierRemoval
MaskPointsFilter Extract points within an image mask vtkMaskPointsFilter
ExtractPointsDemo Extract points inside an implicit functiom vtkExtractPoints

Working with Meshes

Example Name VTK Classes Demonstrated Description
AddCell Add a cell vtkPolyData Add a cell to an existing mesh.
MatrixMathFilter Matrix math filter vtkMatrixMathFilter Compute various quantities on cell and points in a mesh.
WeightedTransformFilter vtkWeightedTransformFilter vtkWeightedTransformFilter
GreedyTerrainDecimation Create a mesh from an ImageData vtkGreedyTerrainDecimation
LargestRegion Extract the largest connected region in a polydata vtkPolyDataConnectivityFilter
SpecifiedRegion Extract a specific (specified) connected region in a polydata vtkPolyDataConnectivityFilter
ColorDisconnectedRegions Color each disconnected region of a vtkPolyData a different color vtkPolyDataConnectivityFilter
Curvatures Compute Gaussian, Mean, Min, and Max Curvatures vtkCurvatures
MeshQuality Mesh Quality vtkMeshQuality
HighlightBadCells Highlight Bad Cells vtkMeshQuality
PolygonalSurfaceContourLineInterpolator Interactively find the shortest path between two points on a mesh vtkPolygonalSurfaceContourLineInterpolator
DijkstraGraphGeodesicPath Find the shortest path between two points on a mesh vtkDijkstraGraphGeodesicPath
SelectPolyData Select a region of a mesh vtkSelectPolyData
SmoothPolyDataFilter Laplacian smoothing vtkSmoothPolyDataFilter
ClosedSurface Check if a surface is closed vtkFeatureEdges
Decimation Decimation vtkDecimatePro Reduce the number of triangles in a mesh.
DeformPointSet Deform a point set vtkDeformPointSet Deform a point set with a control polyhedra.
QuadricDecimation Decimation (quadric decimation) vtkQuadricDecimation Reduce the number of triangles in a mesh.
QuadricClustering Decimation (quadric clustering) vtkQuadricClustering Reduce the number of triangles in a mesh.
Subdivision Subdivision vtkButterflySubdivisionFilter, vtkLoopSubdivisionFilter, vtkLinearSubdivisionFilter Increase the number of triangles in a mesh.
BoundaryEdges Finding Boundary Edges vtkFeatureEdges Find the edges that are used by only one face.
FillHoles Fill Holes vtkFillHolesFilter Close holes in a mesh.
WindowedSincPolyDataFilter Smooth a mesh (windowed sinc filter) vtkWindowedSincPolyDataFilter Smooth a mesh.
a mesh by height height Color a mesh by height vtkLookupTable Colormap, color map
ElevationFilter Color a mesh by height vtkElevationFilter
SimpleElevationFilter Color a mesh by dotting a vector from the origin to each point with a specified vector vtkSimpleElevationFilter
a mesh mesh Triangulate a mesh vtkTriangleFilter Convert all polygons in a mesh to triangles.
ExtractEdges Extract Edges vtkExtractEdges
CellEdges Get edges of cells vtkCell
OBBDicer OBBDicer vtkOBBDicer Breakup a mesh into pieces.
SplitPolyData Split polydata vtkOBBDicer Breakup a mesh into pieces sand save the pieces into files

Clipping

Example Name VTK Classes Demonstrated Description
GenericClip GenericClip vtkGenericClip,vtkBridgeDataSet, vtkGenericDataSet
SolidClip Create a "solid" clip vtkClipPolyData
CapClip Cap a clipped polydata with a polygon vtkClipPolyData
ClipClosedSurface Clip a surface with multiple planes vtkClipClosedSurface
ImplicitDataSetClipping Clip using an implicit data set vtkImplicitDataSet
ClipDataSetWithPolyData Clip a grid with polydata 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. Contrast this with the next example.
TableBasedClipDataSetWithPolyData Clip a grid with polydata vtkTableBasedClipDataSet, 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. Contrast this with the previous example.
BoxClipUnstructuredGrid Clip an unstructured grid with a box vtkBoxClipDataSet, vtkUnstructuredGrid Clip a vtkUnstructuredGrid with a box. The results are unstructured grids with tetrahedra.
BoxClipStructuredPoints Clip structured points with a box vtkBoxClipDataSet, vtkStructuredPoints Clip vtkStructuredPoins with a box. The results are unstructured grids with tetrahedra.

Working with Structured 3D Data

This section includes vtkImageData, vtkStructuredGrid, and vtkRectilinearGrid.

"ImageData" is not the traditional "flat, 2D image" you are used to. It is a special VTK data structure in the collection of 3D data structures provided by VTK. Here is an overview of these data structures: [1]. Image data can represent at typical 2D image, but also, a 3D volume.

vtkImageData

Example Name VTK Classes Demonstrated Description
GetCellCenter Get the coordinates of the center of a cell vtkImageData
CellIdFromGridCoordinates Get the id of a cell from its grid coordinates vtkStructuredData
IterateImageData Iterating over a vtkImageData vtkImageData Set and access locations in a 3D image. Iterate. GetScalarPointer.
ImageNormalize Normalize an image vtkImageNormalize
ExtractVOI Extract a volume of interest (subvolume) vtkExtractVOI Crop
vtkImageWeightedSum Add two or more images vtkImageWeightedSum
ImageReslice Resize a vtkImageData vtkImageReslice
ImageTranslateExtent Change the extent of a vtkImageData vtkImageTranslateExtent
IntersectLine Intersect a line with all cells of a vtkImageData vtkImageData
ImageIterator vtkImageIterator vtkImageIterator

Conversions

Example Name VTK Classes Demonstrated Description
ImageDataGeometryFilter Convert a vtkImageData to a vtkPolyData vtkImageDataGeometryFilter
ImageDataToPointSet Convert a vtkImageData to a vtkStructuredGrid vtkImageDataToPointSet

vtkStructuredGrid

Example Name VTK Classes Demonstrated Description
StructuredGrid Structured Grid vtkStructuredGrid
VisualizeStructuredGrid Visualize the points of a structured grid vtkStructuredGridGeometryFilter
OutlineStructuredGrid Visualize the outline of a structured grid vtkStructuredGridOutlineFilter
VisualizeStructuredGridCells Visualize the cells of a structured grid vtkShrinkFilter
BlankPoint Blank a point of a vtkStructuredGrid vtkStructuredGrid

vtkStructuredPoints

Example Name VTK Classes Demonstrated Description
StructuredPointsToUnstructuredGrid Convert a vtkStructuredPoints to a vtkUnstructuredGrid vtkStructuredPoints, vtkUnstructuredGrid

vtkRectilinearGrid

Example Name VTK Classes Demonstrated Description
RectilinearGrid Rectilinear grid vtkRectilinearGrid
VisualizeRectilinearGridCells Visualize the cells of a rectilinear grid vtkRectilinearGrid, vtkShrinkFilter
RectilinearGridToTetrahedra Convert a vtkRectilinearGrid to a vtkUnstructuredGrid mesh vtkRectilinearGridToTetrahedra

Registration

Example Name VTK Classes Demonstrated Description
IterativeClosestPointsTransform Iterative Closest Points (ICP) Transform vtkIterativeClosestPointTransform
LandmarkTransform Landmark Transform vtkLandmarkTransform

Medical

Example Name VTK Classes Demonstrated Description
MedicalDemo1 Create a skin surface from volume data vtkMarchingCubes
MedicalDemo2 Create a skin and bone surface from volume data vtkMarchingCubes
MedicalDemo3 Create skin, bone and slices from volume data vtkMarchingCubes
MedicalDemo4 Create a volume rendering vtkFixedPointVolumeRayCastMapper
TissueLens Cut a volume with a sphere vtkMarchingCubes vtkClipDataSet vtkProbeFilter

Surface reconstruction

Example Name VTK Classes Demonstrated Description
GaussianSplat Create a surface from Unorganized Points (Gaussian Splat) vtkGaussianSplatter
TriangulateTerrainMap Triangulate a Terrain Map vtkDelaunay2D Generate heights (z values) on a 10x10 grid (a terrain map) and then triangulate the points to form a surface.
GenerateCubesFromLabels Create cubes from labeled volume data vtkMetaImageReader, vtkMaskFields
GenerateModelsFromLabels Create models from labeled volume data (Discrete MarchingCubes) vtkDiscreteMarchingCubes
Delaunay3D Create a solid mesh from Unorganized Points (Delaunay3D) vtkDelaunay3D Convex hull.
SurfaceFromUnorganizedPointsWithPostProc Create a surface from Unorganized Points (with post processing) vtkSurfaceReconstructionFilter
SurfaceFromUnorganizedPoints Create a surface from Unorganized Points vtkSurfaceReconstructionFilter
ExtractSurface Create a surface from Unorganized Points using Point filters vtkExtractSurface,vtkPCANormalEstimation,vtkSignedDistance
ExtractSurfaceDemo Create a surface from Unorganized Points using Point filters (DEMO) vtkExtractSurface,vtkPCANormalEstimation,vtkSignedDistance

Utilities

Example Name VTK Classes Demonstrated Description
FullScreen Maximize/full screen a vtkRenderWindow vtkRenderWindow
SortDataArray Reorder array values based on an ordering (key) array
ShallowCopy Shallow copy a VTK object
DeepCopy Deep copy a VTK object
ZBuffer Capture the Z-buffer/depth buffer vtkRenderer zbuffer
ShareCamera Share a camera between multiple renderers vtkRenderer, vtkCamera
ArrayCalculator Perform in-place operations on arrays vtkArrayCalculator
FileOutputWindow File Output Window vtkFileOutputWindow Write errors to a log file instead of the screen.
ArrayWriter Write a DenseArray or SparseArray to a file
VisualDebugging Update the screen from inside an algorithm Visual debugging
FrameRate Get the frame rate of the rendering
GetDataRoot Find the path of VTK_DATA_ROOT vtkTesting
ArrayLookup Find the location of a value in a vtkDataArray vtkDataArray vtkDataArray::LookupValue
PointInPolygon Point inside polygon test vtkPolygon vtkPolygon::PointInPolygon
BoundingBox Bounding Box construction vtkBoundingBox
BoundingBoxIntersection Box intersection and Inside tests vtkBoundingBox
FilterProgress Monitor a filters progress
MultipleViewports Multiple Viewports vtkRenderer::SetViewPort
SideBySideViewports Side by side viewports vtkRenderer::SetViewPort
MultipleRenderWindows MultipleRenderWindows vtkRenderWindow
Casting Casting VTK objects vtkObject::SafeDownCast
ConcatenateArray Concatenate two arrays vtkConcatenateArray
BrownianPoints Produce a random vector at each point in a dataset vtkBrownianPoints
vtkVector Mathematical vector class vtkVector
vtkPCAStatistics Compute Principal Component Analysis (PCA) values vtkPCAStatistics
PCADemo Project 2D points onto the best 1D subspace (PCA Demo) vtkPCAStatistics
PassThrough Pass input along to output vtkPassThrough
ArrayToTable Convert a vtkDenseArray to a vtkTable vtkArrayToTable
CardinalSpline Cardinal spline Interpolation vtkCardinalSpline
ShepardMethod Shepard method interpolation vtkShepardMethod
TimerLog Timer log vtkTimerLog
TimeStamp Time stamp vtkTimeStamp
CommandSubclass Subclass vtkCommand vtkCommand Instead of using a callback function, it is more powerful to subclass vtkCommand.
PiecewiseFunction Interpolation using a piecewise function vtkPiecewiseFunction
Variant Convert between data types vtkVariant
Coordinate Coordinate system conversions vtkCoordinate
CheckVTKVersion Check VTK Version vtkVersion
ObserveError Catch errors and warnings vtkCommand
VersionMacros Check VTK Version Macro/#define's
LUTUtilities Lookup Table Utilities vtkLookupTable vtkColorSeries A utility class for vtkLookupTable allowing you to output the table contents or to compare tables.
ColorLookupTable Color Lookup Table vtkLookupTable
ColorTransferFunction Color Transfer Function vtkColorTransferFunction
DiscretizableColorTransferFunction Discretizable Color Transfer Function vtkDiscretizableColorTransferFunction
ConstructTable Construct a Table vtkTable A table is a 2D array of any type of elements. They do not all have to be the same type. This is achieved using vtkVariant.
Delaunay2D Delaunay Triangulation (2D) vtkDelaunay2D Perform a 2D Delaunay triangulation on a point set.
ConstrainedDelaunay2D Constrained Delaunay Triangulation (2D) vtkDelaunay2D Perform a 2D Delaunay triangulation on a point set respecting a specified boundary.
KnownLengthArray Known Length Array vtkFloatArray
UnknownLengthArray Unknown Length Array vtkFloatArray
KnownLengthArrayOfVectors Array of Vectors (Known Length) vtkFloatArray
UnknownLengthArrayOfVectors Array of Vectors (Unknown Length) vtkFloatArray
DenseArrayRange Get the bounds of a vtkDenseArray vtkDenseArray, vtkArrayRange
ArrayRange Get the bounds (min,max) of a vtk array vtkFloatArray::GetRange minimum, maximum
2DArray 2D Array vtkDenseArray
3DArray 3D Array vtkDenseArray
SparseArray Sparse Array vtkSparseArray
CustomDenseArray Custom type Dense (2D) Array vtkDenseArray
DetermineVariableType Determine the type of a VTK variable GetClassName()
DetermineActorType Determine the type of an actor vtkActor, vtkActorCollection
Screenshot Screenshot vtkWindowToImageFilter
FilenameFunctions FilenameFunctions vtkDirectory, vtksys/SystemTools Do things like get the file extension, strip the file extension, etc.
Timer Timer vtkRenderWindowInteractor::CreateRepeatingTimer
OffScreenRendering Off Screen Rendering vtkImagingFactory, vtkGraphicsFactory
FunctionParser String function parser vtkFunctionParser
CameraModifiedEvent Catch the camera modified event vtkCameraWindow
WindowModifiedEvent Catch the window modified event vtkRenderWindow
ExtractArrayComponent Extract a component of an array vtkArrayCalculator

CMake Techniques

Example Name VTK Classes Demonstrated Description
CheckForModule Check if a specific module is present
CMakeVTKVersionCheck Check VTK Version in CMake

Math Operations

Example Name VTK Classes Demonstrated Description
LUFactorization LU Factorization vtkMath
NormalizeVector Normalize a vector vtkMath
VectorDot vtkVectorDot vtkVectorDot
PowerWeighting Raise all elements in an array to a power vtkPowerWeighting
LeastSquares Least Squares vtkMath::SolveLeastSquares
HomogeneousLeastSquares Homogeneous Least Squares vtkMath::SolveHomogeneousLeastSquares
EigenSymmetric Compute eigenvalues and eigenvectors of a symmetric matrix vtkMath::Jacobi
MatrixTranspose Matrix transpose vtkMatrix3x3
MatrixInverse Matrix inverse vtkMatrix3x3
PerpendicularVector Get a vector perpendicular to another vector vtkMath::Perpendiculars
VectorNorm Get the lengths of an array of vectors vtkVectorNorm
Interpolate1D Interpolate 1-tuples (linear, spline-based) vtkTupleInterpolator vtkCardinalSpline vtkKochanekSpline A simple example demonstrating how functions defined by sparsely distributed supporting points can be interpolated at arbitrary positions.

Graphs

Example Name VTK Classes Demonstrated Description
AdjacencyMatrixToEdgeTable Convert an adjacency matrix to an edge table vtkAdjacencyMatrixToEdgeTable
ShortestPath Find the shortest path on a graph vtkDijkstraGraphGeodesicPath
ColorVertexLabels Set the color of vertex labels vtkGraphLayoutView, vtkRenderedGraphRepresentation
VertexSize Set the size of vertices vtkGraphLayoutView, vtkRenderedGraphRepresentation Vertex size.
ScaleVertices Size/scale vertices based on a data array vtkGraphLayoutView, vtkRenderedGraphRepresentation
SelectedVerticesAndEdges Get a list of selected vertices and edges vtkAnnotationLink
SelectedVerticesAndEdgesObserver Get a list of selected vertices and edges using an observer of AnnotationChangedEvent vtkAnnotationLink
GraphPoints Manually set coordinates of vertices in a graph vtkGraph::SetPoints, vtkPassThroughLayoutStrategy
MutableGraphHelper Create either a vtkMutableDirectedGraph or vtkMutableUndirectedGraph vtkMutableGraphHelper
SideBySideGraphs Display two graphs side by side vtkGraphLayoutView
AdjacentVertexIterator Get all vertices connected to a specified vertex vtkAdjacentVertexIterator
EdgeWeights Edge weights vtkGraph::GetEdgeData::AddArray
IterateEdges Iterate over edges vtkEdgeListIterator
InEdgeIterator Iterate over edges incoming to a vertex vtkInEdgeIterator
OutEdgeIterator Iterate over edges outgoing from a vertex vtkOutEdgeIterator
BFSTree Breadth first search tree vtkBoostBreadthFirstSearchTree Can also be used to convert a graph to a tree
BreadthFirstDistance Distance from origin vtkBoostBreadthFirstSearch
ColorVerticesLookupTable Color vertices vtkGraphLayoutView
ColorEdges Color edges vtkGraphLayoutView
ConstructGraph Construct a graph vtkMutableUndirectedGraph
ConstructTree Construct a tree vtkTree, vtkMutableDirectedGraph
MinimumSpanningTree Minimum spanning tree of a graph vtkBoostPrimMinimumSpanningTree
DepthFirstSearchIterator Depth First Search iterator vtkTreeDFSIterator
BreadthFirstSearchIterator Breadth First Search iterator vtkTreeBFSIterator
VisualizeGraph Visualize a graph vtkGraphLayoutView, vtkGraphLayoutStrategy, vtkSimple2DLayoutStrategy
NOVCAGraph Create a graph & visualize it in ParaView/VisIt vtkUnstructuredGrid, vtkXMLUnstructuredGridWriter, vtkPolyLine
LabelVerticesAndEdges Label vertices and edges vtkGraphLayoutView::SetEdgeLabelArrayName, vtkGraphLayoutView::SetVertexLabelArrayName
ConnectedComponents Find connected components of a graph vtkBoostConnectedComponents
GraphToPolyData Convert a graph to a PolyData vtkGraphToPolyData
VisualizeDirectedGraph Visualize a directed graph vtkGlyphSource2D
RandomGraphSource Create a random graph vtkRandomGraphSource
DFSAnimation Depth First Search Animation vtkTreeDFSIterator
RemoveIsolatedVertices Remove vertices of degree 0 from a vtkGraph vtkRemoveIsolatedVertices

Graph Conversions

Example Name VTK Classes Demonstrated Description
MutableDirectedGraphToDirectedGraph vtkMutableDirectedGraph to vtkDirectedGraph vtkMutableDirectedGraph, vtkDirectedGraph
DirectedGraphToMutableDirectedGraph vtkDirectedGraph to vtkMutableDirectedGraph vtkMutableDirectedGraph, vtkDirectedGraph
TreeToMutableDirectedGraph vtkTree to vtkMutableDirectedGraph vtkMutableDirectedGraph, vtkTree

Graph Conversions That Don't Work

Example Name VTK Classes Demonstrated Description
vtkMutableDirectedGraph to vtkMutableUndirectedGraph vtkMutableDirectedGraph, vtkMutableUndirectedGraph
vtkMutableUndirectedGraph to vtkMutableDirectedGraph vtkMutableDirectedGraph, vtkMutableUndirectedGraph
vtkTree to vtkMutableUndirectedGraph vtkTree, vtkMutableUndirectedGraph

Data Structures

Example Name VTK Classes Demonstrated Description
AttachAttributes Attach attributes vtkInformation Attach attributes to a VTK array
Radius Find all points within a radius of a specified point vtkPointLocator
CellLocatorVisualization Visualization of the tree of a vtkCellLocator vtkCellLocator
PointLocatorVisualization Visualization of the tree of a vtkPointLocator vtkPointLocator
PointLocator Efficient 3D point query vtkPointLocator
CellLocator Efficient 3D cell query vtkCellLocator Project a point onto a mesh. Closest point on a mesh.
CellTreeLocator Points inside an object using vtkCellTreeLocator vtkCellTreeLocator

Timing Demonstrations

Example Name VTK Classes Demonstrated Description
OctreeTimingDemo Octree timing demo vtkOctreePointLocator Plot the runtime vs MaxPointsPerRegion
KDTreeTimingDemo KDTree timing demo vtkKdTreePointLocator Plot the runtime vs MaxLevel (doesn't seem correct)
OBBTreeTimingDemo OBBTree timing demo vtkOBBTree Plot the runtime vs MaxLevel
ModifiedBSPTreeTimingDemo ModifiedBSPTree timing demo vtkModifiedBSPTree Plot the runtime vs MaxLevel

KD-Tree

Example Name VTK Classes Demonstrated Description
ClosestPoint vtkKdTree_BuildLocatorFromPoints vtkKdTree
ClosestKPoints vtkKdTree_BuildLocatorFromPoints_ClosestKPoints vtkKdTree
AccessPoints Access the points of a KDTree vtkKdTree
ClosestPoint Find the closest point to a query point vtkKdTreePointLocator
ClosestNPoints Find the closest N points to a query point vtkKdTreePointLocator
VisualizeKDTree Visualize levels of the tree vtkKdTreePointLocator
FindPointsWithinRadius Find points within a specified radius of a query point vtkKdTreePointLocator
DataStructureComparison Data structure comparison vtkKdTree, vtkOBBTree, vtkOctreePointLocator, vtkModifiedBSPTree Illustrates, side by side, the differences between several spatial data structures

Oriented Bounding Box (OBB) Tree

Example Name VTK Classes Demonstrated Description
IntersectWithLine Intersect a line with a vtkOBBTree vtkOBBTree
OBBTreeExtractCells Intersect a line with an OBB Tree and display all intersected cells vtkOBBTree
VisualizeOBBTree Visualize levels of the tree vtkOBBTree

Octree

Example Name VTK Classes Demonstrated Description
BuildTree Create an octree vtkOctreePointLocator
ClosestPoint Find the closest point to a query point vtkOctreePointLocator
KClosestPoints Find the K closest points to a query point vtkOctreePointLocator
FindPointsWithinRadius Find the points within a sphere of specified radius to a query point vtkOctreePointLocator
OctreeVisualize Visualize levels of the tree vtkOctreePointLocator
IncrementalOctreePointLocator Insert points into an octree without rebuilding it vtkIncrementalOctreePointLocator

Modified BSP Tree

Example Name VTK Classes Demonstrated Description
ModifiedBSPTreeIntersectWithLine Intersect a line with a modified BSP Tree vtkModifiedBSPTree
ModifiedBSPTreeExtractCells Intersect a line with a modified BSP Tree and display all intersected cells vtkModifiedBSPTree
VisualizeModifiedBSPTree Visualize levels of the tree vtkModifiedBSPTree

VTK Concepts

Example Name VTK Classes Demonstrated Description
Scalars Attach a scalar value to each point (PointData) or cell (CellData) in a data set

Lighting

Example Name VTK Classes Demonstrated Description
Shadows Create shadows vtkShadowMapPass
Light Add a directional light to a scene vtkLight
LightActor Display the location and direction of a light vtkLightActor

Visualization

https://lorensen.github.io/See [VTKTutorials/site/VTK_Terminology Terminology]|| this tutorial for a brief explanation of the VTK terminology of mappers, actors, etc.

Example Name VTK Classes Demonstrated Description
AssignColorsFromLUT Assign colors to cells in a vtkPolyData structure using lookup tables. vtkNamedColors, vtkPlaneSource, vtkLookupTable, vtkColorTransferFunction Demonstrates how to assign colors to cells in a vtkPolyData structure using lookup tables.
ElevationBandsWithGlyphs Generate a surface and color by elevation bands using arrows for glyphing normals. 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.
CurvatureBandsWithGlyphs Generate a surface and color by curvature bands using arrows for glyphing normals. 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.
LayeredRenderers Layered renderers vtkRenderer
ScalarVisibility Switch between coloring the actor and coloring the data vtkDataSetMapper ScalarVisibility, color
ImageMapper Display an image in 2D vtkImageMapper
BackgroundTexture Use a texture for the background of a vtkRenderer vtkRenderer, vtkTexture Background texture, BackgroundTexture
VectorField Visualize a vector field vtkGlyph3D
ImageOrientation Orientation of the view of an image vtkInteractorStyleImage
CaptionActor2D Draw a caption/bubble pointing to a particular point CaptionActor2D
ImageOrder Determine the display order of a stack of images vtkRenderer
RenderPassExistingContext Render into an existing OpenGL Context vtkRenderPass,vtkVolumetricPass
ImageTransparency Set transparency of image pixels vtkImageData
OrientedGlyphs Create oriented glyphs from vector data vtkGlyph3D
HedgeHog Create oriented lines (hedgehogs) from vector data vtkHedgeHog, vtkStructuredGrid
LineWidth Change the width/thickness of lines in an actor vtkActor, vtkProperty
CursorShape Change the shape of the cursor vtkRenderWindow
SceneBounds Get the bounds of the whole scene vtkRenderer
FastSplatter Convolve a splat image with every point in an input image vtkFastSplatter
TubesWithVaryingRadiusAndColors Create tubes with varying radius and colors vtkTubeFilter
TubesFromSplines Create tubes from interpolated points and scalars vtkTubeFilter, vtkParametricFunctionSource vtkTupleInterpolator
vtkGlyph2D vtkGlyph2D vtkGlyph2D
vtkGlyph3D vtkGlyph3D vtkGlyph3D
vtkVertexGlyphFilter Add a vertex to each point vtkVertexGlyphFilter
vtkCutter vtkCutter vtkCutter
QuadraticSurface Display a quadratic surface vtkQuadric
BackfaceCulling Backface culling vtkActor::GetProperty::BackfaceCullingOn
BackgroundColor Background color vtkRenderer::SetBackground
BackgroundGradient Background gradient vtkRenderer::GradientBackgroundOn, vtkRenderer::Setbackground2
CameraActor CameraActor vtkCameraActor Visualize a camera (frustum) in a scene.
ClipArt Generate 3D clip art from an image vtkTextureMapToPlane
CloseWindow Close a render window vtkRenderWindowInteractor::TerminateApp, vtkRenderWindow::Finalize
ColorAnActor Color an Actor vtkActor::GetProperty::SetColor
ColorActorEdges Color the edges of an Actor vtkActor::GetProperty::SetEdgeColor
ColorGlyphs Color glyphs vtkGlyph3D vtkGlyph3D::SetColorModeToColorByScalar
CornerAnnotation Corner annotation vtkCornerAnnotation Write text in the corners of a window.
CorrectlyRenderingTranslucentGeometry Correctly Rendering Translucent Geometry vtkDepthSortPolyData
CubeAxesActor Display three orthogonal axes with labels vtkCubeAxesActor
CubeAxesActor2D Display three orthogonal axes with labels vtkCubeAxesActor2D This example uses the vtkCubeAxesActor2D to show your scene with axes to indicate the spatial extent of your data.
Cursor3D vtkCursor3D vtkCursor3D
Arbitrary3DCursor Track a 3D cursor vtkPointWidget
DisplayCoordinateAxes Display coordinate axes vtkOrientationMarkerWidget
DisplayText Display Text vtkTextActor, vtkTextProperty
RenderView A little bit easier rendering vtkRenderView
FlatShading FlatShading vtkActor::GetProperty::SetInterpolationToFlat
Follower Draw text that stays right side up vtkFollower
HideActor Hide an actor vtkPropCollection, vtkProp::VisibilityOff visible
HideAllActors Hide all actors vtkRenderer::RemoveAllViewProps
LODProp3D Level of detail rendering vtkLODProp3D
LabelContours Label Contours vtkLabeledDataMapper
LabelMesh Label Mesh vtkLabeledDataMapper
LabelPlacementMapper Label points vtkPointSetToLabelHierarchy, vtkLabelPlacementMapper Display a non-overlapping text label at each point.
LabeledDataMapper Display the point ID at each point vtkLabeledDataMapper
Legend Legend vtkLegendBoxActor
LegendScaleActor Display the scale of a scene vtkLegendScaleActor
MovableAxes Movable axes vtkFollower, vtkAxesActor, vtkAssembly
MoveActor Moving an Actor vtkInteractorStyleTrackballActor
MoveCamera Moving the Camera vtkInteractorStyleTrackballCamera
MultipleActors Multiple Actors vtkActor
NamedColors Named colors vtkNamedColors Demonstrates how to use the vtkNamedColor class
NamedColorPatches Named color patches vtkNamedColors Creates a HTML file called VTKNamedColorPatches.html showing the available colors in vtkNamedColors.
NoShading NoShading vtkActor::GetProperty::SetAmbient, vtkActor::GetProperty::SetDiffuse, vtkActor::GetProperty::SetSpecular
Opacity Opacity vtkActor::GetProperty::SetOpacity Transparency, transparent.
PointSize PointSize vtkActor::GetProperty::SetPointSize
PolyDataDepthSorting Poly Data Depth Sorting vtkDepthSortPolyData
QuadricLODActor Automatic level of detail adjustment vtkQuadricLODActor Level of detail adjustment.
RenderLargeImage Render a large image, larger than a window vtkRenderLargeImage
RotateActor Rotate an Actor vtkActor::GetMatrix
ScalarBarActor ScalarBarActor vtkScalarBarActor Display a color bar.
ScaleGlyphs Scale glyphs vtkGlyph3D vtkGlyph3D::SetScaleModeToScaleByScalar
SelectWindowRegion Select a region of a window vtkInteractorStyleRubberBand2D
StreamLines Stream Lines vtkStreamLine
TextSource Display text vtkTextSource
TextureMapImageData Texture map an ImageData vtkImageCanvasSource2D
TextureMapPlane Texture map a plane vtkTextureMapToPlane
TextureMapQuad Texture map a quad vtkPolygon, vtkPolyData::GetPointData::SetTCoords
TransformActor Transform an Actor vtkActor::SetUserTransform
TransformActorCollection Transform an actor collection vtkActorCollection
VectorOfActors Multiple Actors in a Vector vtkActor
VectorText Display high resolution text vtkVectorText
Visualize2DPoints Visualize a 2D Set of Points vtkPolyDataMapper2D, vtkProperty2D
VisualizeImageData Visualize the points of an ImageData vtkDataSetMapper
VisualizeVTP Visualize a VTP File vtkXMLPolyDataReader, vtkPolyDataMapper
WindowSize Change the size of a window vtkRenderWindow:SetSize
WindowTitle Change the title of a window vtkRenderWindow::SetWindowName
Wireframe Wireframe vtkActor::GetProperty::SetRepresentationToWireframe
vtkCamera Positioning and aiming the camera vtkCamera
DisplayQuadraticSurfaces Display Quadratic Surfaces vtkQuadric, vtkSampleFunction, vtkContourFilter
Glyph3DMapper Glyph3DMapper vtkGlyph3DMapper
DistanceToCamera DistanceToCamera vtkDistanceToCamera
ProgrammableGlyphFilter Generate a custom glyph at each point vtkProgrammableGlyphFilter
CurvedReformation Sample a volume with a curved surface vtkProbeFilter In medical imaging, this is often called curved multi planar reformation
IsosurfaceSampling Sample a volume with an isosurface vtkProbeFilter Demonstrates how to create point data on an isosurface.
ReverseAccess Accessing the source of an actor reversely vtkActor Demonstrates how to access the source (e.g. vtkSphereSource) of an actor reversely
RandomProbe Probe a data set with random points vtkProbeFilter Demonstrates how to probe a dataset with random points and select points inside the data set
TensorGlyph vtkTensorGlyph vtkTensorGlyph Draw a rotated/scaled glyph at each point.
KochSnowflake KochSnowflake vtkPolyData, vtkPolyLine, vtkTriangle, vtkLookupTable, Use recursion to represent a Koch snowflake fractal.
FindCellIntersections FindCellIntersections vtkCellLocator Find the intersection of a line and the cells in an unstructured dataset
BillboardTextActor3D BillboardTextActor3D vtkBillboardTextActor3D Label points with billboards.

Volume Rendering

Example Name VTK Classes Demonstrated Description
HAVSVolumeMapper HAVS vtkHAVSVolumeMapper
SmartVolumeMapper Smart volume mapper vtkSmartVolumeMapper
MinIntensityRendering Min intensity rendering vtkFixedPointVolumeRayCastMapper
itkVtkImageConvert ITK->VTK conversion Conversion maintaining DICOM orientation and position

User Interaction

Example Name VTK Classes Demonstrated Description
Game Move a cube into a sphere vtkInteractorStyleTrackballActor Snap
UserEvent Create, invoke, and handle a custom event Simple observer, emit
ObserverMemberFunction Handle events in class member functions Set observers to be class member functions.
MoveAVertex Click and drag a vertex of a vtkPolyData vtkPointPicker
MoveAVertexUnstructuredGrid Click and drag a vertex of a vtkUnstructuredGrid vtkPointPicker
ClientData Give an observer access to an object (via ClientData) vtkCommand
CallData Pass an observer a value (via CallData) vtkCommand
MoveAGlyph Drag a glyph around vtkGlyph3D
Picking Picking vtkPropPicker Get the world coordinate of the mouse click (if you clicked an actor)
PickableOff Disallow interaction with a specific actor vtkActor::PickableOff
Assembly Assembly vtkAssembly Combine/group actors into an assembly.
DoubleClick Catch a double click vtkInteractorStyleTrackballCamera
ImageClip vtkImageClip vtkImageClip Demonstrates how to interactively select and display a region of an image.
ImageRegion Select a region of an image vtkCommand
InteractorStyleTerrain Terrain mode vtkInteractorStyleTerrain
KeypressEvents Handle keypress events vtkInteractorStyleTrackballCamera
KeypressObserver Handle keypress events (lightweight) vtkCallbackCommand This uses a callback function rather than a derived interactor class.
InteractorStyleUser InteractorStyleUser vtkInteractorStyleUser Create a completely custom interactor style (no default functionality is provided)
MouseEvents Handle mouse events vtkInteractorStyleTrackballCamera Subclass the interactor style.
MouseEventsObserver Handle mouse events (light weight) vtkCallbackCommand Use an observer.
PointPicker Get the coordinates of the closest point in the data set to the mouse click vtkPointPicker
RubberBand2DObserver RubberBand2D Observer vtkInteractorStyleRubberBand2D
RubberBand2D RubberBand2D vtkInteractorStyleRubberBand2D
RubberBand3D RubberBand3D vtkInteractorStyleRubberBand3D
RubberBandPick RubberBandPick vtkInteractorStyleRubberBandPick
RubberBandZoom RubberBandZoom vtkInteractorStyleRubberBandZoom
SelectAnActor Select an actor vtkPropPicker
ShiftAndControl Check if shift or control is being held vtkRenderWindowInteractor::GetControlKey() Hold/holding down a key
StyleSwitch Choose between multiple interaction modes vtkInteractorStyleSwitch
TrackballActor Trackball actor mode vtkInteractorStyleTrackballActor
TrackballCamera Trackball camera mode vtkInteractorStyleTrackballCamera
WorldPointPicker Get world coordinates of mouse click vtkWorldPointPicker
CellPicking Cell Picking vtkCellPicker select cell, click cell
AreaPicking Area Picking vtkAreaPicker
HighlightSelectedPoints Highlight Selected Points vtkExtractGeometry
HighlightSelection Highlight selection vtkExtractPolyDataGeometry
HighlightPickedActor Highlight a picked actor vtkPropPicker

Working with Images

Example Name VTK Classes Demonstrated Description
ImageExport Export an image to a C array vtkImageExport c-style
ImageImport Import an image from a C array vtkImageImport c-style
ImageMedian3D Median filter a 3d or 2d image vtkImageMedian3D Median filter
ImageRFFT Inverse FFT vtkImageRFFT
ImageIdealHighPass High pass filter an image vtkImageIdealHighPass
ImageIslandRemoval2D Remove small patches from an image vtkImageIslandRemoval2D
FillWindow Setup the camera to fill the window with an image vtkCamera Fit image
ImageShiftScale Shift and scale an image vtkImageShiftScale
ImageStencil Copy one image into another image vtkImageStencil, vtkImageToImageStencil
ImageStack Display layers of images vtkImageStack
BorderPixelSize Set the size of border pixels vtkImageSliceMapper
Interpolation Set the interpolation type for the display of an image vtkImageSlice, vtkImageProperty If pixels look blurry instead of sharp when zoomed in, change this.
ImageText Draw text in an image vtkFreeTypeUtilities, vtkImageBlend
ImageSeparableConvolution Convolve a separable kernel with an image vtkImageSeparableConvolution
ImageHybridMedian2D Median filter an image vtkImageHybridMedian2D
ImageDilateErode3D Dilate or erode an image vtkImageDilateErode3D
ImageOpenClose3D Open or close (morphologically) an image vtkImageOpenClose3D
ImageRange3D Replace every pixel with the range of its neighbors according to a kernel vtkImageRange3D
ImageToPolyDataFilter Convert a vtkImageData to a vtkPolyData vtkImageToPolyDataFilter, vtkImageQuantizeRGBToIndex
ImageCityBlockDistance Compute the Manhattan distance from every point to every black point in a binary image vtkImageCityBlockDistance
CannyEdgeDetector Perform Canny edge detection on an image
ImageToStructuredPoints Convert a vtkImageData to a vtkStructuredPoints vtkImageToStructuredPoints
ImageNonMaximumSuppression Find peaks in an image using non maximum suppression vtkImageNonMaximumSuppression
Transparency Make part of an image transparent vtkImageMapToColors, vtkLookupTable Transparency
RTAnalyticSource RTAnalyticSource vtkRTAnalyticSource An image source that can be used for regression testing
ImageMandelbrotSource Create a Mandelbrot image vtkImageMandelbrotSource
ImageMagnify Stretch an image vtkImageMagnify Supersample and stretch an image.
ImageGridSource Create a image of a grid vtkImageGridSource
ImageSinusoidSource Create a sinusoidal image vtkImageSinusoidSource
Actor2D 2D actor and mapper vtkActor2D vtkMapper2D
Cast Cast an image to a different type vtkImageCast
ExtractComponents Extract components of an image vtkImageExtractComponents This can be used to get, for example, the red channel of an image.
ImageAccumulateGreyscale Display a greyscale histogram vtkImageAccumulate, vtkBarChartActor grayscale
BackgroundImage Display an image as the background of a scene vtkImageCanvasSource2D
StaticImage Display a static image vvtkImageViewer2 This will display the image, but not allow you to interact with it.
DotProduct Image dot product vtkImageDotProduct Compute the pixel-wise dot product of two vector images.
DrawOnAnImage Drawing on an image vtkImageCanvasSource2D
DrawShapes Drawing shapes in an image vtkImageCanvasSource2D
ImageMask Mask a region of an image vtkImageMask
ImageMathematics Perform mathematical operations on an image vtkImageMathematics
ImageMirrorPad vtkImageMirrorPad vtkImageMirrorPad Pad the edges of an extended image by mirror existing pixels.
InteractWithImage Visualize and interact with an image vtkImageActor, vtkInteractorStyleImage
ImageSliceMapper Visualize and interact with an image vtkImageSlice, vtkImageSliceMapper This is the new way to do this. It is much more powerful.
ImageSlice Visualize and interact with an image vtkImageSlice, vtkImageResliceMapper This is even more powerful than vtkImageSliceMapper. It can also do oblique slices.
ImageRotate Rotate a 2D image vtkImageSlice, vtkImageResliceMapper This is even more powerful than vtkImageSliceMapper. It can also do oblique slices.
NegativeIndices Negative Indices vtkImageData A very powerful feature of vtkImageData is that you can use negative indices.
PickingAPixel2 Picking a pixel 2 - modified version for exact pixel values vtkPropPicker
PickingAPixel Picking a pixel vtkPropPicker
MarkKeypoints Mark keypoints in an image vtkVectorText, vtkFollower
ImageCheckerboard Visually Compare Two Images vtkImageCheckerboard
ImageThreshold Threshold an image vtkImageThreshold

Image Processing

Example Name VTK Classes Demonstrated Description
RescaleAnImage RescaleAnImage vtkImageShiftScale Rescale an image
vtkImageAccumulate vtkImageAccumulate vtkImageAccumulate Histogram
ImageValueRange Get the range of image pixel values (min/max) vtkImageData minimum, maximum
ImageAnisotropicDiffusion2D Anisotropic diffusion (2D) vtkImageAnisotropicDiffusion2D
Blending2DImagesWithDifferentColorMaps Blending 2D images with different color maps vtkImageMapToColors
CenterAnImage Center an image vtkImageChangeInformation
CombineImages Combine two images vtkImageBlend
CombiningRGBChannels Combine layers into an RGB image vtkImageAppendComponents
ConvertToGreyScale Convert RGB image to greyscale vtkImageMagnitude grayscale
ImageDifference Compute the difference image of two images vtkImageDifference
ImageLuminance Convert RGB image to greyscale (luminance) vtkImageLuminance grayscale
ImageMapToColors Convert greyscale image to RGB vtkImageMapToColors Use a lookup table to map scalar (grayscale) values to colors
Flip Flip an image vtkImageFlip
Gradient Image gradient vtkImageGradient Compute the gradient vector at every pixel.
ImageContinuousDilate3D Dilate an image vtkImageContinuousDilate3D
ImageContinuousErode3D Erode an image vtkImageContinuousErode3D
ImageConvolve Convolve an image with a kernel vtkImageConvolve Convolution
ImageCorrelation Correlate two images vtkImageCorrelation
ImageDivergence Divergence of a vector field vtkImageDivergence
ImageEllipsoidSource Create an image of an ellipsoid vtkImageEllipsoidSource
ImageFFT Compute the FFT of an image vtkImageFFT
ImageGaussianSmooth Smooth an image vtkImageGaussianSmooth
ImageGradientMagnitude Compute the magnitude of the gradient at each pixel of an image vtkImageGradientMagnitude
ImageLaplacian Compute the Laplacian of an image vtkImageLaplacian
ImageNoiseSource Create an image of noise vtkImageNoiseSource
ImagePermute Switch axes of an image vtkImagePermute
ImageShrink3D Resample an image vtkImageShrink3D
ImageSobel2D Sobel edge detection 2D vtkImageSobel2D
ImageVariance3D Variance of a 3D image vtkImageVariance3D Construct a new image consisting of the variance of the input image at each pixel.
RGBToHSV Convert RGB to HSV vtkImageRGBToHSV
ResizeImage Resize an image vtkImageResize vtkImageSincInterpolator Resize an image using a sinc interpolator

Widgets

Example Name VTK Classes Demonstrated Description
PointWidget PointWidget vtkPointWidget
SeedWidgetImage SeedWidgetImage vtkImageViewer2, vtkSeedWidget How to start the interaction?
PlaneWidget Interact with a plane vtkPlaneWidget
vtkAffineWidget Apply an affine transformation interactively vtkAffineWidget
vtkPolygonalSurfacePointPlacer vtkPolygonalSurfacePointPlacer vtkPolygonalSurfacePointPlacer Used in conjuntion with vtkContourWidget to draw curves on a surface.
SphereWidgetEvents Sphere widget events vtkSphereWidget
TextWidget Draw movable text vtkTextWidget
vtkSeedWidget Seed widget vtkSeedWidget
vtkSphereWidget Sphere widget vtkSphereWidget
SphereWidget2 vtkSphereWidget2 vtkSphereWidget2
Spline vtkSplineWidget vtkSplineWidget
Border vtkBorderWidget vtkBorderWidget 2D selection, 2D box.
BorderWorldCoords vtkBorderWidget vtkBorderWidget 2D selection box in world coordinates.
vtkAngleWidget vtkAngleWidget vtkAngleWidget
2D vtkAngleWidget + vtkAngleRepresentation2D vtkAngleWidget, vtkAngleRepresentation2D
Caption vtkCaptionWidget vtkCaptionWidget
Slider 3D Slider vtkSliderWidget, vtkSliderRepresentation3D
Slider2D 2D Slider vtkSliderWidget, vtkSliderRepresentation2D
BalloonWidget Balloon vtkBalloonWidget
ContourWidget Contour Widget vtkContourWidget Create a contour from a set of points and dynamically change the contour using the points as control points.
vtkDistanceWidget vtkDistanceWidget vtkDistanceWidget
ImplicitPlaneWidget2 vtkImplicitPlaneWidget2 vtkImplicitPlaneWidget2 Clip polydata with an implicit plane.
BoxWidget vtkBoxWidget vtkBoxWidget
BoxWidget2 vtkBoxWidget2 vtkBoxWidget2
LineWidget2 vtkLineWidget2 vtkLineWidget2
vtkBiDimensionalWidget vtkBiDimensionalWidget vtkBiDimensionalWidget When would you use this?
ImagePlaneWidget vtkImagePlaneWidget vtkImagePlaneWidget
ImageTracerWidget vtkImageTracerWidget vtkImageTracerWidget Scribble on an image.
ImageTracerWidgetInsideContour vtkImageTracerWidget vtkImageTracerWidget Highlight pixels inside a non-regular region scribbled on an image.
ImageTracerWidgetNonPlanar Draw on a non-planar surface vtkImageTracerWidget
HoverWidget vtkHoverWidget vtkHoverWidget How to detect a hover?
LogoWidget Logo widget vtkLogoWidget
OrientationMarkerWidget Orientation Marker widget vtkOrientationMarkerWidget Display a polydata as an orientation icon.
RectilinearWipeWidget Rectilinear Wipe widget vtkImageRectilinearWipe, vtkRectilinearWipeWidget, vtkRectilinearWipeRepresentation Compare two images.
CheckerboardWidget Checkerboard widget vtkCheckerboardWidget, vtkCheckerboardRepresentation Compare two images using a checkerboard.
Cursor2D vtkCursor2D vtkCursor2D
TexturedButtonWidget ButtonWidget vtkButtonWidget,vtkTexturedButtonRepresentation2D Create a textured 2D button

Plotting

Example Name VTK Classes Demonstrated Description
BoxChart Box plot vtkChartBox
LinePlot Line plot vtkChartXY
ScatterPlot Scatter plot vtkPlotPoints
BarChart Bar chart vtkChartXY
PieChart Pie chart vtkChartPie, vtkPlotPie
ParallelCoordinates Parallel coordinates vtkChartParallelCoordinates
StackedBar Stacked bar vtkPlotBar
StackedPlot Stacked plot vtkPlotStacked
Diagram Diagram

Animation

Example Name VTK Classes Demonstrated Description
AnimateActors Animate actors vtkAnimationScene, vtkAnimationCue
Animation Animation vtkRenderWindowInteractor::CreateRepeatingTimer Move a sphere across a scene.
AnimationScene Animation (the right way) vtkAnimationScene, vtkAnimationCue Zoom in on a sphere.
DataAnimation Data Animation vtkCallbackCommand, vtkProgrammableFilter Update points in a dataset every specified interval.
DataAnimationSubclass Data Animation (subclass) vtkCommand, vtkProgrammableFilter Update points in a dataset every specified interval (using a vtkCommand subclass instead of a callback function.

Geographic Visualization (Geovis)

Example Name VTK Classes Demonstrated Description
CompassWidget Compass Widget vtkCompassWidget
EarthSource Earth source vtkEarthSource Create the Earth.
GeoAssignCoordinates Convert lat/long coordinates to world coordinates vtkGeoAssignCoordinates

Information Visualization (Infovis)

Example Name VTK Classes Demonstrated Description
ParallelCoordinatesView Parallel coordinates vtkParallelCoordinatesView
TreeMapView Tree map vtkTreeMapView

Qt

https://lorensen.github.io/Click [VTKTutorials/site/QtSetup QtSetup] || here for a tutorial on how to setup Qt.

Example Name VTK Classes Demonstrated Description
QImageToImageSource Convert a QImage to a vtkImageData vtkQImageToImageSource
ShowEvent ShowEvent Use QMainWindow::showEvent event to do things that you might want to do in the constructor
RenderWindowNoUiFile Render window without a .ui file QVTKWidget This is a very basic example that shows how to create a Qt window. Typically, one would want to design a form in the QtDesigner (this is shown in RenderWindowUi)
RenderWindowUISingleInheritance Render window with a .ui (single inheritance) QMainWindow Using a QVTKWidget with the Qt Single Inheritance model
RenderWindowUIMultipleInheritance Render window with a .ui (multiple inheritance) QMainWindow Using a QVTKWidget with the Qt Multiple Inheritance model
SideBySideRenderWindows Side by side render windows QApplication
vtkQtBarChart vtkQtBarChart vtkQtBarChart
BorderWidget Border Widget vtkBorderWidget, QApplication
EventQtSlotConnect Connect a VTK event to a Qt slot vtkEventQtSlotConnect
ImageDataToQImage Convert a vtkImageData to a QImage
ShareCameraBetweenQVTKWidgets Share the camera between QVTKWidgets

Matlab

You must turn on VTK_USE_MATLAB_MEX to use these.

Example Name VTK Classes Demonstrated Description
MatlabEngineFilter vtkMatlabEngineFilter vtkMatlabEngineFilter

Databases

SQL

https://lorensen.github.io/If you have any trouble or errors with the following examples, please troubleshoot using [VTKTutorials/site/SQLSetup SQLSetup] || these instructions.

Example Name VTK Classes Demonstrated Description
ConnectAndRead Connect to and read a MySQL database vtkMySQLDatabase, vtkSQLQuery
CreateDatabase Create a MySQL database vtkMySQLDatabase
WriteToDatabase Write to a MySQL database vtkSQLQuery, vtkMySQLDatabase

RenderMan

RenderMan is a high quality rendering system create by Pixar. VTK can export RenderMan RIB files for rendering by prman. In the spring of 2015, Pixar released a non-commercial version of its RenderMan products.

Example Name VTK Classes Demonstrated Description
PolyDataRIB Apply a RenderMan Shader to a PolyData vtkRIBExporter

Testing Needed

Example Name VTK Classes Demonstrated Description
AVI AVI (Windows only) vtkAVIWriter Someone please test this.
OggTheora OggTheora vtkOggTheoraWriter Can't find lvtkoggtheora
MPEG2 MPEG2 vtkMPEG2Writer CMake won't find MPEG2 include?
FFMPEG FFMPEG vtkFFMPEGWriter CMake won't find FFMPEG include?
HistogramBarChart Display a histogram vtkImageAccumulate, vtkBarChartActor Testing images seem to vary slightly on different machines.

Small Problems

Example Name VTK Classes Demonstrated Description
Interact/move the vertices of a graph vtkGraph
Read an mdb Access database file vtkODBCDatabase Error: “Could not execute statement”
Sobel edge detection 3D vtkImageSobel3D
Anisotropic diffusion (3D) vtkImageAnisotropicDiffusion3D Need a suitable input.
ImageReader2 vtkImageReader2 No errors, but no image is displayed. I think this is a superclass not intended to be used directly?
Low pass filter an image vtkImageIdealLowPass
Play/stop/fast forward etc buttons vtkPlaybackWidget Need to show user how to start recording? Playback a recording?
Vary the shape of vertices vtkGraphLayoutView
Vary the width of edges vtkGraphLayoutView
Convert a vtkTable to a vtkGraph vtkTableToGraph How to specify the columns?
Generate a diagonal matrix vtkDiagonalMatrixSource What type is output?
Generate different glyphs based on a table vtkGlyph3D How to specify which values get which glyphs?
Combine the points of multiple PolyData datasets vtkAppendPoints The data sets seem to have been combined (there are 10 points and 10 cells in the output), but nothing is displayed -- this is because the points and cells are copied but not the verts. See example vtkAppendPolyData instead (there's already an example for that).
Extract a subgraph vtkExtractSelectedGraph Waiting for dual vtkGraphView
Order cells from a viewing direction vtkKdTree
Merge selections vtkSelection
SpherePuzzle vtkSpherePuzzle Looks like a beach ball... what is the point?
Extract points based on a criterion function vtkExtractSelectedThresholds
Get connected cells vtkCellLinks How to use vtkCellLinks::Links class? How to know how many cells GetCells returns?
Convert data from an object into a vtkTable vtkDataObjectToTable How to get the point coordinates into the table?
vtkImageViewer2 vtkImageViewer2 How to start the interaction?
vtkCameraWidget vtkCameraWidget How to use this?
Compute occupancy of an object on a grid vtkVoxelModeller VTK_BIT is not supported - convert it?
Divide a point cloud into uniform cubic voxels vtkCellLocator We can determine which cell a point is in, but how to determine which points are in a particular cell?
Flight vtkInteractorStyleFlight linux keypresses not handled. I submitted a patch to the devel list - we'll see if they respond.
vtkPointHandleRepresentation2D vtkPointHandleRepresentation2D
RecordEvents vtkInteractorEventRecorder How to exit?
PlayBackEvents vtkInteractorEventRecorder How to slow down?
Quadric Surface Fitting vtkQuadric
Rectangular button source vtkRectangularButtonSource is this the intended usage?
ApplyColors vtkApplyColors How is this different from just adding a Colors array to a vtkDataSet?
vtkPCAAnalysisFilter vtkPCAAnalysisFilter What is the difference between this and vtkPCAStatistics? The eigenvalues vector doesn't seem to be valid. It seems like the eigenvector corresponding to the smallest value is stored as the normal of the cell in the output - how do you get the other two eigen vectors?

Wish List

Example Name VTK Classes Demonstrated Description
Plot data (Legacy method) vtkXYPlotActor The charts examples always seem to render slightly differently.
Display a histogram vtkImageAccumulate, XYPlotActor The charts examples always seem to render slightly differently.
vtkTableBasedClipDataSet vtkTableBasedClipDataSet Empty
vtkLSDynaReader vtkLSDynaReader Empty
vtkCompositeDataGeometryFilter vtkCompositeDataGeometryFilter Empty - combine multiple blocks into a single data set
vtkTryDowncast vtkTryDowncast Empty

Big Problems

Example Name VTK Classes Demonstrated Description
A comparison of some graph layout strategies vtkGraphLayoutView This crashes unless you build against the VTK-SideBySideGraphs branch from here: git@github.com:daviddoria/daviddoria-vtk.git
Extract iso-surfaces vtkMarchingContourFilter No output produced without a vtkVoxelModeller, strange output produced with a vtkVoxelModeller.
Set a value by manipulating something vtkContinuousValueWidget Can't instantiate this class? But nothing derives from it?
Box intersection vtkBox This class doesn't have any non static functions! Need to create convenience functions.
vtkTensorProbeWidget vtkTensorProbeWidget How is this used?
GeoGlobeSource vtkGeoGlobeSource
GeoView vtkGeoView
vtkFrustumCoverageCuller vtkFrustumCoverageCuller Doesn't seem to have a property to specify a frustum? What is it for? How to use it?
vtkKdTreeSelector vtkKdTreeSelector Shell
vtkRungeKutta4 vtkRungeKutta4 Shell
vtkCoincidentPoints vtkCoincidentPoints What is this for?
Threaded/Parallel example Shell
Assign an array to a particular field vtkAssignAttribute Shell
vtkTransposeMatrix vtkTransposeMatrix What is this supposed to operate on? There is no vtkMatrix class.
vtkHyperOctree vtkHyperOctree What does this do?
vtkTextExtraction vtkTextExtraction Shell