From 877acbac082d5d8132e3d66f13732914b6408ef7 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Wed, 10 Apr 2024 15:46:42 -0500 Subject: [PATCH] COMP: Numerical computation precision limit in resampling 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. --- Examples/Filtering/test/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Examples/Filtering/test/CMakeLists.txt b/Examples/Filtering/test/CMakeLists.txt index 771c18fb180..2d09db0f6a6 100644 --- a/Examples/Filtering/test/CMakeLists.txt +++ b/Examples/Filtering/test/CMakeLists.txt @@ -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