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 -------------------------------------------------------------------------*/
75 #ifndef vtkTableToGraph_h
76 #define vtkTableToGraph_h
77 
78 #include "vtkGraphAlgorithm.h"
79 #include "vtkInfovisCoreModule.h" // For export macro
80 
81 class vtkBitArray;
83 class vtkStringArray;
84 class vtkTable;
85 
86 class VTKINFOVISCORE_EXPORT vtkTableToGraph : public vtkGraphAlgorithm
87 {
88 public:
89  static vtkTableToGraph* New();
91  void PrintSelf(ostream& os, vtkIndent indent) override;
92 
97  void AddLinkVertex(const char* column, const char* domain = nullptr, int hidden = 0);
98 
102  void ClearLinkVertices();
103 
107  void AddLinkEdge(const char* column1, const char* column2);
108 
112  void ClearLinkEdges();
113 
115 
118  vtkGetObjectMacro(LinkGraph, vtkMutableDirectedGraph);
119  void SetLinkGraph(vtkMutableDirectedGraph* g);
121 
126  void LinkColumnPath(
127  vtkStringArray* column, vtkStringArray* domain = nullptr, vtkBitArray* hidden = nullptr);
128 
130 
133  vtkSetMacro(Directed, bool);
134  vtkGetMacro(Directed, bool);
135  vtkBooleanMacro(Directed, bool);
137 
141  vtkMTimeType GetMTime() override;
142 
150  void SetVertexTableConnection(vtkAlgorithmOutput* in);
151 
152 protected:
153  vtkTableToGraph();
154  ~vtkTableToGraph() override;
155 
159  int ValidateLinkGraph();
160 
161  int FillInputPortInformation(int port, vtkInformation* info) override;
162 
164 
166 
167  bool Directed;
170 
171 private:
172  vtkTableToGraph(const vtkTableToGraph&) = delete;
173  void operator=(const vtkTableToGraph&) = delete;
174 };
175 
176 #endif
vtkGraphAlgorithm
Superclass for algorithms that produce only graph as output.
Definition: vtkGraphAlgorithm.h:51
vtkMutableDirectedGraph
An editable directed graph.
Definition: vtkMutableDirectedGraph.h:45
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:62
vtkTableToGraph::VertexTableDomains
vtkStringArray * VertexTableDomains
Definition: vtkTableToGraph.h:169
vtkTableToGraph
convert a vtkTable into a vtkGraph
Definition: vtkTableToGraph.h:86
vtkGraphAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkTableToGraph::Directed
bool Directed
Definition: vtkTableToGraph.h:167
vtkGraphAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGraphAlgorithm.h
vtkGraphAlgorithm::RequestDataObject
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkTableToGraph::LinkGraph
vtkMutableDirectedGraph * LinkGraph
Definition: vtkTableToGraph.h:168
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkGraphAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:36
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:36
vtkBitArray
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:33
vtkGraphAlgorithm::New
static vtkGraphAlgorithm * New()
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293