Visualizing with VTK
The official source code release of VTK is available from the VTK home page at http://www.kitware.com/vtk.html. For the more daring, almost-daily beta releases are available from http://www.kitware.com/vtkData/Nightly.html. On the average Linux system, software required to compile and run VTK includes the following: C++, OpenGL (or Mesa), tkUnixPort.h (from the Tk source distribution), Tcl 7.4 or higher, Tk 4.0 or higher. If you plan to use the Python or Java bindings to VTK, you will need those packages as well.
The VTK source code is written entirely in C++, and as of version 2.0 with Linux 2.0.31 and either libc5 or libc6, it compiles successfully without error with Mesa 2.5 and Tcl/Tk 8.0. In the README file at the top of the distribution, the user will find all the instructions necessary to do the build. Here's what I did:
Obtained and compiled Mesa (easy).
Retrieved tkUnixPort.h from the Tk source distribution and placed it in the (vtk_top_dir)/unix/directory (I used Tcl/Tk 8.0).
Ran ./configure --with-mesa --with-tcl --with-shared --with-tkwidget --with-patented
Edited user.make to find all the necessary support files.
Ran make install (optional; run only if you have the disk space).
Many more configuration options are available and can be seen by typing ./configure --help. I had trouble with the Python and Java bindings. The build, as configured above, takes about an hour on a Pentium-Pro 200MHz machine.
Many examples are available to test the installation in the (vtk_top_dir)/[graphics|imaging|patented|contrib]/examples[Cxx|tcl|Python] directories. Most imaging examples require the vtkdata archive to also be located at the VTK home site. Graphics examples will, for the most part, run as is. For the C++ examples, compile with make and run. Tcl examples can be run by typing the following from the Tcl examples directory: ../../tcl/vtk example_file.tcl, or, if vtk has been installed, vtk example_file.tcl. Examples employing the TkRenderWidget object cause a segmentation fault when using the XFree SVGA server, but work with the S3 server. (I haven't tested others.) Fortunately, TkRenderWidget is not required for any visualization pipeline; you can't embed the render window in a Tk window. However, this problem will likely be solved by the time you read this article.
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems
Join editor Bill Childers and Bit9's Paul Riegle on April 27 at 12pm Central to learn how to keep your Linux systems secure.
Free to Linux Journal readers.Register Now!
|diff -u: What's New in Kernel Development||Aug 20, 2014|
|Security Hardening with Ansible||Aug 18, 2014|
|Monitoring Android Traffic with Wireshark||Aug 14, 2014|
|IndieBox: for Gamers Who Miss Boxes!||Aug 13, 2014|
|Non-Linux FOSS: a Virtualized Cisco Infrastructure?||Aug 11, 2014|
|Linux Security Threats on the Rise||Aug 08, 2014|
- diff -u: What's New in Kernel Development
- Tech Tip: Really Simple HTTP Server with Python
- Security Hardening with Ansible
- NSA: Linux Journal is an "extremist forum" and its readers get flagged for extra surveillance
- Monitoring Android Traffic with Wireshark
- RSS Feeds
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- [<Megashare>] Watch Mrs Brown's Boys Movie Online Full Movie HD 2014
- Building a Two-Node Linux Cluster with Heartbeat
- Examining Load Average