00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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
00239
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&);
00285 void operator=(const vtkReebGraph&);
00286
00287 };
00288
00289 #endif