3-D Data Visualization on Mac OS X
Pages: 1, 2, 3, 4
Moment of Truth
The installation and builds are now complete. Try running a simple demo from the /Develop/osxBin/bin directory.
cd /Develop/osxBin/bin
./vtk -f /Develop/VTK/Examples/Modelling/Tcl/expCos.tcl
Figure 3 displays the Bessel function generated by VTK. Pretty impressive, huh?
![]() expCos.tcl Bessel function example. |
Another interesting test to run to verify installation is the VisualizationAlgorithms/Tcl directory script, bandContourterrain.tcl.
./vtk -f /Develop/VTK/Examples/VisualizationAlgorithms/Tcl/
bandContourterrain.tcl
![]() bandContourterrain.tcl example. |
The VTK is now installed on your system. Now the fun and the learning curve begins!
Visualization on the Mac
I guess a whole new world has been opened up to you. Now what? To completely embrace the power of VTK, I opted to pick up the accompanying book, The Visualization Toolkit, An Object-Oriented Approach to 3D Graphics, 2nd Edition, by Schroeder, Martin, and Lorensen. The book isn't light reading--it's a textbook. If you're using the Visualization Toolkit this is a must-have. I have it open on my lap while I am looking through old MatLab source code trying to figure out how to port it over to VTK. There is a learning curve but the toolkit is well worth the effort.
Some truly impressive work with VTK is being carried out in medical research. Yves Starreveld, the key Mac OS X developer for VTK, and the person to whom I owe a great deal in helping me out, has his Web site at www.atamai.com. At Starreveld's site computer science meets brain surgery. Pretty cool! Sebastian Barre has another interesting site using VTK for biomedical engineering.
As for me, there are still some projects in computational fluid dynamics I would like to explore. Well, I guess it's time to see if the G4 is really worthy of its supercomputer reputation.
Michael J. Norton is a software engineer at Cisco Systems.
Return to the Mac DevCenter
You must be logged in to the O'Reilly Network to post a talkback.
Showing messages 1 through 18 of 18.
-
vtk hangs when invoking examples on startup
2006-07-27 19:16:42 luithelizard [Reply | View]
when i start with the location of a source file as an argument, vtk won't start right. i get the bouncing dock icon, and the figure is drawn but nothing can be done with it (hovering the mouse over it gives the spinning circle). when i start vtk with no args, and then pick the example from file -> source, everything works fine. any suggestions?
-
vtk 4.2.2 on OS X
2003-09-09 13:22:42 anonymous2 [Reply | View]
After a little effort (paths are incorrect, as someone
else mentioned), vtk with Tcl and Tk worked on
OS X (10.2.6). Running on a Powerbook G4 667 MHz,
Tcl and Tk 8.4.4. Tcl and Tk I downloaded from tcl.sourcefourge.net (Aqua DMG version) - this was newer
than the one from Atamai's website. I am using
gcc 3.3.
However, I couldn't run Mace - couldn't find the
executable, but the command "vtk -f /VTK/Examples/Modelling/Tcl/expCos.tcl" did work (page 4 of tutorial).
The path to expCos.tcl may be different in your case.
TimeRenderer and TimeRenderer2 did work fine.
This tutorial did help - couldn't compile vtk before reading
this website. I believe it's because I didn't edit the CMakeCache.txt file on page 3.
Just the paths get confusing sometimes.
-
make vtk does not work
2002-08-04 06:54:06 slarti [Reply | View]
gentle persons,
i tried to make VTK according this article (besides the fuzzy path description, which I worked out), cmake installation works flawlessly, getting the VTK-sources too. The final "make"-run sadly exits pretty early with an error while making /Develop/VTK/Utilities/freetype/src/base/ftinit.c. Strangely the errors complains about
cc1: unrecognized option `-Wno-deprecated'
while building /Utilities/freetype/src/base/ftinit.c. (The options works fine for single calls of the compiler )
The computer runs GCC version 1110, based on gcc version 3.1 20020420, MacOSX 10.1.5.
Any ideas, suggestions,clues?
cheers,
Markus
-
Has anyone got this to work?
2002-07-29 14:09:21 ttorres [Reply | View]
I am able to run ./Mace -I, but ./Mace runs just the same (ie. no interaction). TimeRenderer and TimeRenderer2 run fine.
But if I try any of the ./vtk commands on page 4, I get command not found errors. In /Develop/osxBin/bin/ I have "vtkWrapTcl" but no "vtk".
Any suggestions? Has anybody got this to work?
Teresa
-
Don't try this tutorial!!!!!!!
2002-07-23 09:49:41 paulbawon [Reply | View]
I'm having the same problems as everyone else. I've downloaded, compiled and made CMake and VTK, run the demo's and can't interact with Mace. Then when I try and soldier on with the tcl/tk I get the same error messages about not being able to find the files.
It is so anonying to see the light at the end of the tunnel yet not quite reach it.
I therefore recommend that if you haven't already, don't try this tutorial as it will drive you nuts!!!!!
-
MAC_TCL not defined in Mac OS X
2002-07-14 14:13:23 johnblommers [Reply | View]
While running make I get a message that that tclPlatDecls.h is not found. It's found in /Library/Frameworks/Tcl.framework/Headers/tcl.h and the lines in this include file are:
#if !defined(MAC_TCL)
#include "tclPlatDecls.h"
#endif
Commenting out these lines works around the problem, but the resulting binaries don't work right. The vtk windows cannot be moved, and clicking on ones that expect inputs result in a vtk console message:
SetFrontProcess failed,-600
and this happens for every single tcl script I try, even in the interactive vtk shell.
What's the trick? So close yet so far ...
- John
-
VTK with Xwindows
2002-07-10 13:58:23 nundys [Reply | View]
Hello,
I am trying to use vtk with XWindows to interface it with other apps (MayaVi) and because the Carbon recipe given here has not worked (./Mace looks like ./Mace -I). How can I recompile vtk to do that?
Thanks
Surajit
-
Carbon interactor and Tcl libraries
2002-07-05 10:27:38 zamb [Reply | View]
Hi
I get VTK to compile ok without the Tcl libraries, but I cannot get the carbon interactor to work. Forcing "iren->Start()" compiles and runs but I get exactly the same as with "% Mace -I" which is a nice plot but not interactive. Any ideas?
Second question is related to the Tcl libraries. I have installed the ones I grabbed from tcl.sourceforge.net, but I can't get the code to compile. Any help on installing the ones from the supplied link?
Thanks in advance, Ricardo -
Carbon interactor and Tcl libraries
2002-07-29 15:20:34 mnorton01 [Reply | View]
hi,
The test applications currently are not recognized by the window manager. For the test apps to receive events they require an 'app wrapper'.
It was described in this manner on the vtk list,
An app wrapper is is a collection of directories, top level ends in .app. Subdirectory
Contents contains an Info.plist file and a MacOS directory. The MacOS
directory contains the binary executable.
The easiest way to get this going is to get an example application from
Apples' sample software, download it, copy the .app directory, and replace
its binary with your Mace binary for example. Then, when you execute the
Mace binary, the app will launch, appear in the dock, and the window
manager will properly send it events.
Work is being done on the vtk build process to include this.
Mike
-
Cannot make VTK
2002-07-03 15:12:02 iansloman [Reply | View]
I seem to be having the same problem as michele. I followed your instructions to retrieving the source tree for VTK (page 4 of 10). The checkout of VTK looked good. I'm using an iBook. When trying to make VTK I get the following log on my terminal session:
/Develop/VTK 15:52:% cd /Develop/VTK
/Develop/VTK 15:54:% cd ../osxBin
/Develop/osxBin 15:54:% ls
. ..
/Develop/osxBin 15:54:% pwd
/Develop/osxBin
/Develop/osxBin 15:55:% cmake ../VTK
OK? make ../VTK? yes
make: Nothing to be done for `../VTK'.
/Develop/osxBin 15:56:%
What have I missed?
Thanks in advance.
Ian -
Cannot make VTK - it worked today
2002-07-04 10:39:32 iansloman [Reply | View]
I tried it again today - no changes only this time it worked.
I moved on and got similiar problems to michele (2). I modified the original /Develop/osxBin/CMakeCache.txt, then copied to the /Develop/VTK/CMakeCache.txt, then changed the directory to /Develop/osxBin and ran cmake ../VTK Everything seemed OK but I got the same errors as Michele when I tried the 'sanity' checks (I got the errors, but I didn't get the 'TriRate =...').
Where I have gone wrong?
Thanks in advance. Have a great Independence Day.
Ian
-
Cannot run VTK (2)
2002-06-29 11:49:40 michele [Reply | View]
Ok, I've found how to update the database:
/usr/libexec/locate.updatedb
Next, there is a discrepancy between the directory.
First, we are told to login to CVS VTK from /Develop. Then to checkout from root. And to run CMake from /Develop/osxBin with:
cmake ../VTK
VTK is not found in ../ from /Develop/osxBin
So I checkout from /Develop. Am I right?
Then, I don't understand well why we make a new CMakeCache.txt file in /Develop/VTK (it does not exist) and insert into it:
BUILD_SHARED_LIBS:BOOL=ON
though there is a CMakeCache.txt in /Develop/osxBin with the line:
BUILD_SHARED_LIBS:BOOL=OFF
Then, when I try to run TimeRenderer, I get the following error:
error: in /Develop/VTK/Rendering/vtkCarbonRenderWindow.cxx line 758 vtkCarbonRenderWindow (ox3e3cd0): Could not find valid pixel format.
Idem for Mace with a different address (0x4c7bf0).
A window appears with nothing in it. I have to quit the terminal to get access to the window and close it.
And for Tcl, I get the following error after making:
In file included from /Develop/osxBin/Common/vtkCommonTCLInit.cxx:1:
/Develop/VTK/Common/vtkTclUtil.h:24: tcl.h: No such file or directory
make[3]: *** [vtkCommonTCLInit.o] Erreur 1
make[2]: *** [default_target] Erreur 2
make[1]: *** [default_target_Common] Erreur 2
make: *** [default_target] Erreur 2
I run this on a G3, maybe that is the reason why it cannot make?
Michèle
-
Cannot make VTK
2002-06-29 01:22:46 michele [Reply | View]
Hello,
I've followed the instruction on page 1 without any problem (installing CMake).
Then at the beginning of page 2, problems begins.
First of all, the given password for the VTK source server is false. It is vtk instead of VTK.
Then, when it comes to this line:
cmake ../VTK
an error occurs:
cmake: Command not found
I'll guess I have to told the system where is the cmake Command, but, as I'm new to this stuff, I'm unable to do it.
Could you please tell me how I get my system to locate the cmake command?
Many thanks in advance
Michèle -
Cannot make VTK
2002-07-14 14:03:02 johnblommers [Reply | View]
After installing cmake sucessfully, it will be in /usr/local/bin/cmake. Did you remember to do a rehash command? Once that's done, you can use the which command and it should reveal the location of cmake.
The article is a tad confusing because the right place to install VTK is in the /Develop folder, where you should be when installing the source code with CVS. The author misspeaks when he says he put VTK in the root directory. The root directory means / and I think he means the root of the /Develop directory.
- John







