macdevcenter.com
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button

3-D Data Visualization on Mac OS X
Pages: 1, 2, 3, 4

Mac OS X Installation of VTK

Now you will need to download the latest software revision of VTK. First you will want to create two directories. The first directory is /Develop.




mkdir /Develop
cd /Develop

Inside the /Develop directory, create the following directory:

mkdir /Develop/osxBin

The reasoning behind this is that the VTK directory will contain the source code and the osxBin directory will be the location where we create our VTK builds. The recommendation from the VTK experts is to keep these directories separate. Now you need to make sure you are in the /Develop directory for CVS VTK software download.

cd /Develop

Again, we will use CVS to retrieve the software and build the source tree. You will start by logging into the CVS system:

cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/VTK login

The password is VTK. Once you have logged in you may proceed with checking out the source code tree. Make sure you are in the directory you wish to install the VTK directory. I installed VTK in the root directory.


cd /
cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/VTK checkout VTK

Quick note: If you're a developer you can frequently update your source VTK source tree with the following CVS command:

cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/VTK update -dAP

Once the VTK source tree is installed you need to run CMake from inside the /Develop/osxBin directory.


cd /Develop/osxBin
cmake ../VTK

This invocation of CMake will set up VTK for a build and it will generate a /Develop/osxBin/CMakeCache.txt file. We will need to edit the /Develop/VTK/CMakeCache.txt file for the CMake utility to build our Mac OS X-specific VTK. Use any Unix editor utility that is familiar to you. I prefer to use Emacs and vi. Mac OS X has an editor called pico included with the base operating system installation. You can use pico if you don't have gnu emacs or you don't want to bother with the hassle of the vi editor.

pico CMakeCache.txt

You need to add to CMakeCache.txt the following configurations:


// OS X CMake build VTK with shared libraries
BUILD_SHARED_LIBS:BOOL=ON

The key sequence CTRL-X exits pico. Once you have made these changes save the /Develop/VTK/CMakeCache.txt file and change your directory back to your /Develop/osxBin directory. Run CMake.


cd /Develop/osxBin
cmake ../VTK

Once the CMake utility is successfully completed run the make utility from the /Develop/osxBin directory.

make

The make utility will execute for some time. This may be a good time for a bathroom break or to go make a sandwich. When the make utility finally completes the VTK software installation is done.

My G4 450 executed the VTK make in about 40 minutes. While you're waiting you may also wish to go ahead and CVS check out the VTK image data.


cd /Develop
cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/VTKData login
password: vtk
cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/VTKData co VTKData

The VTK Data directory contains files and images that allow you to run the VTK demomstrations.

Pages: 1, 2, 3, 4

Next Pagearrow