VTK is used by academicians for teaching and research; by government research institutions such as Los Alamos National Lab in the US or CINECA in Italy; and by many commercial firms who use VTK to build or extend products.
The origin of VTK is with the textbook "The Visualization Toolkit, an Object-Oriented Approach to 3D Graphics" published by Prentice Hall (ISBN 013199837-4). VTK has grown (since its initial release in 1994) to a world-wide user base in the commercial, academic, and research communities.
This README is written for VTK version 4.0 and greater. For more information, additional resources, and the FAQ see the web page at http://public.kitware.com/VTK
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.
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/buy-books.phpYou can also order the VTK User's Guide from Kitware,Inc. See the web page http://www.kitware.com/products/vtkguide.html
On-line Doxygen man pages are also available at http://public.kitware.com/VTK/doc/nightly/html/
The following instructions only apply to UNIX systems. First we will give you the quick and dirty way to build VTK:
If you will be using C++ as your development language (no Tcl/Tk, Python or Java support):
1) untar the src files 2) untar the data files 3) cd VTK 4) cmake -i (run cmake in wizard mode, where you have to answer questions about the build) or 4) ccmake (run the terminal based interface to cmake where you interactively change build options) 5) if necessary change build options 6) 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 ccmake (or cmake -i).
If you want to build the VTK interpreter then you will need to have Tcl and Tk (8.2 or newer). Look to http://www.scriptics.com for information about getting Tcl and Tk. To turn on Tcl wrapping, set VTK_WRAP_TCL to ON during the configuration process (as a post-build step, you might want to check the Wrapping/Tcl/README file). You will then have to set the values for Tcl/Tk include directories and libraries. 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 you can have one copy of the VTK tree and compile it in a different manner (out-of-source). 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 cmake similar to the following example:
ls /home/joe_user vtk vtk-solaris vtk-sgi cd vtk-solaris ccmake /home/joe_user/VTK or cmake -i /home/joe_user/VTKThis will create makefiles in the vtk-solaris directory. Then you can run make in vtk-solaris to compile VTK. Repeate this process for each architecture you wish to build.
The build process for Cygwin is almost exactly the same as the UNIX build process (see previous section)
If you will be using C++ as your development language (no Tcl/Tk, Python or Java support):
1) untar the src files 2) untar the data files 3) cd VTK 4) cmake -i (run cmake in wizard mode, where you have to answer questions about the build) or 4) ccmake (run the terminal based interface to cmake where you interactively change build options) 5) if necessary change build options 6) makeFor tcl/tk support, you have to install the cygwin sources for tcl/tk, then set the following options:
TK_INCLUDE_PATH /usr/src/tcltk-20001125-1/tk/generic/ TK_INTERNAL_PATH /usr/src/tcltk-20001125-1/tk/win/ TK_XLIB_PATH /usr/src/tcltk-20001125-1/tk/xlib
The PC build process uses the CMake GUI CMakeSetup. Then you use the compiler make utility to compile as follows.
1) Install vtk 4.0 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.
1) Download the data at ftp://public.kitware.com/pub/vtk/VTKData.tgz 2) Checkout the data from CVS using the folling commands: cvs -d :pserver:anonymous@public.kitware.com:/vtk/cvsroot login (respond with password vtk) cvs -d :pserver:anonymous@public.kitware.com:/vtk/cvsroot checkout VTKData
vtk mace.tclNote that most Tcl scripts allow you to type "u" in the render window to obtain an interpreter. You can use the interpreter to modify the application at run-time.
1) Create a new directory called VTK/Local. 2) Create a file called LocalUserOptions.cmake in VTK/. In that file, add the command "SUBDIRS(Local)". This will add the Local directory to the build. 3) Create the .cxx and .h file for the new class in VTK/Local. Make sure that you use VTK conventions to insure that the wrapping occurs correctly. Complex code may break the wrapper parser; use //BTX and //ETX around the code to fix this. 4) Create a CMakeLists.txt in VTK/Local. You can model it after a CMakeList.txt file found in another directory (like VTK/IO/CMakeLists.txt). 5) Rerun ccmake (Unix) or CMakeSetup.exe (Windows). 6) Then make/gmake (Unix) or msdev (Windows).
Commercial support contracts are available from Kitware at http://www.kitware.com/products/vtksupport.html.
Kitware also provides consulting services. Read more at http://www.kitware.com/products/consult.html.
Training is also available from Kitware. See http://www.kitware.com/products/vtktrain.html.