[fixed]Is hausdorff distance implement in SimpleITK aware of spacing?

I check https://itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1HausdorffDistanceImageFilter.html, but still confused.

  1. Is hausdorff distance implement in SimpleITK aware of spacing?
  2. Does the HausdorffDistanceImageFilter assumes that args images are binary? 0 for background, 1 for foreground?
1 Like

Hello hubutui!

  • Yes, the filter is aware of image spacing. You can assume all SimpleITK or ITK algorithm are aware of Image spacing.
  • The recommended common convention for SimpleITK is to represent masks with 0s for the background and 1s for the foreground. For this filter technically any non-zero value is foreground.

There’s a Jupyter notebook using the Hausdorff Distance for segmentations evaluation here:
http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/Python_html/34_Segmentation_Evaluation.html

Enjoy!