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 -------------------------------------------------------------------------*/
66 #ifndef vtkTableToGraph_h
67 #define vtkTableToGraph_h
68 
69 #include "vtkGraphAlgorithm.h"
70 #include "vtkInfovisCoreModule.h" // For export macro
71 
72 class vtkBitArray;
74 class vtkStringArray;
75 class vtkTable;
76 
77 class VTKINFOVISCORE_EXPORT vtkTableToGraph : public vtkGraphAlgorithm
78 {
79 public:
80  static vtkTableToGraph* New();
82  void PrintSelf(ostream& os, vtkIndent indent) override;
83 
88  void AddLinkVertex(const char* column, const char* domain = nullptr, int hidden = 0);
89 
94 
98  void AddLinkEdge(const char* column1, const char* column2);
99 
104 
106 
109  vtkGetObjectMacro(LinkGraph, vtkMutableDirectedGraph);
112 
118  vtkStringArray* column, vtkStringArray* domain = nullptr, vtkBitArray* hidden = nullptr);
119 
121 
124  vtkSetMacro(Directed, bool);
125  vtkGetMacro(Directed, bool);
126  vtkBooleanMacro(Directed, bool);
128 
132  vtkMTimeType GetMTime() override;
133 
142 
143 protected:
145  ~vtkTableToGraph() override;
146 
151 
153 
155 
157 
158  bool Directed;
161 
162 private:
163  vtkTableToGraph(const vtkTableToGraph&) = delete;
164  void operator=(const vtkTableToGraph&) = delete;
165 };
166 
167 #endif
vtkTableToGraph::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkGraphAlgorithm
Superclass for algorithms that produce only graph as output.
Definition: vtkGraphAlgorithm.h:52
vtkMutableDirectedGraph
An editable directed graph.
Definition: vtkMutableDirectedGraph.h:46
vtkTableToGraph::GetMTime
vtkMTimeType GetMTime() override
Get the current modified time.
vtkTableToGraph::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTableToGraph::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:36
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:63
vtkTableToGraph::SetLinkGraph
void SetLinkGraph(vtkMutableDirectedGraph *g)
vtkTableToGraph::AddLinkVertex
void AddLinkVertex(const char *column, const char *domain=nullptr, int hidden=0)
Add a vertex to the link graph.
vtkTableToGraph::ClearLinkEdges
void ClearLinkEdges()
Clear the link graph edges.
vtkTableToGraph::vtkTableToGraph
vtkTableToGraph()
vtkTableToGraph::VertexTableDomains
vtkStringArray * VertexTableDomains
Definition: vtkTableToGraph.h:160
vtkTableToGraph
convert a vtkTable into a vtkGraph
Definition: vtkTableToGraph.h:78
vtkTableToGraph::AddLinkEdge
void AddLinkEdge(const char *column1, const char *column2)
Add an edge to the link graph.
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkTableToGraph::Directed
bool Directed
Definition: vtkTableToGraph.h:158
vtkGraphAlgorithm.h
vtkTableToGraph::SetVertexTableConnection
void SetVertexTableConnection(vtkAlgorithmOutput *in)
A convenience method for setting the vertex table input.
vtkTableToGraph::ValidateLinkGraph
int ValidateLinkGraph()
Validate that the link graph is in the appropriate format.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkTableToGraph::LinkGraph
vtkMutableDirectedGraph * LinkGraph
Definition: vtkTableToGraph.h:159
vtkTableToGraph::RequestDataObject
int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkTableToGraph::New
static vtkTableToGraph * New()
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:65
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkTableToGraph::LinkColumnPath
void LinkColumnPath(vtkStringArray *column, vtkStringArray *domain=nullptr, vtkBitArray *hidden=nullptr)
Links the columns in a specific order.
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:37
vtkTableToGraph::~vtkTableToGraph
~vtkTableToGraph() override
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:37
vtkBitArray
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:34
vtkTableToGraph::ClearLinkVertices
void ClearLinkVertices()
Clear the link graph vertices.
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293