brain-slam / slam

Surface anaLysis And Modeling
MIT License
13 stars 24 forks source link

Distance to a set of points #92

Open JulienLefevreMars opened 1 year ago

JulienLefevreMars commented 1 year ago

Hello,

Contributions:

The idea is due to Maxime Dieudonné:

1) compute a distance map for each point of the set and 2) compute the min of the distance maps, for each point of the graph.

In terms of complexity, it it O( N log(N) k ) where k is the size of the set. Of course if it possible to do better (remove the k) but it would require to recode gdist or networkx. So it remains tractable for k not more than 1000 vertices in the set (it takes 12 min for a mesh with 120k vertices, about 3 to 5 times more with gdist).