VTK
Protected Member Functions
vtkContourLineInterpolator Class Reference

Defines API for interpolating/modifying nodes from a vtkContourRepresentation. More...

#include <vtkContourLineInterpolator.h>

Inheritance diagram for vtkContourLineInterpolator:
Inheritance graph
[legend]
Collaboration diagram for vtkContourLineInterpolator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual int InterpolateLine (vtkRenderer *ren, vtkContourRepresentation *rep, int idx1, int idx2)=0
virtual int UpdateNode (vtkRenderer *, vtkContourRepresentation *, double *vtkNotUsed(node), int vtkNotUsed(idx))
virtual void GetSpan (int nodeIndex, vtkIntArray *nodeIndices, vtkContourRepresentation *rep)

Protected Member Functions

 vtkContourLineInterpolator ()
 ~vtkContourLineInterpolator ()
typedef vtkObject Superclass
static int IsTypeOf (const char *type)
static vtkContourLineInterpolatorSafeDownCast (vtkObjectBase *o)
virtual int IsA (const char *type)
vtkContourLineInterpolatorNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual vtkObjectBaseNewInstanceInternal () const

Detailed Description

Defines API for interpolating/modifying nodes from a vtkContourRepresentation.

vtkContourLineInterpolator is an abstract base class for interpolators that work are used by the contour representation class to interpolate and/or modify nodes in a contour. Subclasses must override the virtual method: InterpolateLine. This is used by the contour representation to give the interpolator a chance to define an interpolation scheme between nodes. See vtkBezierContourLineInterpolator for a concrete implementation. Subclasses may also override, UpdateNode. This provides a way for the representation to give the interpolator a chance to modify the nodes, as the user constructs the contours. For instance a sticky contour widget may be implemented that moves nodes to nearby regions of high gradient, to be used in contour guided segmentation.

Definition at line 42 of file vtkContourLineInterpolator.h.


Member Typedef Documentation


Constructor & Destructor Documentation


Member Function Documentation

static int vtkContourLineInterpolator::IsTypeOf ( const char *  type) [static]
virtual int vtkContourLineInterpolator::IsA ( const char *  type) [virtual]
virtual vtkObjectBase* vtkContourLineInterpolator::NewInstanceInternal ( ) const [protected, virtual]
void vtkContourLineInterpolator::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]
virtual int vtkContourLineInterpolator::InterpolateLine ( vtkRenderer ren,
vtkContourRepresentation rep,
int  idx1,
int  idx2 
) [pure virtual]

Subclasses that wish to interpolate a line segment must implement this. For instance vtkBezierContourLineInterpolator adds nodes between idx1 and idx2, that allow the contour to adhere to a bezier curve.

Implemented in vtkTerrainContourLineInterpolator, vtkDijkstraImageContourLineInterpolator, vtkPolygonalSurfaceContourLineInterpolator, vtkLinearContourLineInterpolator, vtkPolyDataContourLineInterpolator, and vtkBezierContourLineInterpolator.

virtual int vtkContourLineInterpolator::UpdateNode ( vtkRenderer ,
vtkContourRepresentation ,
double vtkNotUsednode,
int   vtkNotUsedidx 
) [virtual]

The interpolator is given a chance to update the node. For instance, the vtkImageContourLineInterpolator updates the idx'th node in the contour, so it automatically sticks to edges in the vicinity as the user constructs the contour. Returns 0 if the node (world position) is unchanged.

Reimplemented in vtkTerrainContourLineInterpolator, vtkPolygonalSurfaceContourLineInterpolator, and vtkPolyDataContourLineInterpolator.

virtual void vtkContourLineInterpolator::GetSpan ( int  nodeIndex,
vtkIntArray nodeIndices,
vtkContourRepresentation rep 
) [virtual]

Span of the interpolator. ie. the number of control points its supposed to interpolate given a node. The first argument is the current nodeIndex. ie, you'd be trying to interpolate between nodes "nodeIndex" and "nodeIndex-1", unless you're closing the contour in which case, you're trying to interpolate "nodeIndex" and "Node=0". The node span is returned in a vtkIntArray. The default node span is 1 (ie. nodeIndices is a 2 tuple (nodeIndex, nodeIndex-1)). However, it need not always be 1. For instance, cubic spline interpolators, which have a span of 3 control points, it can be larger. See vtkBezierContourLineInterpolator for instance.

Reimplemented in vtkBezierContourLineInterpolator.


The documentation for this class was generated from the following file: