1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
/*=========================================================================
Program: Visualization Toolkit
Module: $RCSfile: vtkSurfaceReconstructionFilter.h,v $
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkSurfaceReconstructionFilter - reconstructs a surface from unorganized points
// .SECTION Description
// vtkSurfaceReconstructionFilter takes a list of points assumed to lie on
// the surface of a solid 3D object. A signed measure of the distance to the
// surface is computed and sampled on a regular grid. The grid can then be
// contoured at zero to extract the surface. The default values for
// neighborhood size and sample spacing should give reasonable results for
// most uses but can be set if desired. This procedure is based on the PhD
// work of Hugues Hoppe: http://www.research.microsoft.com/~hoppe
#ifndef __vtkSurfaceReconstructionFilter_h
#define __vtkSurfaceReconstructionFilter_h
#include "vtkImageAlgorithm.h"
class VTK_IMAGING_EXPORT vtkSurfaceReconstructionFilter : public vtkImageAlgorithm
{
public:
vtkTypeRevisionMacro(vtkSurfaceReconstructionFilter,vtkImageAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Construct with NeighborhoodSize=20.
static vtkSurfaceReconstructionFilter* New();
// Description:
// Specify the number of neighbors each point has, used for estimating the
// local surface orientation. The default value of 20 should be OK for
// most applications, higher values can be specified if the spread of
// points is uneven. Values as low as 10 may yield adequate results for
// some surfaces. Higher values cause the algorithm to take longer. Higher
// values will cause errors on sharp boundaries.
vtkGetMacro(NeighborhoodSize,int);
vtkSetMacro(NeighborhoodSize,int);
// Description:
// Specify the spacing of the 3D sampling grid. If not set, a
// reasonable guess will be made.
vtkGetMacro(SampleSpacing,double);
vtkSetMacro(SampleSpacing,double);
protected:
vtkSurfaceReconstructionFilter();
~vtkSurfaceReconstructionFilter() {};
virtual int RequestInformation (vtkInformation *,
vtkInformationVector **,
vtkInformationVector *);
virtual int RequestData (vtkInformation *,
vtkInformationVector **,
vtkInformationVector *);
int NeighborhoodSize;
double SampleSpacing;
virtual int FillInputPortInformation(int, vtkInformation*);
private:
vtkSurfaceReconstructionFilter(const vtkSurfaceReconstructionFilter&); // Not implemented.
void operator=(const vtkSurfaceReconstructionFilter&); // Not implemented.
};
#endif
|