FreeMat

- Main Page
- Related Pages

vtkUnstructuredGridBunykRayCastFunction

Section: Visualization Toolkit Volume Rendering Classes

# Usage

vtkUnstructuredGridBunykRayCastFunction is a concrete implementation of a ray cast function for unstructured grid data. This class was based on the paper "Simple, Fast, Robust Ray Casting of Irregular Grids" by Paul Bunyk, Arie Kaufmna, and Claudio Silva. This method is quite memory intensive (with extra explicit copies of the data) and therefore should not be used for very large data. This method assumes that the input data is composed entirely of tetras - use vtkDataSetTriangleFilter before setting the input on the mapper.

The basic idea of this method is as follows:

1) Enumerate the triangles. At each triangle have space for some information that will be used during rendering. This includes which tetra the triangles belong to, the plane equation and the Barycentric coefficients.

2) Keep a reference to all four triangles for each tetra.

3) At the beginning of each render, do the precomputation. This includes creating an array of transformed points (in view coordinates) and computing the view dependent info per triangle (plane equations and barycentric coords in view space)

4) Find all front facing boundary triangles (a triangle is on the boundary if it belongs to only one tetra). For each triangle, find all pixels in the image that intersect the triangle, and add this to the sorted (by depth) intersection list at each pixel.

5) For each ray cast, traverse the intersection list. At each intersection, accumulate opacity and color contribution per tetra along the ray until you reach an exiting triangle (on the boundary).

To create an instance of class vtkUnstructuredGridBunykRayCastFunction, simply invoke its constructor as follows

      obj = vtkUnstructuredGridBunykRayCastFunction

# Methods

The class vtkUnstructuredGridBunykRayCastFunction has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkUnstructuredGridBunykRayCastFunction class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkUnstructuredGridBunykRayCastFunction = obj.NewInstance ()`
- `vtkUnstructuredGridBunykRayCastFunction = obj.SafeDownCast (vtkObject o)`