VTK  9.3.1
vtkTreeDifferenceFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
20 #ifndef vtkTreeDifferenceFilter_h
21 #define vtkTreeDifferenceFilter_h
22 
23 #include "vtkGraphAlgorithm.h"
24 #include "vtkInfovisCoreModule.h" // For export macro
25 
26 #include "vtkSmartPointer.h" // For ivars
27 #include <vector> // For ivars
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class vtkDoubleArray;
31 class vtkTree;
32 
33 class VTKINFOVISCORE_EXPORT vtkTreeDifferenceFilter : public vtkGraphAlgorithm
34 {
35 public:
36  static vtkTreeDifferenceFilter* New();
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
41 
51  vtkSetStringMacro(IdArrayName);
52  vtkGetStringMacro(IdArrayName);
54 
56 
60  vtkSetStringMacro(ComparisonArrayName);
61  vtkGetStringMacro(ComparisonArrayName);
63 
65 
72  vtkSetStringMacro(OutputArrayName);
73  vtkGetStringMacro(OutputArrayName);
75 
77 
82  vtkSetMacro(ComparisonArrayIsVertexData, bool);
83  vtkGetMacro(ComparisonArrayIsVertexData, bool);
85 
86 protected:
88  ~vtkTreeDifferenceFilter() override;
89 
91 
93 
99  bool GenerateMapping(vtkTree* tree1, vtkTree* tree2);
100 
105  vtkSmartPointer<vtkDoubleArray> ComputeDifference(vtkTree* tree1, vtkTree* tree2);
106 
107  char* IdArrayName;
111 
112  std::vector<vtkIdType> VertexMap;
113  std::vector<vtkIdType> EdgeMap;
114 
115 private:
117  void operator=(const vtkTreeDifferenceFilter&) = delete;
118 };
119 
120 VTK_ABI_NAMESPACE_END
121 #endif
static vtkGraphAlgorithm * New()
Store vtkAlgorithm input/output information.
std::vector< vtkIdType > VertexMap
Superclass for algorithms that produce only graph as output.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Store zero or more vtkInformation instances.
A rooted tree data structure.
Definition: vtkTree.h:45
std::vector< vtkIdType > EdgeMap