(original) (raw)

About the Examples

The VTK source distribution includes a sizeable number of examples. The goal of the VTK examples is to illustrate specific VTK concepts in a consistent and simple format. Some have been there since the inception of the toolkit. These examples have been subject to peer review and revision over the years. However, these examples only cover a small part of the capabilities of VTK.

Hundreds of tests are distributed with the toolkit source. The tests reside in ''Kit''/Testing directories (for example, Filters/Points/Testing) in the source distribution. However, these tests are meant to exercise the toolkit rather than illustrate how to use it. For the most part, the tests are not good educational resources.

We are now using github pages to provide examples that will help both new and experienced VTK users. The examples can be used to find examples that answer questions like, "How do I extract normals from a filter's output?", "How do I generate models from segmented data?", and "How do I compute the area of a triangle?", just to name a few.

Over time we hope that the examples will answer many of the users' questions. Some questions won't have a solution in the current example repertoire. For those questions, we encourage the user to create a simple example that illustrates either a dilemma or a new solution.

Available Languages

Examples are available for the following programming languages:

The above examples demonstrate how to use VTK functionalities. There are also examples specifically to demonstrate how to write code as a VTK filter using VTK techniques. This is helpful so that your custom code can be called in a fashion that other people are already familiar with. It is also necessary if you plan to contribute your classes to VTK.

Test Data

Many of these examples require data in order to run. For most of the Python and C++ examples the required files will be specified in the source code or the description.

If you have checked out the vtk-examples repository, these data files are found in the folder src/Testing/Data. Otherwise individual data files can be downloaded from here.

Be aware:

Trame

These examples consist of tarfiles that you download, set up and run.

Information about the VTK Examples

How can I help?

This project has grown to be very large. We are always looking for people to help the cause. You can help by: