VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Protected Member Functions | List of all members
vtkContourLineInterpolator Class Referenceabstract

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

#include <vtkContourLineInterpolator.h>

Inheritance diagram for vtkContourLineInterpolator:
[legend]

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 vtkObjectBase * NewInstanceInternal () 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

Standard methods for instances of this class.

Definition at line 47 of file vtkContourLineInterpolator.h.

Constructor & Destructor Documentation

vtkContourLineInterpolator::vtkContourLineInterpolator ( )
protected
vtkContourLineInterpolator::~vtkContourLineInterpolator ( )
protected

Member Function Documentation

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

Standard methods for instances of this class.

virtual int vtkContourLineInterpolator::IsA ( const char *  type)
virtual
static vtkContourLineInterpolator* vtkContourLineInterpolator::SafeDownCast ( vtkObjectBase *  o)
static

Standard methods for instances of this class.

virtual vtkObjectBase* vtkContourLineInterpolator::NewInstanceInternal ( ) const
protectedvirtual
vtkContourLineInterpolator* vtkContourLineInterpolator::NewInstance ( ) const

Standard methods for instances of this class.

void vtkContourLineInterpolator::PrintSelf ( ostream &  os,
vtkIndent  indent 
)

Standard methods for instances of this class.

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: