VTK  9.2.6
vtkCollapseVerticesByArray.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCollapseVerticesByArray.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 =========================================================================*/
33 #ifndef vtkCollapseVerticesByArray_h
34 #define vtkCollapseVerticesByArray_h
35 
36 #include "vtkGraphAlgorithm.h"
37 #include "vtkInfovisCoreModule.h" // For export macro
38 
39 class vtkCollapseVerticesByArrayInternal;
40 
41 class VTKINFOVISCORE_EXPORT vtkCollapseVerticesByArray : public vtkGraphAlgorithm
42 {
43 public:
46 
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
53  vtkGetMacro(AllowSelfLoops, bool);
54  vtkSetMacro(AllowSelfLoops, bool);
55  vtkBooleanMacro(AllowSelfLoops, bool);
57 
62  void AddAggregateEdgeArray(const char* arrName);
63 
67  void ClearAggregateEdgeArray();
68 
70 
73  vtkGetStringMacro(VertexArray);
74  vtkSetStringMacro(VertexArray);
76 
78 
81  vtkGetMacro(CountEdgesCollapsed, bool);
82  vtkSetMacro(CountEdgesCollapsed, bool);
83  vtkBooleanMacro(CountEdgesCollapsed, bool);
85 
87 
91  vtkGetStringMacro(EdgesCollapsedArray);
92  vtkSetStringMacro(EdgesCollapsedArray);
94 
96 
99  vtkGetMacro(CountVerticesCollapsed, bool);
100  vtkSetMacro(CountVerticesCollapsed, bool);
101  vtkBooleanMacro(CountVerticesCollapsed, bool);
103 
105 
109  vtkGetStringMacro(VerticesCollapsedArray);
110  vtkSetStringMacro(VerticesCollapsedArray);
112 
113 protected:
115  ~vtkCollapseVerticesByArray() override;
116 
120  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
121  vtkInformationVector* outputVector) override;
122 
127 
131  vtkGraph* Create(vtkGraph* inGraph);
132 
136  void FindEdge(vtkGraph* outGraph, vtkIdType source, vtkIdType target, vtkIdType& edgeId);
137 
138 private:
141  void operator=(const vtkCollapseVerticesByArray&) = delete;
143 
144 protected:
146  char* VertexArray;
147 
150 
153 
154  vtkCollapseVerticesByArrayInternal* Internal;
155 };
156 
157 #endif // vtkCollapseVerticesByArray_h__
static vtkGraphAlgorithm * New()
Store vtkAlgorithm input/output information.
Collapse the graph given a vertex array.
int vtkIdType
Definition: vtkType.h:332
Superclass for algorithms that produce only graph as output.
Base class for graph data types.
Definition: vtkGraph.h:295
a simple class to control print indentation
Definition: vtkIndent.h:39
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkCollapseVerticesByArrayInternal * Internal
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Store zero or more vtkInformation instances.