Skip to content

Commit 811be4d

Browse files
committed
Improve documentation of surface_hausdorff_distance.
1 parent 0cb6436 commit 811be4d

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Python/34_Segmentation_Evaluation.ipynb

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -490,11 +490,15 @@
490490
" \"\"\"\n",
491491
" Compute symmetric surface distances and take the maximum.\n",
492492
" \"\"\"\n",
493-
" # When the segmentation touches the image border we have corner case for the computation.\n",
494-
" # The surface/contour computation yields a surface that is outside the image bounds and\n",
495-
" # is thus not included in the computation. This is not correct for our use case. By padding\n",
496-
" # the segmentations we ensure that we obtain the surface as expected and the distance computations\n",
497-
" # are correct. Padding has no effect on results if the original segmentations did not touch the image\n",
493+
" # When the segmentation reaches the image border, we have a corner case and we need to make an\n",
494+
" # assumption with respect to the values outside the image's physical extent. We can assume\n",
495+
" # (a) the region outside the segmentation image has the same values as inside, segmented region\n",
496+
" # continues outside the image so no surface at the image border (b) the region outside the\n",
497+
" # segmentation image is empty.\n",
498+
" # The implementation of the LabelContourFilter appears to use assumption 'a' but we would like to\n",
499+
" # use assumption 'b'. By padding the image with zeros we mimic the conditions of assumption\n",
500+
" # 'b' which will yield a surface at the image border.\n",
501+
" # Padding has no effect on results if the original segmentations did not touch the image\n",
498502
" # border.\n",
499503
" dim = reference_segmentation.GetDimension()\n",
500504
" reference_segmentation = sitk.ConstantPad(\n",

tests/additional_dictionary.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ Kamath
160160
LBFGS
161161
LSMImageIO
162162
LaTeX
163+
LabelContourFilter
163164
LabelContourImageFilter
164165
LabelMapContourOverlayImageFilter
165166
LabelOverlayImageFilter

0 commit comments

Comments
 (0)