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 =========================================================================*/
32 #ifndef vtkCollapseVerticesByArray_h__
33 #define vtkCollapseVerticesByArray_h__
34 
35 #include "vtkInfovisCoreModule.h" // For export macro
36 #include "vtkGraphAlgorithm.h"
37 
38 class vtkCollapseVerticesByArrayInternal;
39 
41 {
42 public:
45 
46  void PrintSelf(ostream &os, vtkIndent indent);
47 
49 
50  vtkGetMacro(AllowSelfLoops, bool);
51  vtkSetMacro(AllowSelfLoops, bool);
52  vtkBooleanMacro(AllowSelfLoops, bool);
54 
57  void AddAggregateEdgeArray(const char* arrName);
58 
59 
61  void ClearAggregateEdgeArray();
62 
64 
65  vtkGetStringMacro(VertexArray);
66  vtkSetStringMacro(VertexArray);
68 
69 
71 
72  vtkGetMacro(CountEdgesCollapsed, bool);
73  vtkSetMacro(CountEdgesCollapsed, bool);
74  vtkBooleanMacro(CountEdgesCollapsed, bool);
76 
78 
81  vtkGetStringMacro(EdgesCollapsedArray);
82  vtkSetStringMacro(EdgesCollapsedArray);
84 
85 
87 
88  vtkGetMacro(CountVerticesCollapsed, bool);
89  vtkSetMacro(CountVerticesCollapsed, bool);
90  vtkBooleanMacro(CountVerticesCollapsed, bool);
92 
94 
97  vtkGetStringMacro(VerticesCollapsedArray);
98  vtkSetStringMacro(VerticesCollapsedArray);
100 
101 protected:
102 
105 
107 
108  virtual int RequestData(vtkInformation* request,
109  vtkInformationVector** inputVector,
110  vtkInformationVector* outputVector);
112 
115 
116 
118  vtkGraph* Create(vtkGraph* inGraph);
119 
121 
122  void FindEdge(vtkGraph* outGraph, vtkIdType source,
123  vtkIdType target, vtkIdType& edgeId);
125 
126 private:
128  vtkCollapseVerticesByArray(const vtkCollapseVerticesByArray&); // Not implemented
129  void operator=(const vtkCollapseVerticesByArray&); // Not implemented
131 
132 
133 protected:
135  char* VertexArray;
136 
139 
142 
143  vtkCollapseVerticesByArrayInternal* Internal;
144 };
145 
146 #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:275
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Superclass for algorithms that produce only graph as output.
Base class for graph data types.
Definition: vtkGraph.h:288
a simple class to control print indentation
Definition: vtkIndent.h:38
void PrintSelf(ostream &os, vtkIndent indent)
#define VTKINFOVISCORE_EXPORT
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)
Store zero or more vtkInformation instances.