VTK
vtkReebGraph.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkReebGraph.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 (c) Sandia Corporation
17  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18 ----------------------------------------------------------------------------*/
19 
121 #ifndef vtkReebGraph_h
122 #define vtkReebGraph_h
123 
124 #include "vtkCommonDataModelModule.h" // For export macro
125 #include "vtkMutableDirectedGraph.h"
126 
127 class vtkDataArray;
128 class vtkDataSet;
129 class vtkIdList;
130 class vtkPolyData;
132 class vtkUnstructuredGrid;
133 
134 class VTKCOMMONDATAMODEL_EXPORT vtkReebGraph : public vtkMutableDirectedGraph
135 {
136 
137 public:
138 
139  static vtkReebGraph *New();
140 
142  void PrintSelf(ostream& os, vtkIndent indent) override;
143  void PrintNodeData(ostream& os, vtkIndent indent);
144 
151  int GetDataObjectType() override {return VTK_REEB_GRAPH;}
152 
153 
154  enum
155  {
156  ERR_INCORRECT_FIELD = -1,
157  ERR_NO_SUCH_FIELD = -2,
158  ERR_NOT_A_SIMPLICIAL_MESH = -3
159  };
160 
174  int Build(vtkPolyData *mesh, vtkDataArray *scalarField);
175 
188  int Build(vtkUnstructuredGrid *mesh, vtkDataArray *scalarField);
189 
190 
207  int Build(vtkPolyData *mesh, vtkIdType scalarFieldId);
208 
224  int Build(vtkUnstructuredGrid *mesh, vtkIdType scalarFieldId);
225 
226 
243  int Build(vtkPolyData *mesh, const char* scalarFieldName);
244 
260  int Build(vtkUnstructuredGrid *mesh, const char* scalarFieldName);
261 
275  int StreamTriangle( vtkIdType vertex0Id, double scalar0,
276  vtkIdType vertex1Id, double scalar1,
277  vtkIdType vertex2Id, double scalar2);
278 
293  int StreamTetrahedron( vtkIdType vertex0Id, double scalar0,
294  vtkIdType vertex1Id, double scalar1,
295  vtkIdType vertex2Id, double scalar2,
296  vtkIdType vertex3Id, double scalar3);
297 
308  void CloseStream();
309 
310  // Description:
311  // Implements deep copy
312  void DeepCopy(vtkDataObject *src) override;
313 
355  int Simplify(double simplificationThreshold,
356  vtkReebGraphSimplificationMetric *simplificationMetric);
357 
363 
364 protected:
365 
367  ~vtkReebGraph() override;
368 
369  class Implementation;
370  Implementation* Storage;
371 
372 private:
373  vtkReebGraph(const vtkReebGraph&) = delete;
374  void operator=(const vtkReebGraph&) = delete;
375 
376 };
377 
378 #endif
vtkReebGraph::Set
void Set(vtkMutableDirectedGraph *g)
Use a pre-defined Reeb graph (post-processing).
vtkMutableDirectedGraph
An editable directed graph.
Definition: vtkMutableDirectedGraph.h:52
vtkReebGraph::Build
int Build(vtkUnstructuredGrid *mesh, const char *scalarFieldName)
Build the Reeb graph of the field given by the name 'scalarFieldName', defined on the volume mesh 'me...
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkReebGraph::Build
int Build(vtkPolyData *mesh, vtkIdType scalarFieldId)
Build the Reeb graph of the field given by the Id 'scalarFieldId', defined on the surface mesh 'mesh'...
VTK_REEB_GRAPH
#define VTK_REEB_GRAPH
Definition: vtkType.h:119
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkMutableDirectedGraph.h
vtkReebGraph::~vtkReebGraph
~vtkReebGraph() override
vtkReebGraphSimplificationMetric
abstract class for custom Reeb graph simplification metric design.
Definition: vtkReebGraphSimplificationMetric.h:61
vtkReebGraph::StreamTriangle
int StreamTriangle(vtkIdType vertex0Id, double scalar0, vtkIdType vertex1Id, double scalar1, vtkIdType vertex2Id, double scalar2)
Streaming Reeb graph computation.
vtkReebGraph::Build
int Build(vtkUnstructuredGrid *mesh, vtkIdType scalarFieldId)
Build the Reeb graph of the field given by the Id 'scalarFieldId', defined on the volume mesh 'mesh'.
vtkReebGraph
Reeb graph computation for PL scalar fields.
Definition: vtkReebGraph.h:135
vtkReebGraph::Storage
Implementation * Storage
Definition: vtkReebGraph.h:369
vtkReebGraph::CloseStream
void CloseStream()
Finalize internal data structures, in the case of streaming computations (with StreamTriangle or Stre...
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkReebGraph::vtkReebGraph
vtkReebGraph()
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:37
vtkReebGraph::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkReebGraph::New
static vtkReebGraph * New()
vtkReebGraph::Build
int Build(vtkUnstructuredGrid *mesh, vtkDataArray *scalarField)
Build the Reeb graph of the field 'scalarField' defined on the volume mesh 'mesh'.
vtkReebGraph::Build
int Build(vtkPolyData *mesh, const char *scalarFieldName)
Build the Reeb graph of the field given by the name 'scalarFieldName', defined on the surface mesh 'm...
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkReebGraph::DeepCopy
void DeepCopy(vtkDataObject *src) override
Deep copies the data object into this graph.
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:89
vtkReebGraph::GetDataObjectType
int GetDataObjectType() override
Return class name of data type.
Definition: vtkReebGraph.h:151
vtkReebGraph::Build
int Build(vtkPolyData *mesh, vtkDataArray *scalarField)
Build the Reeb graph of the field 'scalarField' defined on the surface mesh 'mesh'.
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkReebGraph::Simplify
int Simplify(double simplificationThreshold, vtkReebGraphSimplificationMetric *simplificationMetric)
Simplify the Reeb graph given a threshold 'simplificationThreshold' (between 0 and 1).
vtkReebGraph::StreamTetrahedron
int StreamTetrahedron(vtkIdType vertex0Id, double scalar0, vtkIdType vertex1Id, double scalar1, vtkIdType vertex2Id, double scalar2, vtkIdType vertex3Id, double scalar3)
Streaming Reeb graph computation.
vtkReebGraph::PrintNodeData
void PrintNodeData(ostream &os, vtkIndent indent)