InsightSoftwareConsortium / InsightSoftwareConsortium/ITK

Tolerance in image size in regression comparison

Open
#4,613 5 comments 0 reactions 0 assignees View on GitHub
type:Enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.