<div class="gmail_quote"><div>Hi Bryn,<br><br>Does FindClosestNPoints work when you set a dataset for the input?&nbsp; I&#39;ve been trying to adapt vtkKdTree so that it has most of the search functions that vtkPointLocator has (including FindClosestNPoints).&nbsp; I&#39;ve been testing them both and haven&#39;t had any noticable problems but I&#39;ve been using a data set as the input instead of dynamically inserting points like you are.&nbsp; Could you send me a sample code with your problem to look at?<br>
<br>Andy<br><br>ps.&nbsp; After I do my changes, you&#39;ll probably want to at least test out the vtkKdTree since it should usually perform much faster than the regular vtkPointLocator.<br>&nbsp;<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
------------------------------<br>
<br>
Message: 26<br>
Date: Fri, 24 Oct 2008 11:55:17 +0200<br>
From: Bryn Lloyd &lt;<a href="mailto:blloyd@vision.ee.ethz.ch">blloyd@vision.ee.ethz.ch</a>&gt;<br>
Subject: [vtkusers] vtkPointLocator<br>
To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
Message-ID: &lt;<a href="mailto:49019B85.2090404@vision.ee.ethz.ch">49019B85.2090404@vision.ee.ethz.ch</a>&gt;<br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
Hi<br>
<br>
<br>
I would like to use the vtkPointLocator in the point insertion mode,<br>
i.e. I would like to incrementally insert points and search for them.<br>
<br>
The incremental point insertion mode works with the functions:<br>
InsertNextPoint, IsInsertedPoint, FindClosestInsertedPoint<br>
<br>
<br>
There is, however, no method to search for the N closest points.<br>
<br>
I tried FindClosestNPoints with no success. I tried first calling<br>
BuildLocator on the locator but get error messages (No points to<br>
subdivide).<br>
What do I need to do, in order to use the function FindClosestNPoints in<br>
point insertion mode?<br>
<br>
<br>
<br>
Another function that is &quot;missing&quot; is point removal, although I can<br>
probably live with this.<br>
<br>
Is there a better code for doing what I need?<br>
<br>
<br>
<br>
Thanks for any suggestions &amp; help.<br>
<br>
Bryn<br>
<br>
<br>
<br>
<br>
</blockquote></div><br>