VTK  9.4.20241218
vtkTableToGraph.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
56#ifndef vtkTableToGraph_h
57#define vtkTableToGraph_h
58
59#include "vtkGraphAlgorithm.h"
60#include "vtkInfovisCoreModule.h" // For export macro
61
62VTK_ABI_NAMESPACE_BEGIN
63class vtkBitArray;
65class vtkStringArray;
66class vtkTable;
67
68class VTKINFOVISCORE_EXPORT vtkTableToGraph : public vtkGraphAlgorithm
69{
70public:
73 void PrintSelf(ostream& os, vtkIndent indent) override;
74
79 void AddLinkVertex(const char* column, const char* domain = nullptr, int hidden = 0);
80
85
89 void AddLinkEdge(const char* column1, const char* column2);
90
95
97
100 vtkGetObjectMacro(LinkGraph, vtkMutableDirectedGraph);
103
109 vtkStringArray* column, vtkStringArray* domain = nullptr, vtkBitArray* hidden = nullptr);
110
112
115 vtkSetMacro(Directed, bool);
116 vtkGetMacro(Directed, bool);
117 vtkBooleanMacro(Directed, bool);
119
124
133
134protected:
137
142
143 int FillInputPortInformation(int port, vtkInformation* info) override;
144
146
148
152
153private:
154 vtkTableToGraph(const vtkTableToGraph&) = delete;
155 void operator=(const vtkTableToGraph&) = delete;
156};
157
158VTK_ABI_NAMESPACE_END
159#endif
Proxy object to connect input/output ports.
dynamic, self-adjusting array of bits
Definition vtkBitArray.h:29
Superclass for algorithms that produce only graph as output.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
An editable directed graph.
a vtkAbstractArray subclass for strings
convert a vtkTable into a vtkGraph
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void AddLinkVertex(const char *column, const char *domain=nullptr, int hidden=0)
Add a vertex to the link graph.
void SetLinkGraph(vtkMutableDirectedGraph *g)
The graph describing how to link the columns in the table.
void ClearLinkEdges()
Clear the link graph edges.
static vtkTableToGraph * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkTableToGraph() override
void ClearLinkVertices()
Clear the link graph vertices.
int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkStringArray * VertexTableDomains
void AddLinkEdge(const char *column1, const char *column2)
Add an edge to the link graph.
vtkMutableDirectedGraph * LinkGraph
vtkMTimeType GetMTime() override
Get the current modified time.
int ValidateLinkGraph()
Validate that the link graph is in the appropriate format.
void LinkColumnPath(vtkStringArray *column, vtkStringArray *domain=nullptr, vtkBitArray *hidden=nullptr)
Links the columns in a specific order.
void SetVertexTableConnection(vtkAlgorithmOutput *in)
A convenience method for setting the vertex table input.
A table, which contains similar-typed columns of data.
Definition vtkTable.h:169
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270