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 
00140   enum
00141   {
00142     ERR_INCORRECT_FIELD = -1,
00143     ERR_NO_SUCH_FIELD = -2,
00144     ERR_NOT_A_SIMPLICIAL_MESH = -3
00145   };
00146 
00154   int Build(vtkPolyData *mesh, vtkDataArray *scalarField);
00155 
00161   int Build(vtkUnstructuredGrid *mesh, vtkDataArray *scalarField);
00162 
00163 
00172   int Build(vtkPolyData *mesh, vtkIdType scalarFieldId);
00173 
00181   int Build(vtkUnstructuredGrid *mesh, vtkIdType scalarFieldId);
00182 
00183 
00192   int Build(vtkPolyData *mesh, const char* scalarFieldName);
00193 
00201   int Build(vtkUnstructuredGrid *mesh, const char* scalarFieldName);
00202 
00204 
00210   int StreamTriangle(   vtkIdType vertex0Id, double scalar0,
00211                       vtkIdType vertex1Id, double scalar1,
00212                       vtkIdType vertex2Id, double scalar2);
00214 
00216 
00223   int StreamTetrahedron( vtkIdType vertex0Id, double scalar0,
00224                          vtkIdType vertex1Id, double scalar1,
00225                          vtkIdType vertex2Id, double scalar2,
00226                          vtkIdType vertex3Id, double scalar3);
00228 
00236   void CloseStream();
00237 
00238   // Descrition:
00239   // Implements deep copy
00240   void DeepCopy(vtkDataObject *src);
00241 
00243 
00268   int Simplify(double simplificationThreshold,
00269     vtkReebGraphSimplificationMetric *simplificationMetric);
00271 
00273   void Set(vtkMutableDirectedGraph *g);
00274 
00275 protected:
00276 
00277   vtkReebGraph();
00278   ~vtkReebGraph();
00279 
00280   class Implementation;
00281   Implementation* Storage;
00282 
00283 private:
00284   vtkReebGraph(const vtkReebGraph&); // Not implemented.
00285   void operator=(const vtkReebGraph&); // Not implemented.
00286 
00287 };
00288 
00289 #endif