VTK: Infovis/Core/vtkTableToGraph.h Source File

| VTK 9.3.1

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
62 VTK_ABI_NAMESPACE_BEGIN
63 class vtkBitArray;
64 class vtkMutableDirectedGraph;
65 class vtkStringArray;
66 class vtkTable;
67
68 class VTKINFOVISCORE_EXPORT vtkTableToGraph : public vtkGraphAlgorithm
69 {
70 public:
71 static vtkTableToGraph* New();
72 vtkTypeMacro(vtkTableToGraph, vtkGraphAlgorithm);
73 void PrintSelf(ostream& os, vtkIndent indent) override;
74
79 void AddLinkVertex(const char* column, const char* domain = nullptr, int hidden = 0);
80
84 void ClearLinkVertices();
85
89 void AddLinkEdge(const char* column1, const char* column2);
90
94 void ClearLinkEdges();
95
97
100 vtkGetObjectMacro(LinkGraph, vtkMutableDirectedGraph);
101 void SetLinkGraph(vtkMutableDirectedGraph* g);
103
108 void LinkColumnPath(
109 vtkStringArray* column, vtkStringArray* domain = nullptr, vtkBitArray* hidden = nullptr);
110
112
115 vtkSetMacro(Directed, bool);
116 vtkGetMacro(Directed, bool);
117 vtkBooleanMacro(Directed, bool);
119
123 vtkMTimeType GetMTime() override;
124
132 void SetVertexTableConnection(vtkAlgorithmOutput* in);
133
134 protected:
135 vtkTableToGraph();
136 ~vtkTableToGraph() override;
137
141 int ValidateLinkGraph();
142
143 int FillInputPortInformation(int port, vtkInformation* info) override;
144
145 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
146
147 int RequestDataObject(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
148
149 bool Directed;
150 vtkMutableDirectedGraph* LinkGraph;
151 vtkStringArray* VertexTableDomains;
152
153 private:
154 vtkTableToGraph(const vtkTableToGraph&) = delete;
155 void operator=(const vtkTableToGraph&) = delete;
156 };
157
158 VTK_ABI_NAMESPACE_END
159 #endif
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:41
vtkBitArray
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:29
vtkGraphAlgorithm
Superclass for algorithms that produce only graph as output.
Definition: vtkGraphAlgorithm.h:49
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkMutableDirectedGraph
An editable directed graph.
Definition: vtkMutableDirectedGraph.h:46
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:41
vtkTableToGraph
convert a vtkTable into a vtkGraph
Definition: vtkTableToGraph.h:69
vtkTableToGraph::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkTableToGraph::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkTableToGraph::AddLinkVertex
void AddLinkVertex(const char *column, const char *domain=nullptr, int hidden=0)
Add a vertex to the link graph.
vtkTableToGraph::SetLinkGraph
void SetLinkGraph(vtkMutableDirectedGraph *g)
The graph describing how to link the columns in the table.
vtkTableToGraph::ClearLinkEdges
void ClearLinkEdges()
Clear the link graph edges.
vtkTableToGraph::vtkTableToGraph
vtkTableToGraph()
vtkTableToGraph::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTableToGraph::New
static vtkTableToGraph * New()
vtkTableToGraph::~vtkTableToGraph
~vtkTableToGraph() override
vtkTableToGraph::ClearLinkVertices
void ClearLinkVertices()
Clear the link graph vertices.
vtkTableToGraph::RequestDataObject
int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkTableToGraph::VertexTableDomains
vtkStringArray * VertexTableDomains
Definition: vtkTableToGraph.h:151
vtkTableToGraph::AddLinkEdge
void AddLinkEdge(const char *column1, const char *column2)
Add an edge to the link graph.
vtkTableToGraph::LinkGraph
vtkMutableDirectedGraph * LinkGraph
Definition: vtkTableToGraph.h:150
vtkTableToGraph::GetMTime
vtkMTimeType GetMTime() override
Get the current modified time.
vtkTableToGraph::ValidateLinkGraph
int ValidateLinkGraph()
Validate that the link graph is in the appropriate format.
vtkTableToGraph::LinkColumnPath
void LinkColumnPath(vtkStringArray *column, vtkStringArray *domain=nullptr, vtkBitArray *hidden=nullptr)
Links the columns in a specific order.
vtkTableToGraph::SetVertexTableConnection
void SetVertexTableConnection(vtkAlgorithmOutput *in)
A convenience method for setting the vertex table input.
vtkTableToGraph::Directed
bool Directed
Definition: vtkTableToGraph.h:149
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkGraphAlgorithm.h
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270