Skip to content

Commit 38d8f42

Browse files
committed
COMP: Tolerate one intensity level in six baseline comparisons
The pip itk 5.4.6 wheels and ITK main round differently at quantization boundaries, leaving pixels one gray-level apart (plus sub-integer FFT float noise) between Python and C++ example outputs compared against shared baselines.
1 parent cc33939 commit 38d8f42

4 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/Core/Transform/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ compare_to_baseline(EXAMPLE_NAME GlobalRegistrationTwoImagesBSpline
4343
add_example(DeformAVolumeWithAThinPlateSpline)
4444
compare_to_baseline(EXAMPLE_NAME DeformAVolumeWithAThinPlateSpline
4545
BASELINE_PREFIX DeformedImageBaseline
46+
OPTIONS --tolerance-intensity 1
4647
)

src/Filtering/FFT/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ compare_to_baseline(
44
EXAMPLE_NAME ComputeFFTInOneDimension
55
TEST_NAME ComputeFFTInOneDimensionModulusBaselineComparison
66
BASELINE_PREFIX MouseLiver1DFFTModulusOutputBaseline
7+
OPTIONS --tolerance-intensity 1
78
)
89
compare_to_baseline(
910
PYTHON_ONLY
1011
EXAMPLE_NAME ComputeFFTInOneDimension
1112
TEST_NAME ComputeFFTInOneDimensionPhaseBaselineComparison
1213
BASELINE_PREFIX MouseLiver1DFFTPhaseOutputBaseline
14+
OPTIONS --tolerance-intensity 1
1315
)
1416

1517
compare_to_baseline(
@@ -53,4 +55,5 @@ compare_to_baseline(
5355
add_example(ComputeInverseFFTOfImage)
5456
compare_to_baseline(EXAMPLE_NAME ComputeInverseFFTOfImage
5557
BASELINE_PREFIX ComputeInverseFFTOfImage
58+
OPTIONS --tolerance-intensity 1
5659
)

src/Filtering/ImageGrid/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ add_example(ResampleAnImage)
3636
compare_to_baseline(
3737
EXAMPLE_NAME ResampleAnImage
3838
BASELINE_PREFIX OutputBaseline
39+
OPTIONS --tolerance-intensity 1
3940
)
4041

4142
add_example(UpsampleAnImage)

src/Filtering/ImageIntensity/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ add_example(ApplyAtanImageFilter)
1111
compare_to_baseline(EXAMPLE_NAME ApplyAtanImageFilter BASELINE_PREFIX OutputBaseline)
1212

1313
add_example(ConvertRGBImageToGrayscaleImage)
14-
compare_to_baseline(EXAMPLE_NAME ConvertRGBImageToGrayscaleImage BASELINE_PREFIX OutputBaseline)
14+
compare_to_baseline(EXAMPLE_NAME ConvertRGBImageToGrayscaleImage BASELINE_PREFIX OutputBaseline
15+
OPTIONS --tolerance-intensity 1)
1516

1617
add_example(MultiplyImageByScalar)
1718
compare_to_baseline(EXAMPLE_NAME MultiplyImageByScalar BASELINE_PREFIX OutputBaseline)

0 commit comments

Comments
 (0)