VTK
vtkTreeDifferenceFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTreeDifferenceFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
29 #ifndef vtkTreeDifferenceFilter_h
30 #define vtkTreeDifferenceFilter_h
31 
32 #include "vtkInfovisCoreModule.h" // For export macro
33 #include "vtkGraphAlgorithm.h"
34 
35 #include "vtkSmartPointer.h" // For ivars
36 #include <vector> // For ivars
37 
38 class vtkDoubleArray;
39 class vtkTree;
40 
41 class VTKINFOVISCORE_EXPORT vtkTreeDifferenceFilter : public vtkGraphAlgorithm
42 {
43 public:
44  static vtkTreeDifferenceFilter* New();
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
49 
59  vtkSetStringMacro(IdArrayName);
60  vtkGetStringMacro(IdArrayName);
62 
64 
68  vtkSetStringMacro(ComparisonArrayName);
69  vtkGetStringMacro(ComparisonArrayName);
71 
73 
80  vtkSetStringMacro(OutputArrayName);
81  vtkGetStringMacro(OutputArrayName);
83 
85 
90  vtkSetMacro(ComparisonArrayIsVertexData, bool);
91  vtkGetMacro(ComparisonArrayIsVertexData, bool);
93 
94 protected:
96  ~vtkTreeDifferenceFilter() override;
97 
98  int RequestData(
101  vtkInformationVector*) override;
102 
103  int FillInputPortInformation(int port, vtkInformation *info) override;
104 
110  bool GenerateMapping(vtkTree *tree1, vtkTree *tree2);
111 
116  vtkSmartPointer<vtkDoubleArray> ComputeDifference(vtkTree *tree1,
117  vtkTree *tree2);
118 
119  char* IdArrayName;
123 
124  std::vector< vtkIdType > VertexMap;
125  std::vector< vtkIdType > EdgeMap;
126 
127 private:
129  void operator=(const vtkTreeDifferenceFilter&) = delete;
130 };
131 
132 #endif
vtkGraphAlgorithm
Superclass for algorithms that produce only graph as output.
Definition: vtkGraphAlgorithm.h:51
vtkTreeDifferenceFilter::VertexMap
std::vector< vtkIdType > VertexMap
Definition: vtkTreeDifferenceFilter.h:124
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkSmartPointer< vtkDoubleArray >
vtkTreeDifferenceFilter::ComparisonArrayIsVertexData
bool ComparisonArrayIsVertexData
Definition: vtkTreeDifferenceFilter.h:122
vtkTreeDifferenceFilter::EdgeMap
std::vector< vtkIdType > EdgeMap
Definition: vtkTreeDifferenceFilter.h:125
vtkTree
A rooted tree data structure.
Definition: vtkTree.h:54
vtkGraphAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkX3D::port
Definition: vtkX3D.h:447
vtkTreeDifferenceFilter::OutputArrayName
char * OutputArrayName
Definition: vtkTreeDifferenceFilter.h:121
vtkGraphAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGraphAlgorithm.h
vtkTreeDifferenceFilter::IdArrayName
char * IdArrayName
Definition: vtkTreeDifferenceFilter.h:119
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSmartPointer.h
vtkTreeDifferenceFilter
compare two trees
Definition: vtkTreeDifferenceFilter.h:41
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkX3D::info
Definition: vtkX3D.h:376
vtkGraphAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:35
vtkTreeDifferenceFilter::ComparisonArrayName
char * ComparisonArrayName
Definition: vtkTreeDifferenceFilter.h:120
vtkGraphAlgorithm::New
static vtkGraphAlgorithm * New()