1. Default Section

Question Title

* 1. I would like to propose a new function for vtkKdTreePointLocator to query a KD tree with the index of a point already in the tree. The new function will optionally include n, the query index, in the results list.

void vtkKdTreePointLocator::FindPointsWithinRadius(const double R, const vtkIdType n, vtkIdList *result, const bool includeN)

{
double queryPoint[3];
vtkPointSet::SafeDownCast(this->GetDataSet())->GetPoint(n, queryPoint);
this->BuildLocator();
this->KdTree->FindPointsWithinRadius(R, queryPoint, result);
if(!includeN)
{
result->DeleteId(n);
}
}

There is a branch on this repo:
git@github.com:daviddoria/daviddoria-vtk.git

called VTK-KdTree that you can pull to see the code along with a test.

Would you like this function added to VTK?

T