CMSC 636:
Data Visualization
Computer Science and Electrical Engineering Department
University of Maryland Baltimore County
Visualization Construction Assignment
Due: September 23, 2005
Project Description
In this assigment you will create a variety of simple scalar visualizations and
an interactively controllable camera with which to view them. In the process
you will become more familiar with the range of visualization options available
and how to accomplish what you want in vtk. Many of the group projects may later
build upon this framework.
What to do
Write vtk scripts which:
-
create two very different visualizations of two different 2D scalar data set
(two visualizations for each data set -- four total).
Possibilities include:
-
map the data values redundantly to color and height (producing a carpet or mountain plot).
-
map the data points to glyphs
-
show contours of data values
-
provide interactive control of the visualization. Options include:
-
interactive camera control of camera position, roll, azimuth, elevation, etc.
-
interactive parameter control of isolevel, slice number, or whatever is relevent
to the specific visualization technique used.
You should set things up so that this code can be used by any similar
scripts you write.
-
Annotate your visualizations appropriately with things such as bounding boxes,
axis labels, legends, etc.
The data
The data files for this assignment can be found in:
/data/gavl2/data/636/
What is vtk?
vtk is a visualization library with a Tcl/tk interface (among others).
You can write visualization code
using either Tcl or C++ (or other options). For this assigment, the
Tcl interface is probably easiest. The vtk User's Guide gives really good
examples of common visualization techniques.
Documentation of
vtk objects and methods is available
online. Other information about using vtk is also available on the
vtk home page.
vtk is available locally on
-
vtk root: /data/gavl3/IDtkRelease/vtk-new/
-
linux: /data/gavl3/IDtkRelease/vtk-new/bin/vtk (executable)
Alternatively, you can also
install vtk on the machine of your choice (running UNIX, Linux, Windows).
Download the latest version from the
vtk home page.
If you use a machine other than those in cs for development, the version you
turn in must also run properly on a cs machine. This should require only
trivial modifications (if any), but they're your responsibility.
Running vtk scripts
Before you run vtk, you will need to set up various environment variables.
-
Set the VTK_DATA_ROOT variable to indicate the location of the datasets. In tcsh, this can be done using the command setenv VTK_DATA_ROOT "/data/gavl3/IDtkRelease/vtk-new/VTKData"
-
Add /data/gavl3/IDtkRelease/vtk-new/bin to your system path, to facilitate use of the vtk executable in any directory
To run a script, make sure that the correct bin is in your path and type:
vtk yourscript.tcl
where yourscript.tcl is the name of the script that you have written.
How to begin
Example vtk scripts are available in (vtk root)/src/VTK/Examples. Some other
scripts are included in the User's Guide (these generally have more explanation than the
ones online). Try a few of these scripts to get the hang of how they work. Then use a
simple one as a template for your script.
What to turn in
Turn in your vtk scripts by submitting your scripts using the command
submit cs636 Proj1 files_names
All necessary pieces
should be included and data file pathnames should be absolute so that they
work from anywhere. You should also submit copies of the images produced
by by your scripts. The header comments
should describe the visualization and the user interface and specify
which cs machine you think this runs on. Your comments should also
credit any source material you used (for instance, the vtk scripts that you used as
templates or classmates who gave you help on getting vtk to do what you want). In-line
comments are left to your discretion, but may increase your partial credit in the event that
your program does not work as intended.