[vtkusers] Problem with Poisson Reconstruction filter

niccolo camarlinghi niccolo.camarlinghi at gmail.com
Thu Sep 23 08:20:56 EDT 2010


Dear vtk users,

i'm trying to reconstruct a surface from a cloud of points.
Since i'm not satisfied with Delaunay filter, i was trying to use, Poisson
Filter (which is not contained yet in the official release) together with
 vtkPointSetNormalEstimation .
When i run the code i obtain "The data set does not contain normals! This is
a fatal error!".
I attach a little piece of code to explain what i'm doing.
Maybe there is something wrong in the polydata i'm using...



std::cout <<"Evaluating Triangulation with poisson reconstruction filter" <<
std::endl;

// the input data

vtkSmartPointer<vtkPolyData>ListaPunti=vtkSmartPointer<vtkPolyData>::New();

ListaPunti->SetPoints(Points); //  Points is  vtkPoints smartpointer

ListaPunti->SetPolys(CellArray); // CellArray is vtkCellArray smartpointer

// normal estimation filter

vtkSmartPointer<vtkPointSetNormalEstimation> normalEstimation =
vtkSmartPointer<vtkPointSetNormalEstimation>::New();

normalEstimation->SetInput(ListaPunti);

normalEstimation->SetkNeighbors(5);

normalEstimation->Update();

// poisson filter

vtkSmartPointer<vtkPoissonReconstruction> poissonFilter =
vtkSmartPointer<vtkPoissonReconstruction>::New();

poissonFilter->SetDepth( 8 );

poissonFilter->SetInput(normalEstimation->GetOutput());

poissonFilter->Update();

Any help will be appreciate.

Thanks

Niccolo' Camarlinghi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100923/891f7231/attachment.htm>


More information about the vtkusers mailing list