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