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 "vtkGraphAlgorithm.h"
36 
37 class vtkCollapseVerticesByArrayInternal;
38 
40 {
41 public:
44 
45  void PrintSelf(ostream &os, vtkIndent indent);
46 
48 
49  vtkGetMacro(AllowSelfLoops, bool);
50  vtkSetMacro(AllowSelfLoops, bool);
51  vtkBooleanMacro(AllowSelfLoops, bool);
53 
56  void AddAggregateEdgeArray(const char* arrName);
57 
58 
60  void ClearAggregateEdgeArray();
61 
63 
64  vtkGetStringMacro(VertexArray);
65  vtkSetStringMacro(VertexArray);
67 
68 
70 
71  vtkGetMacro(CountEdgesCollapsed, bool);
72  vtkSetMacro(CountEdgesCollapsed, bool);
73  vtkBooleanMacro(CountEdgesCollapsed, bool);
75 
77 
80  vtkGetStringMacro(EdgesCollapsedArray);
81  vtkSetStringMacro(EdgesCollapsedArray);
83 
84 
86 
87  vtkGetMacro(CountVerticesCollapsed, bool);
88  vtkSetMacro(CountVerticesCollapsed, bool);
89  vtkBooleanMacro(CountVerticesCollapsed, bool);
91 
93 
96  vtkGetStringMacro(VerticesCollapsedArray);
97  vtkSetStringMacro(VerticesCollapsedArray);
99 
100 protected:
101 
104 
106 
107  virtual int RequestData(vtkInformation* request,
108  vtkInformationVector** inputVector,
109  vtkInformationVector* outputVector);
111 
114 
115 
117  vtkGraph* Create(vtkGraph* inGraph);
118 
120 
121  void FindEdge(vtkGraph* outGraph, vtkIdType source,
122  vtkIdType target, vtkIdType& edgeId);
124 
125 private:
127  vtkCollapseVerticesByArray(const vtkCollapseVerticesByArray&); // Not implemented
128  void operator=(const vtkCollapseVerticesByArray&); // Not implemented
130 
131 
132 protected:
134  char* VertexArray;
135 
138 
141 
142  vtkCollapseVerticesByArrayInternal* Internal;
143 };
144 
145 #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:255
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:287
a simple class to control print indentation
Definition: vtkIndent.h:37
void PrintSelf(ostream &os, vtkIndent indent)
vtkCollapseVerticesByArrayInternal * Internal
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define VTK_INFOVIS_EXPORT
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store zero or more vtkInformation instances.