VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkCollapseVerticesByArray.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00032 #ifndef __vtkCollapseVerticesByArray_h__ 00033 #define __vtkCollapseVerticesByArray_h__ 00034 00035 #include "vtkInfovisCoreModule.h" // For export macro 00036 #include "vtkGraphAlgorithm.h" 00037 00038 class vtkCollapseVerticesByArrayInternal; 00039 00040 class VTKINFOVISCORE_EXPORT vtkCollapseVerticesByArray : public vtkGraphAlgorithm 00041 { 00042 public: 00043 static vtkCollapseVerticesByArray* New(); 00044 vtkTypeMacro(vtkCollapseVerticesByArray, vtkGraphAlgorithm); 00045 00046 void PrintSelf(ostream &os, vtkIndent indent); 00047 00049 00050 vtkGetMacro(AllowSelfLoops, bool); 00051 vtkSetMacro(AllowSelfLoops, bool); 00052 vtkBooleanMacro(AllowSelfLoops, bool); 00054 00057 void AddAggregateEdgeArray(const char* arrName); 00058 00059 00061 void ClearAggregateEdgeArray(); 00062 00064 00065 vtkGetStringMacro(VertexArray); 00066 vtkSetStringMacro(VertexArray); 00068 00069 00071 00072 vtkGetMacro(CountEdgesCollapsed, bool); 00073 vtkSetMacro(CountEdgesCollapsed, bool); 00074 vtkBooleanMacro(CountEdgesCollapsed, bool); 00076 00078 00081 vtkGetStringMacro(EdgesCollapsedArray); 00082 vtkSetStringMacro(EdgesCollapsedArray); 00084 00085 00087 00088 vtkGetMacro(CountVerticesCollapsed, bool); 00089 vtkSetMacro(CountVerticesCollapsed, bool); 00090 vtkBooleanMacro(CountVerticesCollapsed, bool); 00092 00094 00097 vtkGetStringMacro(VerticesCollapsedArray); 00098 vtkSetStringMacro(VerticesCollapsedArray); 00100 00101 protected: 00102 00103 vtkCollapseVerticesByArray(); 00104 ~vtkCollapseVerticesByArray(); 00105 00107 00108 virtual int RequestData(vtkInformation* request, 00109 vtkInformationVector** inputVector, 00110 vtkInformationVector* outputVector); 00112 00114 virtual int FillOutputPortInformation(int port, vtkInformation* info); 00115 00116 00118 vtkGraph* Create(vtkGraph* inGraph); 00119 00121 00122 void FindEdge(vtkGraph* outGraph, vtkIdType source, 00123 vtkIdType target, vtkIdType& edgeId); 00125 00126 private: 00128 vtkCollapseVerticesByArray(const vtkCollapseVerticesByArray&); // Not implemented 00129 void operator=(const vtkCollapseVerticesByArray&); // Not implemented 00131 00132 00133 protected: 00134 bool AllowSelfLoops; 00135 char* VertexArray; 00136 00137 bool CountEdgesCollapsed; 00138 char* EdgesCollapsedArray; 00139 00140 bool CountVerticesCollapsed; 00141 char* VerticesCollapsedArray; 00142 00143 vtkCollapseVerticesByArrayInternal* Internal; 00144 }; 00145 00146 #endif // __vtkCollapseVerticesByArray_h__