VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkDeformPointSet Class Reference

use a control polyhedron to deform an input vtkPointSet More...

#include <vtkDeformPointSet.h>

Inherits vtkPointSetAlgorithm.

Public Member Functions

void SetControlMeshConnection (vtkAlgorithmOutput *algOutput)
 
void SetControlMeshData (vtkPolyData *controlMesh)
 
vtkPolyData * GetControlMeshData ()
 
virtual void SetInitializeWeights (int)
 
virtual int GetInitializeWeights ()
 
virtual void InitializeWeightsOn ()
 
virtual void InitializeWeightsOff ()
 

Protected Member Functions

 vtkDeformPointSet ()
 
 ~vtkDeformPointSet ()
 
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 

Protected Attributes

int InitializeWeights
 
vtkIdType InitialNumberOfControlMeshPoints
 
vtkIdType InitialNumberOfControlMeshCells
 
vtkIdType InitialNumberOfPointSetPoints
 
vtkIdType InitialNumberOfPointSetCells
 
vtkSmartPointer< vtkDoubleArray > Weights
 
typedef vtkPointSetAlgorithm Superclass
 
static vtkDeformPointSetNew ()
 
static int IsTypeOf (const char *type)
 
static vtkDeformPointSetSafeDownCast (vtkObjectBase *o)
 
virtual int IsA (const char *type)
 
vtkDeformPointSetNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual vtkObjectBase * NewInstanceInternal () const
 

Detailed Description

use a control polyhedron to deform an input vtkPointSet

vtkDeformPointSet is a filter that uses a control polyhdron to deform an input dataset of type vtkPointSet. The control polyhedron (or mesh) must be a closed, manifold surface.

The filter executes as follows. In initial pipeline execution, the control mesh and input vtkPointSet are assumed in undeformed position, and an initial set of interpolation weights are computed for each point in the vtkPointSet (one interpolation weight value for each point in the control mesh). The filter then stores these interpolation weights after filter execution. The next time the filter executes, assuming that the number of points/cells in the control mesh and vtkPointSet have not changed, the points in the vtkPointSet are recomputed based on the original weights. Hence if the control mesh has been deformed, it will in turn cause deformation in the vtkPointSet. This can be used to animate or edit the geometry of the vtkPointSet.

Warning
Note that a set of interpolation weights per point in the vtkPointSet is maintained. The number of interpolation weights is the number of points in the control mesh. Hence keep the control mesh small in size or a n^2 data explostion will occur.
The filter maintains interpolation weights between executions (after the initial execution pass computes the interpolation weights). You can explicitly cause the filter to reinitialize by setting the InitializeWeights boolean to true. By default, the filter will execute and then set InitializeWeights to false.
This work was motivated by the work of Tao Ju et al in "Mesh Value Coordinates for Closed Triangular Meshes." The MVC algorithm is currently used to generate interpolation weights. However, in the future this filter may be extended to provide other interpolation functions.
A final note: point data and cell data are passed from the input to the output. Only the point coordinates of the input vtkPointSet are modified.
See Also
vtkMeanValueCoordinatesInterpolator vtkProbePolyhedron vtkPolyhedron
Tests:
vtkDeformPointSet (Tests)

Definition at line 76 of file vtkDeformPointSet.h.

Member Typedef Documentation

typedef vtkPointSetAlgorithm vtkDeformPointSet::Superclass

Standard methods for instantiable (i.e., concrete) class.

Definition at line 82 of file vtkDeformPointSet.h.

Constructor & Destructor Documentation

vtkDeformPointSet::vtkDeformPointSet ( )
protected
vtkDeformPointSet::~vtkDeformPointSet ( )
protected

Member Function Documentation

static vtkDeformPointSet* vtkDeformPointSet::New ( )
static

Standard methods for instantiable (i.e., concrete) class.

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

Standard methods for instantiable (i.e., concrete) class.

virtual int vtkDeformPointSet::IsA ( const char *  type)
virtual

Standard methods for instantiable (i.e., concrete) class.

static vtkDeformPointSet* vtkDeformPointSet::SafeDownCast ( vtkObjectBase *  o)
static

Standard methods for instantiable (i.e., concrete) class.

virtual vtkObjectBase* vtkDeformPointSet::NewInstanceInternal ( ) const
protectedvirtual

Standard methods for instantiable (i.e., concrete) class.

vtkDeformPointSet* vtkDeformPointSet::NewInstance ( ) const

Standard methods for instantiable (i.e., concrete) class.

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

Standard methods for instantiable (i.e., concrete) class.

void vtkDeformPointSet::SetControlMeshData ( vtkPolyData *  controlMesh)

Specify the control mesh to deform the input vtkPointSet. The control mesh must be a closed, non-self-intersecting, manifold mesh.

vtkPolyData* vtkDeformPointSet::GetControlMeshData ( )

Specify the control mesh to deform the input vtkPointSet. The control mesh must be a closed, non-self-intersecting, manifold mesh.

void vtkDeformPointSet::SetControlMeshConnection ( vtkAlgorithmOutput *  algOutput)

Specify the point locations used to probe input. Any geometry can be used. New style. Equivalent to SetInputConnection(1, algOutput).

virtual void vtkDeformPointSet::SetInitializeWeights ( int  )
virtual

Specify whether to regenerate interpolation weights or not. Initially the filter will reexecute no matter what this flag is set to (initial weights must be computed). Also, this flag is ignored if the number of input points/cells or the number of control mesh points/cells changes between executions. Thus flag is used to force reexecution and recomputation of weights.

virtual int vtkDeformPointSet::GetInitializeWeights ( )
virtual

Specify whether to regenerate interpolation weights or not. Initially the filter will reexecute no matter what this flag is set to (initial weights must be computed). Also, this flag is ignored if the number of input points/cells or the number of control mesh points/cells changes between executions. Thus flag is used to force reexecution and recomputation of weights.

virtual void vtkDeformPointSet::InitializeWeightsOn ( )
virtual

Specify whether to regenerate interpolation weights or not. Initially the filter will reexecute no matter what this flag is set to (initial weights must be computed). Also, this flag is ignored if the number of input points/cells or the number of control mesh points/cells changes between executions. Thus flag is used to force reexecution and recomputation of weights.

virtual void vtkDeformPointSet::InitializeWeightsOff ( )
virtual

Specify whether to regenerate interpolation weights or not. Initially the filter will reexecute no matter what this flag is set to (initial weights must be computed). Also, this flag is ignored if the number of input points/cells or the number of control mesh points/cells changes between executions. Thus flag is used to force reexecution and recomputation of weights.

virtual int vtkDeformPointSet::RequestData ( vtkInformation *  ,
vtkInformationVector **  ,
vtkInformationVector *   
)
protectedvirtual

Member Data Documentation

int vtkDeformPointSet::InitializeWeights
protected

Definition at line 113 of file vtkDeformPointSet.h.

vtkIdType vtkDeformPointSet::InitialNumberOfControlMeshPoints
protected

Definition at line 116 of file vtkDeformPointSet.h.

vtkIdType vtkDeformPointSet::InitialNumberOfControlMeshCells
protected

Definition at line 117 of file vtkDeformPointSet.h.

vtkIdType vtkDeformPointSet::InitialNumberOfPointSetPoints
protected

Definition at line 118 of file vtkDeformPointSet.h.

vtkIdType vtkDeformPointSet::InitialNumberOfPointSetCells
protected

Definition at line 119 of file vtkDeformPointSet.h.

vtkSmartPointer<vtkDoubleArray> vtkDeformPointSet::Weights
protected

Definition at line 120 of file vtkDeformPointSet.h.


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