nanoflann, forked from
flann (Fast Library for Approximate Nearest Neighbors), is a very powerful and fast point search library that I’ve been using for years on point clouds. There are a lot of different indexing schemes (see page 9 of the manual).
The main difference between
nanoflann is that
flann has run-time overheads that are squeezed out by
nanoflann, which is header only.
I think it would be worth depending on this library for point locators, replacing
vtkKdTreePointLocator guts by
nanoflann, and potentially implement new locators with other indexing strategies directly available through
nanoflann. The metric used to build the index is also customizable through a functor, which could be a cool feature to add to VTK’s locators.
Any filter that does a lot of point searches would benefit from this change. For instance, the new filter
vtkOverlappingCellsDetector would benefit from it.
nanoflann works with CUDA. is thread safe, and I’ve seen an
mpi directory in the
flann git repository, without looking too much into it.