VTK  9.3.20240419
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:
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:
89 
91 
93 
99  bool GenerateMapping(vtkTree* tree1, vtkTree* tree2);
100 
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
dynamic, self-adjusting array of double
Superclass for algorithms that produce only graph as output.
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool GenerateMapping(vtkTree *tree1, vtkTree *tree2)
Populate VertexMap and EdgeMap with meaningful values.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
std::vector< vtkIdType > EdgeMap
~vtkTreeDifferenceFilter() override
static vtkTreeDifferenceFilter * New()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
std::vector< vtkIdType > VertexMap
vtkSmartPointer< vtkDoubleArray > ComputeDifference(vtkTree *tree1, vtkTree *tree2)
Compute the differences between tree #1 and tree #2's copies of the comparison array.
A rooted tree data structure.
Definition: vtkTree.h:145
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447