[vtkusers] vtkPointLocator Problem

Bill Lorensen bill.lorensen at gmail.com
Tue Jun 8 18:04:55 EDT 2010


Have you looked at this example:
http://www.vtk.org/Wiki/VTK/Examples/PointLocator_Radius


On Tue, Jun 8, 2010 at 4:49 PM, A. Burak Yoldemir <yoldemir at gmail.com> wrote:
> Hello all,
>
> I am having a problem with FindPointsWithinRadius function of
> vtkPointLocator class. I have a bunch of points in a certain volume, with no
> specific topology. Using the following code snippet, I create a point
> locator object and specify its data set:
>
> vtkPoints* edge_pts = vtkPoints::New();
>
> for(int i = 0; i < someLimit; i++)
>
> {
>
> edge_pts->InsertNextPoint(somePoint);
>
> }
>
> vtkPolyData* edge_pts_set = vtkPolyData::New();
>
> edge_pts_set->SetPoints(edge_pts);
>
> edge_pts_set->Update();
>
> vtkPointLocator* NeighborLocator = vtkPointLocator::New();
>
> NeighborLocator->SetDataSet(edge_pts_set);
>
> NeighborLocator->BuildLocator();
>
> Then, I use the FindPointsWithinRadius function of NeighborLocator, where I
> (manually) made sure that there are several neighbors of the query point.
> However, the aforementioned function returns no neighbors. Any ideas on
> where the problem could be?
>
> Regards,
>
>
> Burak
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list