seung-lab / dijkstra3d

Dijkstra's Shortest Path for 6, 18, and 26-Connected 3D (Volumetric) Image Volumes
GNU General Public License v3.0
71 stars 13 forks source link

feat: gradient distance metric #35

Open william-silversmith opened 2 years ago

william-silversmith commented 2 years ago

Experimenting with a hill climbing distance metric as requested in https://github.com/seung-lab/dijkstra3d/issues/26

Thanks for the inspiration in https://github.com/ReubenDo/dijkstra3d/blob/master/dijkstra3d.hpp

dijkstra3d.dijkstra(
  data, source, target, 
  metric="gradient", 
  metric_args=[1.0, 1.0], # equal weight to euclidean distance and field intensity
  anisotropy=(1,1,1) 
)