VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkTreeDifferenceFilter Class Reference

compare two trees More...

#include <vtkTreeDifferenceFilter.h>

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

List of all members.

Public Types

typedef vtkGraphAlgorithm Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkTreeDifferenceFilterNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetIdArrayName (const char *)
virtual char * GetIdArrayName ()
virtual void SetComparisonArrayName (const char *)
virtual char * GetComparisonArrayName ()
virtual void SetOutputArrayName (const char *)
virtual char * GetOutputArrayName ()
virtual void SetComparisonArrayIsVertexData (bool)
virtual bool GetComparisonArrayIsVertexData ()

Static Public Member Functions

static vtkTreeDifferenceFilterNew ()
static int IsTypeOf (const char *type)
static vtkTreeDifferenceFilterSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkTreeDifferenceFilter ()
 ~vtkTreeDifferenceFilter ()
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int FillInputPortInformation (int port, vtkInformation *info)
bool GenerateMapping (vtkTree *tree1, vtkTree *tree2)
vtkSmartPointer< vtkDoubleArrayComputeDifference (vtkTree *tree1, vtkTree *tree2)

Protected Attributes

char * IdArrayName
char * ComparisonArrayName
char * OutputArrayName
bool ComparisonArrayIsVertexData
std::vector< vtkIdTypeVertexMap
std::vector< vtkIdTypeEdgeMap

Detailed Description

compare two trees

vtkTreeDifferenceFilter compares two trees by analyzing a vtkDoubleArray. Each tree must have a copy of this array. A user of this filter should call SetComparisonArrayName to specify the array that should be used as the basis of coparison. This array can either be part of the trees' EdgeData or VertexData.

Tests:
vtkTreeDifferenceFilter (Tests)

Definition at line 43 of file vtkTreeDifferenceFilter.h.


Member Typedef Documentation

Reimplemented from vtkGraphAlgorithm.

Definition at line 47 of file vtkTreeDifferenceFilter.h.


Constructor & Destructor Documentation


Member Function Documentation

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkGraphAlgorithm.

static int vtkTreeDifferenceFilter::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkGraphAlgorithm.

virtual int vtkTreeDifferenceFilter::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkGraphAlgorithm.

Reimplemented from vtkGraphAlgorithm.

virtual vtkObjectBase* vtkTreeDifferenceFilter::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkGraphAlgorithm.

Reimplemented from vtkGraphAlgorithm.

void vtkTreeDifferenceFilter::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkGraphAlgorithm.

virtual void vtkTreeDifferenceFilter::SetIdArrayName ( const char *  ) [virtual]

Set/Get the name of the identifier array in the trees' VertexData. This array is used to find corresponding vertices in the two trees. If this array name is not set, then we assume that the vertices in the two trees to compare have corresponding vtkIdTypes. Otherwise, the named array must be a vtkStringArray. The identifier array does not necessarily have to specify a name for each vertex in the tree. If some vertices are unnamed, then this filter will assign correspondence between ancestors of named vertices.

virtual char* vtkTreeDifferenceFilter::GetIdArrayName ( ) [virtual]

Set/Get the name of the identifier array in the trees' VertexData. This array is used to find corresponding vertices in the two trees. If this array name is not set, then we assume that the vertices in the two trees to compare have corresponding vtkIdTypes. Otherwise, the named array must be a vtkStringArray. The identifier array does not necessarily have to specify a name for each vertex in the tree. If some vertices are unnamed, then this filter will assign correspondence between ancestors of named vertices.

virtual void vtkTreeDifferenceFilter::SetComparisonArrayName ( const char *  ) [virtual]

Set/Get the name of the array that we're comparing between the two trees. The named array must be a vtkDoubleArray.

Set/Get the name of the array that we're comparing between the two trees. The named array must be a vtkDoubleArray.

virtual void vtkTreeDifferenceFilter::SetOutputArrayName ( const char *  ) [virtual]

Set/Get the name of a new vtkDoubleArray that will contain the results of the comparison between the two trees. This new array will be added to the input tree's VertexData or EdgeData, based on the value of ComparisonArrayIsVertexData. If this method is not called, the new vtkDoubleArray will be named "difference" by default.

virtual char* vtkTreeDifferenceFilter::GetOutputArrayName ( ) [virtual]

Set/Get the name of a new vtkDoubleArray that will contain the results of the comparison between the two trees. This new array will be added to the input tree's VertexData or EdgeData, based on the value of ComparisonArrayIsVertexData. If this method is not called, the new vtkDoubleArray will be named "difference" by default.

Specify whether the comparison array is within the trees' vertex data or not. By default, we assume that the array to compare is within the trees' EdgeData().

Specify whether the comparison array is within the trees' vertex data or not. By default, we assume that the array to compare is within the trees' EdgeData().

virtual int vtkTreeDifferenceFilter::RequestData ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
) [protected, virtual]

This is called by the superclass. This is the method you should override.

Reimplemented from vtkGraphAlgorithm.

virtual int vtkTreeDifferenceFilter::FillInputPortInformation ( int  port,
vtkInformation info 
) [protected, virtual]

Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented from vtkGraphAlgorithm.

bool vtkTreeDifferenceFilter::GenerateMapping ( vtkTree tree1,
vtkTree tree2 
) [protected]

Populate VertexMap and EdgeMap with meaningful values. These maps allow us to look up the vtkIdType of a vertex or edge in tree #2, given its vtkIdType in tree #1.

Compute the differences between tree #1 and tree #2's copies of the comparison array.


Member Data Documentation

Definition at line 111 of file vtkTreeDifferenceFilter.h.

Definition at line 112 of file vtkTreeDifferenceFilter.h.

Definition at line 113 of file vtkTreeDifferenceFilter.h.

Definition at line 114 of file vtkTreeDifferenceFilter.h.

std::vector< vtkIdType > vtkTreeDifferenceFilter::VertexMap [protected]

Definition at line 116 of file vtkTreeDifferenceFilter.h.

std::vector< vtkIdType > vtkTreeDifferenceFilter::EdgeMap [protected]

Definition at line 117 of file vtkTreeDifferenceFilter.h.


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