VTK
dox/Filtering/vtkReebGraph.h
Go to the documentation of this file.
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  "vtkMutableDirectedGraph.h"
00121 
00122 class vtkDataArray;
00123 class vtkDataSet;
00124 class vtkIdList;
00125 class vtkPolyData;
00126 class vtkReebGraphSimplificationMetric;
00127 class vtkUnstructuredGrid;
00128 
00129 class VTK_FILTERING_EXPORT vtkReebGraph : public vtkMutableDirectedGraph
00130 {
00131 
00132 public:
00133 
00134   static vtkReebGraph *New();
00135 
00136   vtkTypeMacro(vtkReebGraph, vtkMutableDirectedGraph);
00137   void PrintSelf(ostream& os, vtkIndent indent);
00138   void PrintNodeData(ostream& os, vtkIndent indent);
00139 
00144   virtual int GetDataObjectType() {return VTK_REEB_GRAPH;}
00145 
00146 
00147   enum
00148   {
00149     ERR_INCORRECT_FIELD = -1,
00150     ERR_NO_SUCH_FIELD = -2,
00151     ERR_NOT_A_SIMPLICIAL_MESH = -3
00152   };
00153 
00161   int Build(vtkPolyData *mesh, vtkDataArray *scalarField);
00162 
00168   int Build(vtkUnstructuredGrid *mesh, vtkDataArray *scalarField);
00169 
00170 
00179   int Build(vtkPolyData *mesh, vtkIdType scalarFieldId);
00180 
00188   int Build(vtkUnstructuredGrid *mesh, vtkIdType scalarFieldId);
00189 
00190 
00199   int Build(vtkPolyData *mesh, const char* scalarFieldName);
00200 
00208   int Build(vtkUnstructuredGrid *mesh, const char* scalarFieldName);
00209 
00211 
00217   int StreamTriangle(   vtkIdType vertex0Id, double scalar0,
00218                       vtkIdType vertex1Id, double scalar1,
00219                       vtkIdType vertex2Id, double scalar2);
00221 
00223 
00230   int StreamTetrahedron( vtkIdType vertex0Id, double scalar0,
00231                          vtkIdType vertex1Id, double scalar1,
00232                          vtkIdType vertex2Id, double scalar2,
00233                          vtkIdType vertex3Id, double scalar3);
00235 
00243   void CloseStream();
00244 
00245   // Descrition:
00246   // Implements deep copy
00247   void DeepCopy(vtkDataObject *src);
00248 
00250 
00275   int Simplify(double simplificationThreshold,
00276     vtkReebGraphSimplificationMetric *simplificationMetric);
00278 
00280   void Set(vtkMutableDirectedGraph *g);
00281 
00282 protected:
00283 
00284   vtkReebGraph();
00285   ~vtkReebGraph();
00286 
00287   class Implementation;
00288   Implementation* Storage;
00289 
00290 private:
00291   vtkReebGraph(const vtkReebGraph&); // Not implemented.
00292   void operator=(const vtkReebGraph&); // Not implemented.
00293 
00294 };
00295 
00296 #endif