<font color="#333333"><font size="2"><font face="georgia,serif">Yes, I am aware of that example, but I have no solution to my problem. What I want is to use a vtkPolyData object as the dataset of a vtkPointLocator. Here is my problem in a nutshell:<br>
<br>- I have a number of points in a vtkPoints object.<br>- Then, I create a vtkPolyData object and use the SetPoints function of it to define the point coordinates. <br>- Next, I create a vtkPointLocator object and use the SetDataSet function of it to build the locator from these points. <br>
- Finally, I use FindPointsWithinRadius function for a point which has many neighbors (just manually checked), but no neighbors are returned.<br>- I also tried FindClosestPoint function for each of my points. At each time, the closest point ID turns out to be 0, however it actually is not. <br>
<br>What might I be missing?<br><br><br clear="all"></font></font></font>- Ahmet Burak Yoldemir<br>
<br><br><div class="gmail_quote">On Wed, Jun 9, 2010 at 1:04 AM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Have you looked at this example:<br>
<a href="http://www.vtk.org/Wiki/VTK/Examples/PointLocator_Radius" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/PointLocator_Radius</a><br>
<div><div></div><div class="h5"><br>
<br>
On Tue, Jun 8, 2010 at 4:49 PM, A. Burak Yoldemir <<a href="mailto:yoldemir@gmail.com">yoldemir@gmail.com</a>> wrote:<br>
> Hello all,<br>
><br>
> I am having a problem with FindPointsWithinRadius function of<br>
> vtkPointLocator class. I have a bunch of points in a certain volume, with no<br>
> specific topology. Using the following code snippet, I create a point<br>
> locator object and specify its data set:<br>
><br>
> vtkPoints* edge_pts = vtkPoints::New();<br>
><br>
> for(int i = 0; i < someLimit; i++)<br>
><br>
> {<br>
><br>
> edge_pts->InsertNextPoint(somePoint);<br>
><br>
> }<br>
><br>
> vtkPolyData* edge_pts_set = vtkPolyData::New();<br>
><br>
> edge_pts_set->SetPoints(edge_pts);<br>
><br>
> edge_pts_set->Update();<br>
><br>
> vtkPointLocator* NeighborLocator = vtkPointLocator::New();<br>
><br>
> NeighborLocator->SetDataSet(edge_pts_set);<br>
><br>
> NeighborLocator->BuildLocator();<br>
><br>
> Then, I use the FindPointsWithinRadius function of NeighborLocator, where I<br>
> (manually) made sure that there are several neighbors of the query point.<br>
> However, the aforementioned function returns no neighbors. Any ideas on<br>
> where the problem could be?<br>
><br>
> Regards,<br>
><br>
><br>
> Burak<br>
</div></div><div><div></div><div class="h5">> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
><br>
</div></div></blockquote></div><br>