[vtkusers] David Doria's vtkPointSetNormalOrientation filter error

paws paws at op.pl
Wed Mar 23 12:00:05 EDT 2011


Hello everybody,

I try to receive point’s normal orientation from unorganized points cloud.
I've tried to use David Doria's vtkPointSetNormalEstimation and
vtkPointSetNormalOrientation filters, but I received an error:

"Unhandled exception at 0x75799617 in meshing.exe: Microsoft C++ exception:
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::negative_edge>
> at memory location 0x0069f294"

This error occurs while processing this part of
"vtkPointSetNormalOrientation.cxx" code:

  //find the minimum spanning tree on the Riemannian graph, starting from
the highest point
  vtkSmartPointer MSTFilter = vtkSmartPointer::New();
  MSTFilter->SetOriginVertex(MaxZId);
  MSTFilter->SetInput(RiemannianGraph);
  MSTFilter->SetEdgeWeightArrayName("Weights");
  MSTFilter->Update();

Pipeline I use looks like this:

I have unorganized points cloud in vtkPoints object:

vtkSmartPointer points = vtkSmartPointer::New();

...

vtkSmartPointer polydata = vtkSmartPointer::New();
polydata->SetPoints(points);
vtkSmartPointer NormalEstimation = vtkSmartPointer::New();
NormalEstimation->SetInput(polydata);
NormalEstimation->SetkNeighbors(10); 

vtkSmartPointer NormalOrientationFilter = vtkSmartPointer::New();
NormalOrientationFilter->SetInputConnection(NormalEstimation->GetOutputPort());
NormalOrientationFilter->SetKNearestNeighbors(10);

vtkSmartPointer vertexFilter = vtkSmartPointer::New();
vertexFilter->SetInputConnection(NormalOrientationFilter->GetOutputPort());
vertexFilter->Update();

polydata->ShallowCopy(vertexFilter->GetOutput());


//----------------------------------

Additional information:

1) This code without "vtkPointSetNormalOrientation" filter (but WITH
"vtkPointSetNormalEstimation" filter) works correctly.
2) David Doria's "vtkPointSetNormalOrientationExample.cxx" works correctly.
3) I use the latest version (1.46.1) of boost libraries.

Can anyone tell me what I’m doing wrong?
Thanks in advance.


--
View this message in context: http://vtk.1045678.n5.nabble.com/David-Doria-s-vtkPointSetNormalOrientation-filter-error-tp4258994p4258994.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list