VTK
vtkTableToGraph.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTableToGraph.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
72 #ifndef vtkTableToGraph_h
73 #define vtkTableToGraph_h
74 
75 #include "vtkInfovisCoreModule.h" // For export macro
76 #include "vtkGraphAlgorithm.h"
77 
78 class vtkBitArray;
80 class vtkStringArray;
81 class vtkTable;
82 
83 class VTKINFOVISCORE_EXPORT vtkTableToGraph : public vtkGraphAlgorithm
84 {
85 public:
86  static vtkTableToGraph* New();
88  void PrintSelf(ostream& os, vtkIndent indent) override;
89 
94  void AddLinkVertex(const char* column, const char* domain = nullptr, int hidden = 0);
95 
99  void ClearLinkVertices();
100 
104  void AddLinkEdge(const char* column1, const char* column2);
105 
109  void ClearLinkEdges();
110 
112 
115  vtkGetObjectMacro(LinkGraph, vtkMutableDirectedGraph);
116  void SetLinkGraph(vtkMutableDirectedGraph* g);
118 
123  void LinkColumnPath(vtkStringArray* column, vtkStringArray* domain = nullptr, vtkBitArray* hidden = nullptr);
124 
126 
129  vtkSetMacro(Directed, bool);
130  vtkGetMacro(Directed, bool);
131  vtkBooleanMacro(Directed, bool);
133 
137  vtkMTimeType GetMTime() override;
138 
146  void SetVertexTableConnection(vtkAlgorithmOutput* in);
147 
148 protected:
149  vtkTableToGraph();
150  ~vtkTableToGraph() override;
151 
155  int ValidateLinkGraph();
156 
157  int FillInputPortInformation(int port, vtkInformation* info) override;
158 
159  int RequestData(
162  vtkInformationVector*) override;
163 
164  int RequestDataObject(
167  vtkInformationVector*) override;
168 
169  bool Directed;
172 
173 private:
174  vtkTableToGraph(const vtkTableToGraph&) = delete;
175  void operator=(const vtkTableToGraph&) = delete;
176 };
177 
178 #endif
179 
static vtkGraphAlgorithm * New()
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
convert a vtkTable into a vtkGraph
a vtkAbstractArray subclass for strings
Superclass for algorithms that produce only graph as output.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Proxy object to connect input/output ports.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkStringArray * VertexTableDomains
virtual vtkMTimeType GetMTime()
Return this object's modified time.
An editable directed graph.
vtkMutableDirectedGraph * LinkGraph
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:36
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Store zero or more vtkInformation instances.