Visualization Toolkit ( VTK ) Tutorial

John T. Bell
CS 526 Spring 2004

This web site provides a basic tutorial for new users of VTK. The assumption is that users will have VTK installed, as well as whatever development environment they are going to use. The examples given here are in TCL/Tk, but since this site focuses primarily on concepts rather than details, most of it should be language-independant. ( The most notable exception being the user interface components, which are TK specific. )

The basis for the examples in this tutorial is a series of three projects performed using VTK during the Spring 2004 semester of CS 526 at the University of Illinois Chicago. Further information regarding the course in general and the projects in specific can be found by visiting John Bell's CS 526 web site.

Table of Contents:

General Architecture of the VTK Pipeline

The central structure of the Visualization Toolkit is a pipeline of data, from a source of information to an image rendered on the screen. A typical application will have several such pipelines, corresponding to different items appearing on the screen. These may be different representations of the same initial dataset, different selections from the input data set, or totally independent objects and images. Click on any of the colored boxes in the image below for further information on that portion of the pipeline, including discussion of some of the most useful or commonly used VTK components for that area.

Note: A very important point to note regarding the VTK pipeline implementation is that the individual modules do not necessarily update their output until they are called upon to do so by some other module. In general the data pipeline is "fired" by requesting the window to render, because the window then requests all of its inputs to update their outputs, which in turn request all of their inputs to update their outputs, etc. However sometimes it is necessary to query one of the modules before the window rendering process begins. For example, it is not uncommon to query a Source regarding its data, so that appropriate scaling parameters can be set for other modules later in the pipeline. In this case, it is necessary to manually call the update methods of the relevant modules.


Click on any of the images below to see additional information regarding the project for which it was generated and the VTK pipeline that produced it:


The three main sources of information used for developing the VTK applications described here, and for preparing this tutorial, are shown here. References specific to a particular project can be found on the appropriate project page.

  1. Will Schroeder, Ken Martin, and Bill Lorensen, "The Visualization Toolkit, 3rd Edition", Kitware, Inc., 2002,, ISBN 1-930934-07-6
  2. Kitware, Inc., "The VTK User's Guide", Kitware, Inc., 2003,, ISBN 1-930934-08-4
  3. VTK 4.2.1 on-line documentation,