The Design and Implementation Of An Object-Oriented Toolkit
For 3D Graphics And Visualization
William J. Schroeder
Kenneth M. Martin
William E. Lorensen
GE Corporate Research & Development
Abstract
The Visualization Toolkit (vtk) is a freely available C++
class library for 3D graphics and visualization. In this
paper we describe core characteristics of the toolkit. This
includes a description of object-oriented models for
graphics and visualization; methods for synchronizing
system execution; a summary of data representation
schemes; the role of C++; issues in portability across PC
and Unix systems; and how we automatically wrap the
C++ class library with interpreted languages such as
Java and Tcl. We also demonstrate the capabilities of the
system for scalar, vector, tensor, and other visualization
techniques.
1.0 Introduction
Two important trends are emerging in the computer indus-
try. These are the development of object-oriented systems
and the use of more complex user interface methods, espe-
cially the use of 3D computer graphics and visualization.
Object-oriented systems offer the possibility to create bet-
ter, more maintainable systems with reusable software
components. Computer graphics offers a window into the
computer and the virtual worlds created there; and when
coupled with visualization, enables users to rapidly
explore and understand complex systems. Taken together,
these two trends will be major forces as the computer
industry moves into the 21st century.
It is clear that 3D graphics and visualization are enter-
ing mainstream use. As evidence of this we cite the wide-
spread use of 3D graphics in the entertainment and
gaming industries, and its support on the PC. For example,
there are now several 3D graphics software API’s on the
PC, including OpenGL [1], and hardware boards ranging
in cost from hundreds to thousands of US dollars.
Object-oriented (OO) methods are now widely recog-
nized as effective software design and implementation
tools. Design methodologies from such researchers as
Rumbaugh [2] and Booch [3] are receiving widespread
attention, while C++ [4], SmallTalk [5], and other object-
oriented languages have become widely successful soft-
ware tools. Also, a variety of class libraries are available,
ranging from standard data structures to mathematics and
numerical equation solvers.
These trends have only recently converged (in the last
half-decade) into object-oriented tools for 3D graphics
and visualization. They have influenced commercial sys-
tems such as AVS [6], IBM Data Explorer [7], and Iris
Explorer [8], which exhibit object-oriented features such
as modular and extensible components. However, despite
such features, not all systems are implemented using OO
techniques and languages, and are often difficult to use
independent of their graphical user environment.
In this paper we describe our efforts towards building a
object-oriented toolkit, referred to as vtk, for 3D graphics
and visualization [9]. We begin by listing our design
goals and follow with an overview of our object design.
In the implementation section we discuss many important
issues such as graphics portability; design for an inter-
preted language; and our method for updating the visual-
ization network. We conclude with examples to
demonstrate central features of our design.
2.0 Design Goals
From the inception of the toolkit, we had a series of high-
level design goals. These goals were based on our previ-
ous work with a proprietary system we referred to as
LYMB/VISAGE [10][11], as well as our experience deal-
ing with user’s of visualization systems. These goals are
described in the subsections that follow.
2.1 Toolkit Philosophy
One important lesson we learned is that building large,
monolithic systems is detrimental to software flexibility.
As a result, we wanted to create a sharply focused object
library that we could easily embed and distribute into our
applications. Figure 1(a) illustrates the basic idea. Tool-
kits enable complex applications to be built from small
pieces. The key here is that the pieces must be well
defined with simple interfaces. In this way they can be
readily assembled into larger systems.
Figure 1 System architecture
Application Level
Toolkits
Low Level
a) Building applications
with toolkits
b) Toolkit architecture
C++ Class
Library
(
compiled
)
Tcl/Tk (or Java)
Interpreted
Interface