00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
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&);
00097 void operator=(const vtkCollapseVerticesByArray&);
00099
00100
00101 protected:
00102 bool AllowSelfLoops;
00103 char* VertexArray;
00104
00105 vtkCollapseVerticesByArrayInternal* Internal;
00106 };
00107
00108 #endif // __vtkCollapseVerticesByArray_h__