InsightSoftwareConsortium / InsightSoftwareConsortium/ITK
Tolerance in image size in regression comparison
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 748
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 64
Description
### Description
Currently, the test image and its regression baseline must have the exact same size, as per:
https://github.com/InsightSoftwareConsortium/ITK/blob/e41c4583c03c45fda7334111041aabb4b74e8465/Modules/Core/TestKernel/src/itkTestDriverInclude.cxx#L508-L514
Which causes this sort of failure:
```log
The size of the Baseline image and Test image do not match!
Baseline image: C:/Dev/ITK-vs22/ExternalData/Modules/Remote/Montage/test/Input/MNML_5_500x_101/MNML_5-ITK.png has size [7447, 8346, 1, 1, 1, 1]
Test image: C:/Dev/ITK-vs22/Testing/Temporary/itkMontageGTMNML5_2_1.mha has size [7447, 8345, 1, 1, 1, 1]
```
This makes the regression test fail even if it would pass otherwise (with e.g. `--compareRadiusTolerance 1` and other tolerances).
### Expected behavior
Use `compareRadiusTolerance` for comparing image sizes (which would have backwards compatibility problems), or use a new flag for that purpose (which would not disturb existing comparisons).
### Actual behavior
There is no way to specify that image sizes could differ even a little.
Contributor guide
Assessment
This issue has not been assessed yet.