VTK  9.3.1
vtkReebGraph.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 
106 #ifndef vtkReebGraph_h
107 #define vtkReebGraph_h
108 
109 #include "vtkCommonDataModelModule.h" // For export macro
110 #include "vtkMutableDirectedGraph.h"
111 
112 VTK_ABI_NAMESPACE_BEGIN
113 class vtkDataArray;
114 class vtkDataSet;
115 class vtkIdList;
116 class vtkPolyData;
118 class vtkUnstructuredGrid;
119 
120 class VTKCOMMONDATAMODEL_EXPORT vtkReebGraph : public vtkMutableDirectedGraph
121 {
122 
123 public:
124  static vtkReebGraph* New();
125 
127  void PrintSelf(ostream& os, vtkIndent indent) override;
128  void PrintNodeData(ostream& os, vtkIndent indent);
129 
136  int GetDataObjectType() override { return VTK_REEB_GRAPH; }
137 
138  enum
139  {
140  ERR_INCORRECT_FIELD = -1,
141  ERR_NO_SUCH_FIELD = -2,
142  ERR_NOT_A_SIMPLICIAL_MESH = -3
143  };
144 
158  int Build(vtkPolyData* mesh, vtkDataArray* scalarField);
159 
172  int Build(vtkUnstructuredGrid* mesh, vtkDataArray* scalarField);
173 
190  int Build(vtkPolyData* mesh, vtkIdType scalarFieldId);
191 
207  int Build(vtkUnstructuredGrid* mesh, vtkIdType scalarFieldId);
208 
225  int Build(vtkPolyData* mesh, const char* scalarFieldName);
226 
242  int Build(vtkUnstructuredGrid* mesh, const char* scalarFieldName);
243 
257  int StreamTriangle(vtkIdType vertex0Id, double scalar0, vtkIdType vertex1Id, double scalar1,
258  vtkIdType vertex2Id, double scalar2);
259 
274  int StreamTetrahedron(vtkIdType vertex0Id, double scalar0, vtkIdType vertex1Id, double scalar1,
275  vtkIdType vertex2Id, double scalar2, vtkIdType vertex3Id, double scalar3);
276 
287  void CloseStream();
288 
289  // Description:
290  // Implements deep copy
291  void DeepCopy(vtkDataObject* src) override;
292 
334  int Simplify(
335  double simplificationThreshold, vtkReebGraphSimplificationMetric* simplificationMetric);
336 
341  void Set(vtkMutableDirectedGraph* g);
342 
343 protected:
344  vtkReebGraph();
345  ~vtkReebGraph() override;
346 
347  class Implementation;
348  Implementation* Storage;
349 
350 private:
351  vtkReebGraph(const vtkReebGraph&) = delete;
352  void operator=(const vtkReebGraph&) = delete;
353 };
354 
355 VTK_ABI_NAMESPACE_END
356 #endif
static vtkMutableDirectedGraph * New()
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
int vtkIdType
Definition: vtkType.h:315
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
int GetDataObjectType() override
Return class name of data type.
Definition: vtkReebGraph.h:136
#define VTK_REEB_GRAPH
Definition: vtkType.h:93
Reeb graph computation for PL scalar fields.
Definition: vtkReebGraph.h:120
a simple class to control print indentation
Definition: vtkIndent.h:28
list of point or cell ids
Definition: vtkIdList.h:22
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
An editable directed graph.
void DeepCopy(vtkDataObject *obj) override
Deep copies the data object into this graph.
abstract class for custom Reeb graph simplification metric design.
general representation of visualization data
Definition: vtkDataObject.h:54
Implementation * Storage
Definition: vtkReebGraph.h:347
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.