Skip to content

Commit

Permalink
COMP: Numerical computation precision limit in resampling
Browse files Browse the repository at this point in the history
Coordinate computations for nearest neighbor are computed at the limits
of numerical precision for this image during resampling.  arm64 and
x86_64 compute input continuous index coordinates as 105.39999999999999
vs 105.4 which requires a slight tolerance acceptance in the comparisons

Add --compareRadiusTolerance 1 to test validation.
  • Loading branch information
hjmjohnson committed Apr 11, 2024
1 parent 6a5b346 commit 877acba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Examples/Filtering/test/CMakeLists.txt
Expand Up @@ -565,6 +565,10 @@ itk_add_test(
ResampleImageFilter9Test
COMMAND
${ITK_TEST_DRIVER}
# Coordinate computations for nearest neighbor are computed at the limits of numerical precision for this image
# during resampling. arm64 and x86_64 compute input continuous index coordinates as 105.39999999999999 vs 105.4
# which requires a slight tolerance acceptance in the comparisons
--compareRadiusTolerance 1
--compare
DATA{${BASELINE}/ResampleImageFilter9TestPixelCentered.png,:}
${TEMP}/ResampleImageFilter9TestNearestPixelCentered.png
Expand Down

0 comments on commit 877acba

Please sign in to comment.