Skip to content

ENH: Re-enable 11 VariationalRegistration tests with ITK-proper baselines - #6453

Merged
hjmjohnson merged 2 commits into
InsightSoftwareConsortium:mainfrom
hjmjohnson:reenabled-variational-registration-tests
Jun 17, 2026
Merged

hjmjohnson merged 2 commits into
InsightSoftwareConsortium:mainfrom
hjmjohnson:reenabled-variational-registration-tests

Conversation

@hjmjohnson

@hjmjohnson hjmjohnson commented Jun 16, 2026 •

Copy link
Copy Markdown
Member

Re-enable 11 VariationalRegistration tests that were disabled at module
ingest time because the upstream baselines were incompatible with the
ITK-proper build environment. New baselines regenerated from ITK-proper
executables; all 11 verified locally and green on every CI platform
(7 2D + 4 3D).

Resolves #6305

What changed
  • test/CMakeLists.txt: uncommented 11 test calls; added cross-platform
    comparison tolerances (radius=2, intensity=20, npixels=200 differing pixels)
  • test/Baseline/*.cid (13 files): updated to CIDs of ITK-proper-generated baselines
  • Testing/Data/content-links.manifest: 13 new CID entries
  • pyproject.toml: added --output-on-failure to the ctest CI task

Baselines published to
ITKTestingData
and served via the GitHub Pages mirror gateway.

Tests still disabled (and why)

Two of the 13 regenerated baselines are intentionally pre-staged — their
.cid files and manifest entries are committed, but their test3d(...) calls
remain commented out so the data is ready to enable the moment the underlying
issue is resolved:

Separately, these remain disabled for unrelated reasons (no baseline change here):

  • VariationalRegistrationElastic2DTest, VariationalRegistrationElastic3DTest,
    VariationalRegistrationCurvature2DTest — require FFT support.
  • VariationalRegistrationCurvature3DTest — orphaned upstream baseline.

@github-actions github-actions Bot added type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Enhancement Improvement of existing methods or implementation type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct area:Registration Issues affecting the Registration module labels Jun 16, 2026
Comment thread Testing/Data/content-links.manifest Resolved
@hjmjohnson
hjmjohnson force-pushed the reenabled-variational-registration-tests branch 2 times, most recently from aa77d97 to 778280a Compare June 16, 2026 19:25
…ines

The 13 registration tests were disabled in the module ingest because the
upstream baselines were incompatible with ITK-proper's build environment.
Regenerated all baselines from ITK-proper executables with cross-platform
tolerances (radius=2, intensity=20, 200 differing pixels allowed).

All 13 tests verified locally (7 2D + 6 3D, 100% pass rate).

Resolves: InsightSoftwareConsortium#6305

Co-Authored-By: Jan Ehrhardt <[email protected]>
@hjmjohnson
hjmjohnson force-pushed the reenabled-variational-registration-tests branch from 778280a to 8eb8786 Compare June 16, 2026 19:29
@hjmjohnson

Copy link
Copy Markdown
Member Author

Force-pushed to disable VariationalRegistrationGaussian3DTest and VariationalRegistrationNCC3DTest on the macOS Pixi-Cxx runner.

Both tests passed on Ubuntu x86_64 (where the baselines were generated), ARMBUILD-Ubuntu-24.04-arm, and ARMBUILD-x86_64-rosetta, but failed on the native macOS ARM64 runner — Gaussian3D in 1.35 s and NCC3D in 3.99 s, indicating the comparison failed immediately after registration.

The remaining 12 image-comparison tests (8 × 2D, 4 × 3D) are now green across all platforms.

Without it, a failing test's stdout is hidden in the CI log, so image
regression failures show only Pass/Fail with no pixel-difference detail
(e.g. the macOS-only VariationalRegistration 3D comparison failures).
Surfacing per-test output makes CI failures diagnosable from the log.
@hjmjohnson
hjmjohnson marked this pull request as ready for review June 16, 2026 22:55
@greptile-apps

greptile-apps Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR re-enables 11 VariationalRegistration tests (7 2D + 4 3D) that were previously commented out due to upstream-incompatible baselines, replacing the old CIDs with new ones regenerated from ITK-proper executables. Cross-platform comparison tolerances (radius=2, intensity=20, npixels=200) were already in place from a prior commit and are retained unchanged.

  • 13 .cid baseline files are updated; 11 correspond to tests actually re-enabled in CMakeLists.txt, while 2 (Gaussian3DTest, NCC3DTest) are pre-staged but remain disabled due to macOS ARM64 divergence.
  • The PR title and description claim "13 tests re-enabled (7 2D + 6 3D)" but the actual CMakeLists enables 11; Gaussian3D and NCC3D are still commented out, and their manifest entries are effectively dead data.
  • pyproject.toml gains --output-on-failure on the ctest CI task, improving failure diagnostics.

Confidence Score: 4/5

Safe to merge — the 11 actually re-enabled tests have matching CIDs in both the .cid files and the manifest, and tolerances were already established.

The functional change (re-enabling 11 tests with new baselines and adding --output-on-failure) is straightforward and internally consistent. The only concerns are the PR title overcounting the re-enabled tests and two manifest entries for Gaussian3D/NCC3D that will never be fetched because those tests remain disabled.

CMakeLists.txt and content-links.manifest — the test count claimed in the PR title (13) does not match what is enabled in the file (11), and those two files together introduce dead entries for Gaussian3D and NCC3D baselines.

Important Files Changed

Filename Overview
Modules/Registration/VariationalRegistration/test/CMakeLists.txt Uncomments 11 tests (7 2D + 4 3D); Gaussian3D and NCC3D remain disabled; tolerance variables shortened; PR title claims 13 re-enabled but only 11 are
Testing/Data/content-links.manifest Adds 13 CID-to-path entries, 2 of which (Gaussian3D, NCC3D) correspond to still-disabled tests and will never be fetched
pyproject.toml Adds --output-on-failure to the ctest CI command, improving failure diagnostics with no functional change
Modules/Registration/VariationalRegistration/test/Baseline/VariationalRegistrationGaussian3DTest.nii.gz.cid Updated CID but test3d(VariationalRegistrationGaussian3DTest) remains commented out; baseline is pre-staged but unreachable
Modules/Registration/VariationalRegistration/test/Baseline/VariationalRegistrationNCC3DTest.nii.gz.cid Updated CID but test3d(VariationalRegistrationNCC3DTest) remains commented out; baseline is pre-staged but unreachable

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[VariationalRegistration Tests] --> B[2D Tests]
    A --> C[3D Tests]
    B --> B1["✅ Gaussian2D (re-enabled)"]
    B --> B2["✅ Diffusive2D (re-enabled)"]
    B --> B3["✅ PassiveDemons2D (re-enabled)"]
    B --> B4["✅ SymmetricDemons2D (re-enabled)"]
    B --> B5["✅ SSD2D (re-enabled)"]
    B --> B6["✅ NCC2D (re-enabled)"]
    B --> B7["✅ Diffeomorph2D (was already enabled)"]
    B --> B8["✅ SymDiff2D (re-enabled)"]
    B --> B9["⚠️ Elastic2D (FFT required)"]
    B --> B10["⚠️ Curvature2D (FFT required)"]
    C --> C1["✅ Diffusive3D (re-enabled)"]
    C --> C2["✅ SSD3D (re-enabled)"]
    C --> C3["✅ Diffeomorph3D (re-enabled)"]
    C --> C4["✅ SymDiff3D (re-enabled)"]
    C --> C5["❌ Gaussian3D (still disabled – ARM64 divergence)"]
    C --> C6["❌ NCC3D (still disabled – ARM64 divergence)"]
    C --> C7["⚠️ Elastic3D (FFT required)"]
    C --> C8["❌ Curvature3D (orphaned baseline)"]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[VariationalRegistration Tests] --> B[2D Tests]
    A --> C[3D Tests]
    B --> B1["✅ Gaussian2D (re-enabled)"]
    B --> B2["✅ Diffusive2D (re-enabled)"]
    B --> B3["✅ PassiveDemons2D (re-enabled)"]
    B --> B4["✅ SymmetricDemons2D (re-enabled)"]
    B --> B5["✅ SSD2D (re-enabled)"]
    B --> B6["✅ NCC2D (re-enabled)"]
    B --> B7["✅ Diffeomorph2D (was already enabled)"]
    B --> B8["✅ SymDiff2D (re-enabled)"]
    B --> B9["⚠️ Elastic2D (FFT required)"]
    B --> B10["⚠️ Curvature2D (FFT required)"]
    C --> C1["✅ Diffusive3D (re-enabled)"]
    C --> C2["✅ SSD3D (re-enabled)"]
    C --> C3["✅ Diffeomorph3D (re-enabled)"]
    C --> C4["✅ SymDiff3D (re-enabled)"]
    C --> C5["❌ Gaussian3D (still disabled – ARM64 divergence)"]
    C --> C6["❌ NCC3D (still disabled – ARM64 divergence)"]
    C --> C7["⚠️ Elastic3D (FFT required)"]
    C --> C8["❌ Curvature3D (orphaned baseline)"]
Loading

Reviews (1): Last reviewed commit: "COMP: Always use ctest --output-on-failu..." | Re-trigger Greptile

Comment thread Testing/Data/content-links.manifest Resolved
@hjmjohnson hjmjohnson changed the title ENH: Re-enable 13 VariationalRegistration tests with ITK-proper baselines ENH: Re-enable 11 VariationalRegistration tests with ITK-proper baselines Jun 17, 2026
@hjmjohnson
hjmjohnson merged commit a0c7720 into InsightSoftwareConsortium:main Jun 17, 2026
26 of 27 checks passed
hjmjohnson added a commit that referenced this pull request Jun 17, 2026
These two 3D tests were left disabled in #6453 because their outputs
diverge from the x86_64 baselines on native macOS ARM64. Measured on
Apple silicon, ~0.08% of the 368480-voxel volume differs (308 voxels
for Gaussian3D, 322 for NCC3D) after the radius-2/intensity-20 search;
x86_64 remains bit-exact.

Add an optional per-test VariationalRegistration<Name>Test_NPIXELS_TOL
override to Test3D and set it to 400 for these two tests, so the
shared x86_64 baseline serves both platforms while the other 11 tests
keep the tight global tolerance of 200.

Closes #6459.
@hjmjohnson
hjmjohnson deleted the reenabled-variational-registration-tests branch August 22, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Registration Issues affecting the Registration module type:Enhancement Improvement of existing methods or implementation type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VariationalRegistration: inherited baselines incompatible with ITK-proper (13 tests disabled pending cross-platform review)

2 participants