VTK  9.0.1
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 -------------------------------------------------------------------------*/
69 #ifndef vtkTableToGraph_h
70 #define vtkTableToGraph_h
71 
72 #include "vtkGraphAlgorithm.h"
73 #include "vtkInfovisCoreModule.h" // For export macro
74 
75 class vtkBitArray;
77 class vtkStringArray;
78 class vtkTable;
79 
80 class VTKINFOVISCORE_EXPORT vtkTableToGraph : public vtkGraphAlgorithm
81 {
82 public:
83  static vtkTableToGraph* New();
85  void PrintSelf(ostream& os, vtkIndent indent) override;
86 
91  void AddLinkVertex(const char* column, const char* domain = nullptr, int hidden = 0);
92 
96  void ClearLinkVertices();
97 
101  void AddLinkEdge(const char* column1, const char* column2);
102 
106  void ClearLinkEdges();
107 
109 
112  vtkGetObjectMacro(LinkGraph, vtkMutableDirectedGraph);
113  void SetLinkGraph(vtkMutableDirectedGraph* g);
115 
120  void LinkColumnPath(
121  vtkStringArray* column, vtkStringArray* domain = nullptr, vtkBitArray* hidden = nullptr);
122 
124 
127  vtkSetMacro(Directed, bool);
128  vtkGetMacro(Directed, bool);
129  vtkBooleanMacro(Directed, bool);
131 
135  vtkMTimeType GetMTime() override;
136 
144  void SetVertexTableConnection(vtkAlgorithmOutput* in);
145 
146 protected:
147  vtkTableToGraph();
148  ~vtkTableToGraph() override;
149 
153  int ValidateLinkGraph();
154 
155  int FillInputPortInformation(int port, vtkInformation* info) override;
156 
158 
160 
161  bool Directed;
164 
165 private:
166  vtkTableToGraph(const vtkTableToGraph&) = delete;
167  void operator=(const vtkTableToGraph&) = delete;
168 };
169 
170 #endif
static vtkGraphAlgorithm * New()
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
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:33
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:62
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:33
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Store zero or more vtkInformation instances.