VTK  9.2.5
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 
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:
116 
120  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
121  vtkInformationVector* outputVector) override;
122 
127 
132 
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__
Collapse the graph given a vertex array.
int FillOutputPortInformation(int port, vtkInformation *info) override
Pipeline function.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Pipeline function.
void FindEdge(vtkGraph *outGraph, vtkIdType source, vtkIdType target, vtkIdType &edgeId)
Helper function.
static vtkCollapseVerticesByArray * New()
vtkCollapseVerticesByArrayInternal * Internal
void AddAggregateEdgeArray(const char *arrName)
Add arrays on which aggregation of data is allowed.
~vtkCollapseVerticesByArray() override
void ClearAggregateEdgeArray()
Clear the list of arrays on which aggregation was set to allow.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGraph * Create(vtkGraph *inGraph)
Create output graph given all the parameters.
Superclass for algorithms that produce only graph as output.
Base class for graph data types.
Definition: vtkGraph.h:345
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
int vtkIdType
Definition: vtkType.h:332