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