diff --git a/Python/34_Segmentation_Evaluation.ipynb b/Python/34_Segmentation_Evaluation.ipynb index 3eb0ac44..d410dfb2 100644 --- a/Python/34_Segmentation_Evaluation.ipynb +++ b/Python/34_Segmentation_Evaluation.ipynb @@ -490,11 +490,15 @@ " \"\"\"\n", " Compute symmetric surface distances and take the maximum.\n", " \"\"\"\n", - " # When the segmentation touches the image border we have corner case for the computation.\n", - " # The surface/contour computation yields a surface that is outside the image bounds and\n", - " # is thus not included in the computation. This is not correct for our use case. By padding\n", - " # the segmentations we ensure that we obtain the surface as expected and the distance computations\n", - " # are correct. Padding has no effect on results if the original segmentations did not touch the image\n", + " # When the segmentation reaches the image border, we have a corner case and we need to make an\n", + " # assumption with respect to the values outside the image's physical extent. We can assume\n", + " # (a) the region outside the segmentation image has the same values as inside, segmented region\n", + " # continues outside the image so no surface at the image border (b) the region outside the\n", + " # segmentation image is empty.\n", + " # The implementation of the LabelContourFilter appears to use assumption 'a' but we would like to\n", + " # use assumption 'b'. By padding the image with zeros we mimic the conditions of assumption\n", + " # 'b' which will yield a surface at the image border.\n", + " # Padding has no effect on results if the original segmentations did not touch the image\n", " # border.\n", " dim = reference_segmentation.GetDimension()\n", " reference_segmentation = sitk.ConstantPad(\n", diff --git a/tests/additional_dictionary.txt b/tests/additional_dictionary.txt index 438cc5be..28df9aed 100644 --- a/tests/additional_dictionary.txt +++ b/tests/additional_dictionary.txt @@ -160,6 +160,7 @@ Kamath LBFGS LSMImageIO LaTeX +LabelContourFilter LabelContourImageFilter LabelMapContourOverlayImageFilter LabelOverlayImageFilter