VTK  9.0.2
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 "vtkGraphAlgorithm.h"
34 #include "vtkInfovisCoreModule.h" // For export macro
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 
65 
67 
70  vtkGetStringMacro(VertexArray);
71  vtkSetStringMacro(VertexArray);
73 
75 
78  vtkGetMacro(CountEdgesCollapsed, bool);
79  vtkSetMacro(CountEdgesCollapsed, bool);
80  vtkBooleanMacro(CountEdgesCollapsed, bool);
82 
84 
88  vtkGetStringMacro(EdgesCollapsedArray);
89  vtkSetStringMacro(EdgesCollapsedArray);
91 
93 
96  vtkGetMacro(CountVerticesCollapsed, bool);
97  vtkSetMacro(CountVerticesCollapsed, bool);
98  vtkBooleanMacro(CountVerticesCollapsed, bool);
100 
102 
106  vtkGetStringMacro(VerticesCollapsedArray);
107  vtkSetStringMacro(VerticesCollapsedArray);
109 
110 protected:
113 
117  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
118  vtkInformationVector* outputVector) override;
119 
124 
129 
134 
135 private:
138  void operator=(const vtkCollapseVerticesByArray&) = delete;
140 
141 protected:
143  char* VertexArray;
144 
147 
150 
151  vtkCollapseVerticesByArrayInternal* Internal;
152 };
153 
154 #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:290
a simple class to control print indentation
Definition: vtkIndent.h:34
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:338