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) 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() override;
117 
121  int RequestData(vtkInformation* request,
122  vtkInformationVector** inputVector,
123  vtkInformationVector* outputVector) override;
124 
129 
130 
134  vtkGraph* Create(vtkGraph* inGraph);
135 
139  void FindEdge(vtkGraph* outGraph, vtkIdType source,
140  vtkIdType target, vtkIdType& edgeId);
141 
142 private:
145  void operator=(const vtkCollapseVerticesByArray&) = delete;
147 
148 
149 protected:
151  char* VertexArray;
152 
155 
158 
159  vtkCollapseVerticesByArrayInternal* Internal;
160 };
161 
162 #endif // vtkCollapseVerticesByArray_h__
vtkGraphAlgorithm
Superclass for algorithms that produce only graph as output.
Definition: vtkGraphAlgorithm.h:51
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkCollapseVerticesByArray::AllowSelfLoops
bool AllowSelfLoops
Definition: vtkCollapseVerticesByArray.h:150
vtkCollapseVerticesByArray::Internal
vtkCollapseVerticesByArrayInternal * Internal
Definition: vtkCollapseVerticesByArray.h:159
vtkCollapseVerticesByArray::CountEdgesCollapsed
bool CountEdgesCollapsed
Definition: vtkCollapseVerticesByArray.h:153
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:825
vtkX3D::port
Definition: vtkX3D.h:447
vtkGraphAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGraphAlgorithm.h
vtkGraphAlgorithm::FillOutputPortInformation
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
vtkCollapseVerticesByArray::EdgesCollapsedArray
char * EdgesCollapsedArray
Definition: vtkCollapseVerticesByArray.h:154
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkCollapseVerticesByArray::VertexArray
char * VertexArray
Definition: vtkCollapseVerticesByArray.h:151
vtkCollapseVerticesByArray::CountVerticesCollapsed
bool CountVerticesCollapsed
Definition: vtkCollapseVerticesByArray.h:156
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkX3D::info
Definition: vtkX3D.h:376
vtkGraphAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkCollapseVerticesByArray
Collapse the graph given a vertex array.
Definition: vtkCollapseVerticesByArray.h:38
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:281
vtkCollapseVerticesByArray::VerticesCollapsedArray
char * VerticesCollapsedArray
Definition: vtkCollapseVerticesByArray.h:157
target
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:832
vtkGraphAlgorithm::New
static vtkGraphAlgorithm * New()