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 "vtkMutableDirectedGraph.h"
121 
122 class vtkDataArray;
123 class vtkDataSet;
124 class vtkIdList;
125 class vtkPolyData;
127 class vtkUnstructuredGrid;
128 
130 {
131 
132 public:
133 
134  static vtkReebGraph *New();
135 
137  void PrintSelf(ostream& os, vtkIndent indent);
138  void PrintNodeData(ostream& os, vtkIndent indent);
139 
144  virtual int GetDataObjectType() {return VTK_REEB_GRAPH;}
145 
146 
147  enum
148  {
149  ERR_INCORRECT_FIELD = -1,
150  ERR_NO_SUCH_FIELD = -2,
151  ERR_NOT_A_SIMPLICIAL_MESH = -3
152  };
153 
161  int Build(vtkPolyData *mesh, vtkDataArray *scalarField);
162 
168  int Build(vtkUnstructuredGrid *mesh, vtkDataArray *scalarField);
169 
170 
179  int Build(vtkPolyData *mesh, vtkIdType scalarFieldId);
180 
188  int Build(vtkUnstructuredGrid *mesh, vtkIdType scalarFieldId);
189 
190 
199  int Build(vtkPolyData *mesh, const char* scalarFieldName);
200 
208  int Build(vtkUnstructuredGrid *mesh, const char* scalarFieldName);
209 
211 
217  int StreamTriangle( vtkIdType vertex0Id, double scalar0,
218  vtkIdType vertex1Id, double scalar1,
219  vtkIdType vertex2Id, double scalar2);
221 
223 
230  int StreamTetrahedron( vtkIdType vertex0Id, double scalar0,
231  vtkIdType vertex1Id, double scalar1,
232  vtkIdType vertex2Id, double scalar2,
233  vtkIdType vertex3Id, double scalar3);
235 
243  void CloseStream();
244 
245  // Descrition:
246  // Implements deep copy
247  void DeepCopy(vtkDataObject *src);
248 
250 
275  int Simplify(double simplificationThreshold,
276  vtkReebGraphSimplificationMetric *simplificationMetric);
278 
280  void Set(vtkMutableDirectedGraph *g);
281 
282 protected:
283 
284  vtkReebGraph();
285  ~vtkReebGraph();
286 
287  class Implementation;
288  Implementation* Storage;
289 
290 private:
291  vtkReebGraph(const vtkReebGraph&); // Not implemented.
292  void operator=(const vtkReebGraph&); // Not implemented.
293 
294 };
295 
296 #endif