<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">
vtkKdTreePointLocator is a leaf class that implements the vtkAbstractPointLocator interface.  It would be best if new interface methods were be added at the abstract layer and then implemented in each leaf class.<br><br>

</blockquote>
<div><br></div><div>Good point. Even better than that, the abstract class can provide the implementation because all it does is setup the parameters to call a pure virtual function. This means that the logic of changing parameters is done at the abstract level, then the appropriate "inner function" is called depending on the subclass.</div>

<div><br></div><div>I have added this type of convenience function for FindClosestPoint, FindClosestNPoints, and FindPointsWithinRadius.</div><div><br></div><div>The code is here:</div><div><div style="font-family: arial, sans-serif; border-collapse: collapse; ">

repo: git@github.com:daviddoria/daviddoria-vtk.git</div><div style="font-family: arial, sans-serif; border-collapse: collapse; ">branch: VTK-KdTree</div><div style="font-family: arial, sans-serif; border-collapse: collapse; ">

<br></div><div style="font-family: arial, sans-serif; border-collapse: collapse; ">I added tests for all of the subclasses to exercise the new (and old) functions:</div><div style="font-family: arial, sans-serif; border-collapse: collapse; ">
Filter/Testing/Cxx/TestKdTreePointLocator.cxx </div><div style="font-family: arial, sans-serif; border-collapse: collapse; ">Filter/Testing/Cxx/TestOctreePointLocator.cxx<span class="Apple-style-span" style="border-collapse: separate; font-family: arial; "> </span></div>
</div><div style="font-family: arial, sans-serif; border-collapse: collapse; "><span class="Apple-style-span" style="border-collapse: separate; font-family: arial; "><span class="Apple-style-span" style="font-family: arial, sans-serif; border-collapse: collapse; ">Filter/Testing/Cxx/TestIncrementalOctreePointLocator.cxx<span class="Apple-style-span" style="border-collapse: separate; font-family: arial; "> </span></span></span></div>
<div style="font-family: arial, sans-serif; border-collapse: collapse; "><span class="Apple-style-span" style="border-collapse: separate; font-family: arial; "><span class="Apple-style-span" style="font-family: arial, sans-serif; border-collapse: collapse; "><span class="Apple-style-span" style="border-collapse: separate; font-family: arial; "><span class="Apple-style-span" style="font-family: arial, sans-serif; border-collapse: collapse; ">Filter/Testing/Cxx/TestPointLocator.cxx<span class="Apple-style-span" style="border-collapse: separate; font-family: arial; "> </span></span></span></span></span></div>
<div style="font-family:arial, sans-serif;font-size:12.5px;border-collapse:collapse"><span class="Apple-style-span" style="border-collapse: separate; font-family: arial; font-size: small; "><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12.5px; border-collapse: collapse; "><span class="Apple-style-span" style="border-collapse: separate; font-family: arial; font-size: small; "><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12.5px; border-collapse: collapse; "><span class="Apple-style-span" style="border-collapse: separate; font-family: arial; font-size: small; "><br>
</span></span></span></span></span></div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">


A potential problem with your proposed implementation is that it assumes the vtkDataSet is a vtkPointSet, which may not be true. <br><br></blockquote><div>It looks like vtkDataSet also implements a GetPoint(vtkIdType, double*) function, so I changed it to cast to a vtkDataSet instead of a vtkPointSet.</div>


<div> </div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">


I definitely agree that the proposed api is convenient, but it doesn't add new power to the class.<br><font color="#888888"></font><br></blockquote><div> </div><div>Yes, they are indeed convenience functions!  I'm all for making things more convenient :)</div>


<div class="gmail_quote"><br></div><div class="gmail_quote">Please let me know what you think.</div><div class="gmail_quote"><br></div>Thanks,<br><br><div>David</div>