vtkContourRepresentation

Section: Visualization Toolkit Widget Classes

Usage

The vtkContourRepresentation is a superclass for various types of representations for the vtkContourWidget.

.SECTION Managing contour points The classes vtkContourRepresentationNode, vtkContourRepresentationInternals, vtkContourRepresentationPoint manage the data structure used to represent nodes and points on a contour. A contour may contain several nodes and several more points. Nodes are usually the result of user clicked points on the contour. Additional points are created between nodes to generate a smooth curve using some Interpolator. See the method \c SetLineInterpolator. \par The data structure stores both the world and display positions for every point. (This may seem like a duplication.) The default behaviour of this class is to use the WorldPosition to do all the math. Typically a point is added at a given display position. Its corresponding world position is computed using the point placer and stored. Any query of the display position of a stored point is done via the Renderer, which computes the display position given a world position. \par So why maintain the display position ? Consider drawing a contour on a volume widget. You might want the contour to be located at a certain world position in the volume or you might want to be overlayed over the window like an Actor2D. The default behaviour of this class is to provide the former behaviour.

\par To achieve the latter behaviour override the methods that return the display position (to return the set display position instead of computing it from the world positions) and the method \c BuildLines() to interpolate lines using their display positions intead of world positions.

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

  obj = vtkContourRepresentation

Methods

The class vtkContourRepresentation 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 vtkContourRepresentation class.