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);
48 
50 
53  vtkGetMacro(AllowSelfLoops, bool);
54  vtkSetMacro(AllowSelfLoops, bool);
55  vtkBooleanMacro(AllowSelfLoops, bool);
57 
62  void AddAggregateEdgeArray(const char* arrName);
63 
64 
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 
120 
124  virtual int RequestData(vtkInformation* request,
125  vtkInformationVector** inputVector,
126  vtkInformationVector* outputVector);
127 
132 
133 
138 
143  vtkIdType target, vtkIdType& edgeId);
144 
145 private:
147  vtkCollapseVerticesByArray(const vtkCollapseVerticesByArray&) VTK_DELETE_FUNCTION;
148  void operator=(const vtkCollapseVerticesByArray&) VTK_DELETE_FUNCTION;
150 
151 
152 protected:
154  char* VertexArray;
155 
158 
161 
162  vtkCollapseVerticesByArrayInternal* Internal;
163 };
164 
165 #endif // vtkCollapseVerticesByArray_h__
vtkCollapseVerticesByArray::AddAggregateEdgeArray
void AddAggregateEdgeArray(const char *arrName)
Add arrays on which aggregation of data is allowed.
vtkGraphAlgorithm
Superclass for algorithms that produce only graph as output.
Definition: vtkGraphAlgorithm.h:55
vtkCollapseVerticesByArray::vtkCollapseVerticesByArray
vtkCollapseVerticesByArray()
vtkCollapseVerticesByArray::Create
vtkGraph * Create(vtkGraph *inGraph)
Create output graph given all the parameters.
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkCollapseVerticesByArray::AllowSelfLoops
bool AllowSelfLoops
Definition: vtkCollapseVerticesByArray.h:153
vtkCollapseVerticesByArray::Internal
vtkCollapseVerticesByArrayInternal * Internal
Definition: vtkCollapseVerticesByArray.h:162
vtkCollapseVerticesByArray::~vtkCollapseVerticesByArray
~vtkCollapseVerticesByArray()
vtkCollapseVerticesByArray::CountEdgesCollapsed
bool CountEdgesCollapsed
Definition: vtkCollapseVerticesByArray.h:156
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:822
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkGraphAlgorithm.h
vtkCollapseVerticesByArray::EdgesCollapsedArray
char * EdgesCollapsedArray
Definition: vtkCollapseVerticesByArray.h:157
vtkCollapseVerticesByArray::ClearAggregateEdgeArray
void ClearAggregateEdgeArray()
Clear the list of arrays on which aggregation was set to allow.
vtkCollapseVerticesByArray::New
static vtkCollapseVerticesByArray * New()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkCollapseVerticesByArray::VertexArray
char * VertexArray
Definition: vtkCollapseVerticesByArray.h:154
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkCollapseVerticesByArray::CountVerticesCollapsed
bool CountVerticesCollapsed
Definition: vtkCollapseVerticesByArray.h:159
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkCollapseVerticesByArray::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Pipeline function.
vtkCollapseVerticesByArray
Collapse the graph given a vertex array.
Definition: vtkCollapseVerticesByArray.h:42
vtkCollapseVerticesByArray::FindEdge
void FindEdge(vtkGraph *outGraph, vtkIdType source, vtkIdType target, vtkIdType &edgeId)
Helper function.
vtkCollapseVerticesByArray::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Pipeline function.
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:288
vtkCollapseVerticesByArray::VerticesCollapsedArray
char * VerticesCollapsedArray
Definition: vtkCollapseVerticesByArray.h:160
target
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:829
vtkCollapseVerticesByArray::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.