Welcome To The Visualization Toolkit
Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. * Modified source versions must be plainly marked as such, and must not be misrepresented as being the original software. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This is VTK version 3.2. For more information and a FAQ see our web page at http://www.kitware.com
The Visualization Toolkit, An Object-Oriented Approach to 3D Graphics by Will Schroeder, Ken Martin and Bill Lorensen. Prentice Hall, Second Edition. http://public.kitware.com/VTK/buyBooks.htmlYou can also order the VTK User's Guide from Kitware,Inc. See the web page http://www.kitware.com/products/vtkguide.html
First we will give you the quick and dirty way to build VTK. If you have OpenGL do the following:
If you will be using C++ as your development language:
1) untar the src files 2) untar the data files 3) cd vtk 4) cmake 5) read and edit CMakeCache.txt adding options like python or tcl/tk support. 6) cmake 7) makeIt is a very good idea to tell cmake what C and C++ compilers you will be using. This can avoid many build problems. On most systems you can pass this information to configure in the following way:
env CXX=/your/C++/compiler CC=/your/c/compiler cmakeotherwise you must set CXX and CC in your environment and then run configure.
Now here is the slightly more detailed description of the build process.
There are a couple of options in building the software that you need to decide on. First you need to decide if you are going to use the Mesa rendering library developed by Brian Paul. This is a software renderer that VTK can use on Xwindows based workstations. If your workstation doesn't support OpenGL then you will need Mesa because you have no other choice :-) If you want to build the VTK interpreter then you will need to have Tcl8.2.3 and Tk8.2.3.
Look to http://www.scriptics.com/ for information about getting Tcl and Tk. To obtain a copy of Mesa, written by Brian Paul, you can visit http://www.ssec.wisc.edu/~brianp/Mesa.html.
To build VTK in the distribution directory just type cmake You can turn on tcl or mesa by editing the CMakeCache.txt file if you would like to use those packages as well. Building VTK for multiple architectures will be discussed later.
If you are planning to build VTK for multiple architectures then you can either make a copy of the entire VTK tree for each architecture and then follow the instructions above. Or if you have gmake, you can have one copy of the VTK tree and compile it in a different manner. Instead of running cmake from the VTK directory, create a new directory where you have some free disk space (not in the VTK tree), a possible name would be vtk-solaris. cd into this directory and then run configure similar to the following example:
ls /home/joe_user
vtk vtk-solaris vtk-sgi
cd vtk-solaris
cmake /home/joe_user/vtk
This will create makefiles in the vtk-solaris directory. Then you can run
gmake in vtk-solaris to compile VTK. Repeate this process for each
architecture you wish to build.
1) untar the src files
2) untar the data files
3) cd vtk
4) cmake
5) read and edit CMakeCache.txt adding options like python or tcl/tk support.
5.1) for tcl/tk support, you have to install the cygwin sources for tcl/tk, then
set the following variables in the cache file:
TK_INCLUDE_PATH:PATH=/usr/src/tcltk-20001125-1/tk/generic/
TK_INTERNAL_PATH:PATH=/usr/src/tcltk-20001125-1/tk/win/
TK_XLIB_PATH:PATH=/usr/src/tcltk-20001125-1/tk/xlib
6) cmake
7) make
1. Install vtk3.2 distribution by unzipping into the appropriate directory.
2. Execute CMakeSetup. This will pop-up a little
GUI that allows you to tailor the build. It then starts
building .dsw and .dsp files for microsoft, or makefiles for borland.
You'll have to tell CMakeSetup
where you've placed your VTK source code, and where to build
the object code and dll's (we'll call it "vtkbin").
3. When CMakeSetup completes, start up msdev and load VTK.dsw.
Select ALL_BUILD project, and build it.
We recommend a 300MByte minimum swap size or you'll have trouble
during the link phase.
To run the cc examples just type their name. To run the tcl examples, (assuming that you built the tcl stuff) type
../../../vtk/tcl/vtk mace.tcl
1) create the .cxx and .h file for the new class in one of the existing directories. We recommend that you use the local/ directory. 2) edit CMakeLists.txt for that directory and follow the instructions in there. You will need to add the class in only one place. 3) you will need to rerun cmake (Unix) or CMakeSetup (Windows) 4) then make/gmake (Unix) or msdev (Windows).