VTK
vtkReebGraph.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: $RCSfile: vtkReebGraph.h,v $
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 
117 #ifndef vtkReebGraph_h
118 #define vtkReebGraph_h
119 
120 #include "vtkCommonDataModelModule.h" // For export macro
121 #include "vtkMutableDirectedGraph.h"
122 
123 class vtkDataArray;
124 class vtkDataSet;
125 class vtkIdList;
126 class vtkPolyData;
128 class vtkUnstructuredGrid;
129 
131 {
132 
133 public:
134 
135  static vtkReebGraph *New();
136 
138  void PrintSelf(ostream& os, vtkIndent indent);
139  void PrintNodeData(ostream& os, vtkIndent indent);
140 
145  virtual int GetDataObjectType() {return VTK_REEB_GRAPH;}
146 
147 
148  enum
149  {
150  ERR_INCORRECT_FIELD = -1,
151  ERR_NO_SUCH_FIELD = -2,
152  ERR_NOT_A_SIMPLICIAL_MESH = -3
153  };
154 
162  int Build(vtkPolyData *mesh, vtkDataArray *scalarField);
163 
169  int Build(vtkUnstructuredGrid *mesh, vtkDataArray *scalarField);
170 
171 
180  int Build(vtkPolyData *mesh, vtkIdType scalarFieldId);
181 
189  int Build(vtkUnstructuredGrid *mesh, vtkIdType scalarFieldId);
190 
191 
200  int Build(vtkPolyData *mesh, const char* scalarFieldName);
201 
209  int Build(vtkUnstructuredGrid *mesh, const char* scalarFieldName);
210 
212 
218  int StreamTriangle( vtkIdType vertex0Id, double scalar0,
219  vtkIdType vertex1Id, double scalar1,
220  vtkIdType vertex2Id, double scalar2);
222 
224 
231  int StreamTetrahedron( vtkIdType vertex0Id, double scalar0,
232  vtkIdType vertex1Id, double scalar1,
233  vtkIdType vertex2Id, double scalar2,
234  vtkIdType vertex3Id, double scalar3);
236 
244  void CloseStream();
245 
246  // Descrition:
247  // Implements deep copy
248  void DeepCopy(vtkDataObject *src);
249 
251 
276  int Simplify(double simplificationThreshold,
277  vtkReebGraphSimplificationMetric *simplificationMetric);
279 
281  void Set(vtkMutableDirectedGraph *g);
282 
283 protected:
284 
285  vtkReebGraph();
286  ~vtkReebGraph();
287 
288  class Implementation;
289  Implementation* Storage;
290 
291 private:
292  vtkReebGraph(const vtkReebGraph&); // Not implemented.
293  void operator=(const vtkReebGraph&); // Not implemented.
294 
295 };
296 
297 #endif
static vtkMutableDirectedGraph * New()
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
virtual void DeepCopy(vtkDataObject *obj)
int vtkIdType
Definition: vtkType.h:275
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
#define VTK_REEB_GRAPH
Definition: vtkType.h:94
Reeb graph computation for PL scalar fields.
Definition: vtkReebGraph.h:130
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
void PrintSelf(ostream &os, vtkIndent indent)
An editable directed graph.
virtual int GetDataObjectType()
Definition: vtkReebGraph.h:145
abstract class for custom Reeb graph simplification metric design.
general representation of visualization data
Definition: vtkDataObject.h:64
Implementation * Storage
Definition: vtkReebGraph.h:288
#define VTKCOMMONDATAMODEL_EXPORT