00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00073 #ifndef __vtkTableToGraph_h
00074 #define __vtkTableToGraph_h
00075
00076 #include "vtkGraphAlgorithm.h"
00077
00078 class vtkBitArray;
00079 class vtkMutableDirectedGraph;
00080 class vtkStringArray;
00081 class vtkTable;
00082
00083 class VTK_INFOVIS_EXPORT vtkTableToGraph : public vtkGraphAlgorithm
00084 {
00085 public:
00086 static vtkTableToGraph* New();
00087 vtkTypeRevisionMacro(vtkTableToGraph,vtkGraphAlgorithm);
00088 void PrintSelf(ostream& os, vtkIndent indent);
00089
00092 void AddLinkVertex(const char* column, const char* domain = 0, int hidden = 0);
00093
00095 void ClearLinkVertices();
00096
00099 void AddLinkEdge(const char* column1, const char* column2);
00100
00102 void ClearLinkEdges();
00103
00105
00106 vtkGetObjectMacro(LinkGraph, vtkMutableDirectedGraph);
00107 void SetLinkGraph(vtkMutableDirectedGraph* g);
00109
00112 void LinkColumnPath(vtkStringArray* column, vtkStringArray* domain = 0, vtkBitArray* hidden = 0);
00113
00115
00116 vtkSetMacro(Directed, bool);
00117 vtkGetMacro(Directed, bool);
00118 vtkBooleanMacro(Directed, bool);
00120
00122 virtual unsigned long GetMTime();
00123
00128 void SetVertexTableConnection(vtkAlgorithmOutput* in);
00129
00130 protected:
00131 vtkTableToGraph();
00132 ~vtkTableToGraph();
00133
00135 int ValidateLinkGraph();
00136
00137 virtual int FillInputPortInformation(int port, vtkInformation* info);
00138
00139 virtual int RequestData(
00140 vtkInformation*,
00141 vtkInformationVector**,
00142 vtkInformationVector*);
00143
00144 virtual int RequestDataObject(
00145 vtkInformation*,
00146 vtkInformationVector**,
00147 vtkInformationVector*);
00148
00149 bool Directed;
00150 vtkMutableDirectedGraph* LinkGraph;
00151 vtkStringArray* VertexTableDomains;
00152
00153 private:
00154 vtkTableToGraph(const vtkTableToGraph&);
00155 void operator=(const vtkTableToGraph&);
00156 };
00157
00158 #endif
00159