I will summarize a couple of possibilities:
As a baseline, I would begin with a Hough transform kind of approach:
Iterative Hough Transform for Line Detection in 3D Point Clouds
Christoph Dalitz, Tilman Schramke, Manuel Jeltsch
There is also an online demo as well as source code. Here is another paper of the same Hough-approach:
Hough Parameter ...
What you are asking is not possible, because you cannot order all cells in such a way that neighbors are always in a continuous range. Suppose we try to construct continuous neighbor lists in 3D. Each interior cell $C_i$ has six neighbors, so it should appear six times in a neighbor list. The only way to construct six continuous neighbor list is as follows:
You should definitely check K-D trees and octrees which are the methods of choice for point sets (while BSPs are for general objects, and grids for more or less uniform densities). They can be very compact and fast, minimizing overhead in both memory and computation, and are simple to implement.
When your points are more or less uniformly distributed (even ...
The Haversine formula is really the best way to calculate distances on the Earth unless you have outstanding accuracy concerns. The next step passed the Haversine involves taking into account that the Earth is not a sphere but ellipsoidal and which involves a much more expensive computation.
You may interpret both images as individual clustering problems: You can then calculate an a posteriori probability of beeing marked/ blood vessels.
In case both images are properly aligned, you may now calculate a distance measure between the two matrices of a posteriori probabilities. A common distance measure is the Kullback-Leibler divergence.
When the points belong to more than one curve, it will first be necessary to cluster them into curves. A possible approach is described together with a reference implementation in
Dalitz, Wilberg, Aymans: TriplClust: An Algorithm for Curve Detection in 3D Point Clouds. IPOL 2019.234 (2019)
When your points have an implicit parameter representing an ...
If your data is indexed, I'm not sure if a 3rd party algorithm would perform much faster than the ones already included in mongoDB. According to your link,
Changed in version 2.2.3: Applications can use $box without having a geospatial index. However, geospatial indexes support much faster queries than the unindexed equivalents. Before 2.2.3, a geospatial ...