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