ANTsX / ANTsR

R interface to the ANTs biomedical image processing library
https://antsx.github.io/ANTsR
Apache License 2.0
127 stars 35 forks source link

Hausdorff distance in ANTsR/ANTsPy? #348

Closed ntustison closed 3 years ago

ntustison commented 3 years ago

Hey @stnava ,

Based on our WMH work, I'd like to put the Hausdorff distance functionality from ITK in ANTsR/ANTsPy. First, I didn't find it but I wanted to make sure it wasn't already implemented somewhere. Second, any issues with its inclusion? Thanks.

stnava commented 3 years ago

That would be great, in the past i just used distance transform to calculate it but quick/easy is better

On Mon, Apr 5, 2021 at 1:47 PM Nick Tustison @.***> wrote:

Hey @stnava https://github.com/stnava ,

Based on our WMH work, I'd like to put the Hausdorff distance functionality from ITK in ANTsR/ANTsPy. First, I didn't find it but I wanted to make sure it wasn't already implemented somewhere. Second, any issues with its inclusion? Thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ANTsX/ANTsR/issues/348, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACPE7VCJGDD7CPTIUK4CJTTHHZU3ANCNFSM42NF3H7Q .

--

brian

ntustison commented 3 years ago

Okay, great. Will start working on it.

dorianps commented 3 years ago

There is a function I included in LESYMAP which computes mask distances (average symmetric distance, Hausdorff, etc.).

https://github.com/dorianps/LESYMAP/blob/cd13aa0cfaa3fab582cd2099be07c45339220e1f/R/minSegDistance.R

I think I checked that "max" output is exactly corresponding with Hausdorff produced by other tools. You can use that code or copy/rename the entire function if you like.

dorianps commented 3 years ago

Errata: no average symmetric distance in that function, just one way distance of one mask (predicted) from the other (manual).

ntustison commented 3 years ago

Thanks for the heads up @dorianps . I think, though, that I'll stick with the ITK implementation.