VTK@CBA
This page is intended to serve as a small guide for people at CBA who wants
to get started visualizing their data with VTK.
Useful information
- The version of VTK that is installed at CBA is VTK 4.2.
- The VTK libraries are located in /usr/local/lib/vtk/
and the include files are in /usr/local/include/vtk/.
- The VTK executables are /usr/local/bin/vtk
for Tcl/Tk scripts, and /usr/local/bin/vtkpython
for running python scripts (this is already in your path).
- Code examples, example data, and documentation files can be found in
/usr/local/vtk/. The documentation is
the same as on www.vtk.org, but it is
very much faster since it is offline.
- Windows version: VTK is also installed on IPREN (upstairs) and
TRIXIG (laptop) in C:\VTK.
- If you want to compile your own C++ code you should generate makefiles
with CMake. CMake examines the file
CMakeLists.txt to generate makefiles (or project)
for the desired environment. On the Unix-system you can generate
standard Unix makefiles, and on the Windows machines you can generate
Borland makefiles or Visual C++ projects. See the C++ version of the
isosurface example for an example on
how to compile.
- The books VTK Textbook, VTK User's guide, and
Mastering CMake are available at CBA.
VTK Examples
These are just small examples, see VTK.org
for many more.
VTK File format
To be able to use VTK to visualize your own data you need to convert it
to a VTK data set in some way. One (simple) way to do is to convert your files
to the VTK file format. A description is available here:
file-formats.pdf. If you want to
convert raw image data to the VTK format (structured points),
you can use this small C++ program:
rawToVTK.cpp. If you use MATLAB you can use
the functions readVTK.m and
writeVTK.m to both
read and write VTK structured points (binary).
In VTK you should use vtkStructuredPointsReader and
vtkStructuredPointsWriter.
VTK Seminar slides
The seminar slides from 2004-09-20 is available here:
VTK Links
- VTK.org
The number one page for all VTK users. Browse this page! You will find
everything from lecture notes to advanced code examples.
- MayaVi
A VTK-based data visualizing program with a Tk-based graphical user
interface. If you are curious about VTK, I can really recommend this!
- CMake
Cross platform build tool.
- Python
Python resources and documentation.
- Tcl/Tk
Tcl/Tk resources and documentation.
- ITK.org
The Insight Segmentation and Registration Toolkit.
If you need more image processing and image analysis tools
this is the package. Easy to combine with VTK.
- Kitware
The corporation behind VTK, ITK, and CMake.