VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkReebGraph.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*---------------------------------------------------------------------------- 00016 Copyright (c) Sandia Corporation 00017 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details. 00018 ----------------------------------------------------------------------------*/ 00019 00117 #ifndef __vtkReebGraph_h 00118 #define __vtkReebGraph_h 00119 00120 #include "vtkCommonDataModelModule.h" // For export macro 00121 #include "vtkMutableDirectedGraph.h" 00122 00123 class vtkDataArray; 00124 class vtkDataSet; 00125 class vtkIdList; 00126 class vtkPolyData; 00127 class vtkReebGraphSimplificationMetric; 00128 class vtkUnstructuredGrid; 00129 00130 class VTKCOMMONDATAMODEL_EXPORT vtkReebGraph : public vtkMutableDirectedGraph 00131 { 00132 00133 public: 00134 00135 static vtkReebGraph *New(); 00136 00137 vtkTypeMacro(vtkReebGraph, vtkMutableDirectedGraph); 00138 void PrintSelf(ostream& os, vtkIndent indent); 00139 void PrintNodeData(ostream& os, vtkIndent indent); 00140 00145 virtual int GetDataObjectType() {return VTK_REEB_GRAPH;} 00146 00147 00148 enum 00149 { 00150 ERR_INCORRECT_FIELD = -1, 00151 ERR_NO_SUCH_FIELD = -2, 00152 ERR_NOT_A_SIMPLICIAL_MESH = -3 00153 }; 00154 00162 int Build(vtkPolyData *mesh, vtkDataArray *scalarField); 00163 00169 int Build(vtkUnstructuredGrid *mesh, vtkDataArray *scalarField); 00170 00171 00180 int Build(vtkPolyData *mesh, vtkIdType scalarFieldId); 00181 00189 int Build(vtkUnstructuredGrid *mesh, vtkIdType scalarFieldId); 00190 00191 00200 int Build(vtkPolyData *mesh, const char* scalarFieldName); 00201 00209 int Build(vtkUnstructuredGrid *mesh, const char* scalarFieldName); 00210 00212 00218 int StreamTriangle( vtkIdType vertex0Id, double scalar0, 00219 vtkIdType vertex1Id, double scalar1, 00220 vtkIdType vertex2Id, double scalar2); 00222 00224 00231 int StreamTetrahedron( vtkIdType vertex0Id, double scalar0, 00232 vtkIdType vertex1Id, double scalar1, 00233 vtkIdType vertex2Id, double scalar2, 00234 vtkIdType vertex3Id, double scalar3); 00236 00244 void CloseStream(); 00245 00246 // Descrition: 00247 // Implements deep copy 00248 void DeepCopy(vtkDataObject *src); 00249 00251 00276 int Simplify(double simplificationThreshold, 00277 vtkReebGraphSimplificationMetric *simplificationMetric); 00279 00281 void Set(vtkMutableDirectedGraph *g); 00282 00283 protected: 00284 00285 vtkReebGraph(); 00286 ~vtkReebGraph(); 00287 00288 class Implementation; 00289 Implementation* Storage; 00290 00291 private: 00292 vtkReebGraph(const vtkReebGraph&); // Not implemented. 00293 void operator=(const vtkReebGraph&); // Not implemented. 00294 00295 }; 00296 00297 #endif