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 "vtkGraphAlgorithm.h" 00036 00037 class vtkCollapseVerticesByArrayInternal; 00038 00039 class VTK_INFOVIS_EXPORT vtkCollapseVerticesByArray : public vtkGraphAlgorithm 00040 { 00041 public: 00042 static vtkCollapseVerticesByArray* New(); 00043 vtkTypeMacro(vtkCollapseVerticesByArray, vtkGraphAlgorithm); 00044 00045 void PrintSelf(ostream &os, vtkIndent indent); 00046 00048 00049 vtkGetMacro(AllowSelfLoops, bool); 00050 vtkSetMacro(AllowSelfLoops, bool); 00051 vtkBooleanMacro(AllowSelfLoops, bool); 00053 00056 void AddAggregateEdgeArray(const char* arrName); 00057 00058 00060 void ClearAggregateEdgeArray(); 00061 00063 00064 vtkGetStringMacro(VertexArray); 00065 vtkSetStringMacro(VertexArray); 00067 00068 00069 protected: 00070 00071 vtkCollapseVerticesByArray(); 00072 ~vtkCollapseVerticesByArray(); 00073 00075 00076 virtual int RequestData(vtkInformation* request, 00077 vtkInformationVector** inputVector, 00078 vtkInformationVector* outputVector); 00080 00082 virtual int FillOutputPortInformation(int port, vtkInformation* info); 00083 00084 00086 vtkGraph* Create(vtkGraph* inGraph); 00087 00089 00090 void FindEdge(vtkGraph* outGraph, vtkIdType source, 00091 vtkIdType target, vtkIdType& edgeId); 00093 00094 private: 00096 vtkCollapseVerticesByArray(const vtkCollapseVerticesByArray&); // Not implemented 00097 void operator=(const vtkCollapseVerticesByArray&); // Not implemented 00099 00100 00101 protected: 00102 bool AllowSelfLoops; 00103 char* VertexArray; 00104 00105 vtkCollapseVerticesByArrayInternal* Internal; 00106 }; 00107 00108 #endif // __vtkCollapseVerticesByArray_h__