[vtkusers] Surface reconstruction from a point cloud

Mathieu Malaterre mathieu.malaterre at kitware.com
Mon Mar 7 15:39:17 EST 2005


Dr Zeto wrote:
> Hi all,
> I am doing a very simple thing that is not working,
> which  I dont know why. Given a cloud of points, I
> want to generate a surface. VTK documentation shows
> that there are classes vtkSurfaceReconstructionFilter
> and vtkContourFilter for this purpose. Following is my
> code which is not working, which is a direct
> conversion of 
> the example @
> http://public.kitware.com/VTK/doc/release/4.0/html/c2_vtk_e_1.html#c2_vtk_e_vtkSurfaceReconstructionFilter.
> 
> The problem appears to be somewhere between the usage
> of above mentioned classes. I have used
> vtkSurfaceReconstructionFilter to generate the
> volumetric distance field. But transferring the output
> of vtkSurfaceReconstructionFilter to vtkContourFilter
> doesnt seem to be as simple as given in the TCL
> example  as vtkSurfaceReconstructionFilter::GetOutput
> does not return vtkPolyData*, while
> vtkContourFilter::SetInput requires vtkPolyData* as an

vtkContourFilter::SetInput requires a vtkDataObject as input. You are 
all set if you just pass the vtkImageData to the Contour Filter.

HTH
Mathieu
http://www.vtk.org/doc/nightly/html/classvtkPolyDataAlgorithm.html#z1196_0



More information about the vtkusers mailing list