Hi, Sorry to join in late in the discussion (new in this discourse),
I’ve been using VTK for quite a long time and recently i’ve been using Nanoflann “heavily”.
Nanoflann should be quite easy to integrate since it’s a single “.hpp” file using common STD includes.
Also, for specific application (e.g. 2D / 3D points) the speed can be further improved,
using some templated L2_distance function (to remove the “for loop”).
And could be further improved with continuous array, enabling SSE-AVX instructions.
This is what I did in my branch (however this project is more to generalize kdtree Lpq distances) :
I would be happy to help / discuss !