seung-lab / euclidean-distance-transform-3d

Euclidean distance & signed distance transform for multi-label 3D anisotropic images using marching parabolas.
GNU General Public License v3.0
239 stars 37 forks source link

feat(sdf): adds signed distance function #44

Closed william-silversmith closed 2 years ago

william-silversmith commented 2 years ago

Resolves #43

Found that doing the more complex version (version 2) was about 1 second faster but almost 2x the RAM, so not really worth the complexity.

It should be possible to do the SDF in one pass in C++ with small modifications to the core algorithm.

Also fixes bug in multi-segment logic that treated zeros incorrectly.