VTK
The Visualization ToolKit (VTK) is an open source, freely available software system for 3D computer graphics, image processing, and visualization used by thousands of researchers and developers around the world. VTK consists of a C++ class library, and several interpreted interface layers including Tcl/Tk, Java, and Python. Professional support and products for VTK are provided by Kitware, Inc. (www.kitware.com) VTK supports a wide variety of visualization algorithms including scalar, vector, tensor, texture, and volumetric methods; and advanced modeling techniques such as implicit modelling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay triangulation. In addition, dozens of imaging algorithms have been directly integrated to allow the user to mix 2D imaging / 3D graphics algorithms and data.
Documentation Improvement
(If you agree, sign the petition!!)
In my experience, the single most important factor that influences a users attitude about a software package is its ease of use. VTK provides a phenomenal collection of tools for scientific data processing and visualization. However, if a user has difficulty accessing these tools, their experience with, and therefore opinion of, the software will be less than satisfactory. Documentation is the key element which controls this difficulty level. I propose some improvements to the documentation system here.
Example Usage (C++)
These are fully independent, compilable examples. There is significant overlap in the examples, but they are each intended to illustrate a different concept and be fully stand alone compilable.
Please add examples in your areas of expertise!
Getting Started
- Which Libraries Do I Link To?
- Which Header Files Do I Include?
- Typical CMakeLists.txt file
- Environment Setup
Simple Operations
- Distance between two points
- Random number (uniform distribution)
- Random number (Gaussian distribution)
Working with PolyData
- Useful Classes
- Read a VTP file
- Read a plain text file into a polydata
- Write a file of triangle corners
- Write a file of triangle corners (+vertices)
- Write a file of a triangle
- Write a file of colored triangle vertices
- Write a file of a colored triangle
- Write a file of a solid color triangle
- Write a sphere to a VTP file
- Write a plane to a VTP file
- Write two cubes to a VTP file
- Add Normals to a Polydata
- Point and Cell Normals
- Add Miscellaneous Data to Points in a Polydata
- Get Miscellaneous Data from Points in a Polydata
- Add Miscellaneous Data to Cells in a Polydata
- Get Miscellaneous Data from Cells in a Polydata
- Add Global Miscellaneous Data to a Polydata
- Extract Normals from a Polydata
- Get the names of all of the data arrays
- Determine data types of arrays
- Add a line to a Polydata
- Add colored lines to a Polydata
Other File Types
Data Structures
Filters
- Apply a Transformation to Points
- Landmark Transform
- Iterative Closest Points (ICP) Transform
- Triangulate a Terrain Map
- Create a surface from Unorganized Points
- Create a surface from Unorganized Points (Gaussian Splat)
- Create models from labeled volume data (Discrete MarchingCubes)
- Create cubes from labeled volume data
Visualization
Needed/Missing Examples!
Example Usage (Python)
Getting Started
Working with PolyData
- Write the corners of a triangle to a file (python)
- Write the corners of a triangle to a file (+vertices) (python)
- Write a triangle with colored points (python)
- Write a colored triangle (python)
- Write a solid colored triangle (python)
- Write a triangle to a file (python)
- Iterative Closest Points (ICP) (python)
Creating a dashboard submission
It is impossible for developers to test code on every operating system, compiler, and configuration. By creating a dashboard submission, you can help them find bugs that could be affecting many users but are transparent to some developers. The idea is to get the latest source code, compile it, and run a battery of tests - reporting any compile, build, and test errors to a system which very neatly arranges the results (http://www.cdash.org/CDash/index.php?project=VTK).
It is recommended to not use the same build you work with daily for you dashboard submission. If there is a problem with the nightly cvs, your code may not compile the next day!
To get started, create a new directory called /home/username/Dashboards/VTK. It does not actually have to be in this exactly directory, but this path will be used throughout this example to make the ideas concrete. cd to your new directory and run these commands to check out an initial version of VTK and data sets used for testing.
Here is an example cmake dashboard file.
You will probably want to submit a dashboard every night, so you can add a cronjob. Run 'crontab -e' and enter the following command <source lang="text"> 0 1 * * * ctest -S /home/username/Dashboards/VTK/dashboard.cmake -V > /home/username/Dashboards/VTK/dashboard.log 2>&1 </source>
This says "at 1:00 AM, every day, every month, run the dashboard tests and log verbose output to dashboard.log".
Examples for Developers
Wiki Sandbox
Administrative Topics
- Where can I find more information about VTK?
- Where can I download VTK?
- Where can I download a tarball of the nightly HTML documentation?
- Where can I get VTK Datasets?
- VTK Patch Procedure -- merge requests for the current release branch
- What are some projects using VTK?
Current Projects
- VTK Graph Layout
- VTK Java Wrapping
- Composite Data Redesign
- VTK Widget Redesign
- Shaders in VTK
- VTK with Matlab
- VTK Time support
- VTK Depth Peeling
- VTK Multi-Pass Rendering
- Using VTK with JRuby
- Painters
- Cray XT3 Compilation
- Statistics
- Array Refactoring
- Multicore and Streaming
- 3DConnexion Devices Support
External Links
- IMTEK Mathematica Supplement (IMS), the Open Source IMTEK Mathematica Supplement (IMS) interfaces VTK and generates ParaView batch scripts
- [1], VTK examples in C# (Visual Studio 5.0 and .NET 2.0)
Development Process
The VTK Community is upgrading its development process. We are doing this in response to the continuing and rapid growth of the toolkit. A VTK ARB is being put in place to provide strategic guidance to the community, and individuals are being identified as leaders in various VTK subsystems.