vtkContourLineInterpolator Class Reference

#include <vtkContourLineInterpolator.h>

Inheritance diagram for vtkContourLineInterpolator:

Inheritance graph
[legend]
Collaboration diagram for vtkContourLineInterpolator:

Collaboration graph
[legend]

List of all members.


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 41 of file vtkContourLineInterpolator.h.

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

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 ()

Member Typedef Documentation


Constructor & Destructor Documentation

vtkContourLineInterpolator::vtkContourLineInterpolator (  )  [protected]

vtkContourLineInterpolator::~vtkContourLineInterpolator (  )  [protected]


Member Function Documentation

virtual const char* vtkContourLineInterpolator::GetClassName (  )  [virtual]

static int vtkContourLineInterpolator::IsTypeOf ( const char *  type  )  [static]

virtual int vtkContourLineInterpolator::IsA ( const char *  type  )  [virtual]

static vtkContourLineInterpolator* vtkContourLineInterpolator::SafeDownCast ( vtkObject o  )  [static]

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 vtkBezierContourLineInterpolator, vtkDijkstraImageContourLineInterpolator, vtkLinearContourLineInterpolator, vtkPolyDataContourLineInterpolator, vtkPolygonalSurfaceContourLineInterpolator, and vtkTerrainContourLineInterpolator.

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 vtkPolyDataContourLineInterpolator, vtkPolygonalSurfaceContourLineInterpolator, and vtkTerrainContourLineInterpolator.

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:

Generated on Wed Jun 3 18:58:16 2009 for VTK by  doxygen 1.5.6