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) VTK_OVERRIDE;
143  void PrintNodeData(ostream& os, vtkIndent indent);
144 
151  int GetDataObjectType() VTK_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  // Descrition:
311  // Implements deep copy
312  void DeepCopy(vtkDataObject *src) VTK_OVERRIDE;
313 
355  int Simplify(double simplificationThreshold,
356  vtkReebGraphSimplificationMetric *simplificationMetric);
357 
362  void Set(vtkMutableDirectedGraph *g);
363 
364 protected:
365 
366  vtkReebGraph();
367  ~vtkReebGraph() VTK_OVERRIDE;
368 
369  class Implementation;
370  Implementation* Storage;
371 
372 private:
373  vtkReebGraph(const vtkReebGraph&) VTK_DELETE_FUNCTION;
374  void operator=(const vtkReebGraph&) VTK_DELETE_FUNCTION;
375 
376 };
377 
378 #endif
static vtkMutableDirectedGraph * New()
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
int vtkIdType
Definition: vtkType.h:287
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
int GetDataObjectType() override
Return class name of data type.
Definition: vtkReebGraph.h:151
#define VTK_REEB_GRAPH
Definition: vtkType.h:115
Reeb graph computation for PL scalar fields.
Definition: vtkReebGraph.h:134
a simple class to control print indentation
Definition: vtkIndent.h:39
list of point or cell ids
Definition: vtkIdList.h:36
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
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:64
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.