VTK
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 "vtkInfovisCoreModule.h" // For export macro
37 #include "vtkGraphAlgorithm.h"
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 
64 
68  void ClearAggregateEdgeArray();
69 
71 
74  vtkGetStringMacro(VertexArray);
75  vtkSetStringMacro(VertexArray);
77 
78 
80 
83  vtkGetMacro(CountEdgesCollapsed, bool);
84  vtkSetMacro(CountEdgesCollapsed, bool);
85  vtkBooleanMacro(CountEdgesCollapsed, bool);
87 
89 
93  vtkGetStringMacro(EdgesCollapsedArray);
94  vtkSetStringMacro(EdgesCollapsedArray);
96 
97 
99 
102  vtkGetMacro(CountVerticesCollapsed, bool);
103  vtkSetMacro(CountVerticesCollapsed, bool);
104  vtkBooleanMacro(CountVerticesCollapsed, bool);
106 
108 
112  vtkGetStringMacro(VerticesCollapsedArray);
113  vtkSetStringMacro(VerticesCollapsedArray);
115 
116 protected:
117 
119  ~vtkCollapseVerticesByArray() override;
120 
124  int RequestData(vtkInformation* request,
125  vtkInformationVector** inputVector,
126  vtkInformationVector* outputVector) override;
127 
132 
133 
137  vtkGraph* Create(vtkGraph* inGraph);
138 
142  void FindEdge(vtkGraph* outGraph, vtkIdType source,
143  vtkIdType target, vtkIdType& edgeId);
144 
145 private:
148  void operator=(const vtkCollapseVerticesByArray&) = delete;
150 
151 
152 protected:
154  char* VertexArray;
155 
158 
161 
162  vtkCollapseVerticesByArrayInternal* Internal;
163 };
164 
165 #endif // vtkCollapseVerticesByArray_h__
static vtkGraphAlgorithm * New()
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Store vtkAlgorithm input/output information.
Collapse the graph given a vertex array.
int vtkIdType
Definition: vtkType.h:347
Superclass for algorithms that produce only graph as output.
Base class for graph data types.
Definition: vtkGraph.h:287
a simple class to control print indentation
Definition: vtkIndent.h:39
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.
vtkCollapseVerticesByArrayInternal * Internal
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Store zero or more vtkInformation instances.