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 =========================================================================*/
30 #ifndef vtkCollapseVerticesByArray_h
31 #define vtkCollapseVerticesByArray_h
32 
33 #include "vtkInfovisCoreModule.h" // For export macro
34 #include "vtkGraphAlgorithm.h"
35 
36 class vtkCollapseVerticesByArrayInternal;
37 
38 class VTKINFOVISCORE_EXPORT vtkCollapseVerticesByArray : public vtkGraphAlgorithm
39 {
40 public:
43 
44  void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE;
45 
47 
50  vtkGetMacro(AllowSelfLoops, bool);
51  vtkSetMacro(AllowSelfLoops, bool);
52  vtkBooleanMacro(AllowSelfLoops, bool);
54 
59  void AddAggregateEdgeArray(const char* arrName);
60 
61 
65  void ClearAggregateEdgeArray();
66 
68 
71  vtkGetStringMacro(VertexArray);
72  vtkSetStringMacro(VertexArray);
74 
75 
77 
80  vtkGetMacro(CountEdgesCollapsed, bool);
81  vtkSetMacro(CountEdgesCollapsed, bool);
82  vtkBooleanMacro(CountEdgesCollapsed, bool);
84 
86 
90  vtkGetStringMacro(EdgesCollapsedArray);
91  vtkSetStringMacro(EdgesCollapsedArray);
93 
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:
114 
116  ~vtkCollapseVerticesByArray() VTK_OVERRIDE;
117 
121  int RequestData(vtkInformation* request,
122  vtkInformationVector** inputVector,
123  vtkInformationVector* outputVector) VTK_OVERRIDE;
124 
128  int FillOutputPortInformation(int port, vtkInformation* info) VTK_OVERRIDE;
129 
130 
134  vtkGraph* Create(vtkGraph* inGraph);
135 
139  void FindEdge(vtkGraph* outGraph, vtkIdType source,
140  vtkIdType target, vtkIdType& edgeId);
141 
142 private:
144  vtkCollapseVerticesByArray(const vtkCollapseVerticesByArray&) VTK_DELETE_FUNCTION;
145  void operator=(const vtkCollapseVerticesByArray&) VTK_DELETE_FUNCTION;
147 
148 
149 protected:
150  bool AllowSelfLoops;
151  char* VertexArray;
152 
153  bool CountEdgesCollapsed;
154  char* EdgesCollapsedArray;
155 
156  bool CountVerticesCollapsed;
157  char* VerticesCollapsedArray;
158 
159  vtkCollapseVerticesByArrayInternal* Internal;
160 };
161 
162 #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:345
Superclass for algorithms that produce only graph as output.
Base class for graph data types.
Definition: vtkGraph.h:281
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.