ENH: Ingest ITKVariationalRegistration into Modules/Registration/VariationalRegistration#6276
Merged
dzenanz merged 180 commits intoMay 20, 2026
Conversation
Updated CMakeLists.txt for tests and newer ITK style. Added input images and Baseline images for the tests.
…pacing in VariationalRegistrationNCCFunction and VariationalRegistrationSSDFunction. Remove option to return unscaled time step.
…ages of the 2D tests. Dont use image spacing for Gaussian regularization (unintended results).
Conflicts: src/VariationalRegistrationMain.cxx
Gaussian and Consider image spacing as default
Member
Author
|
/azp run |
2 similar comments
Member
Author
|
/azp run |
Member
Author
|
/azp run |
Member
Author
|
@greptileai review |
Member
|
Addressed the remaining greptile findings:
These files are only compiled on WIN32+MSVC as a compatibility shim. |
Brings VariationalRegistration from a configure-time remote fetch into the ITK source tree at Modules/Registration/VariationalRegistration/ using the v4 ingestion pipeline (whitelist filter-repo + per-commit clang-format + black + commit-prefix sanitization). Upstream repo: https://github.com/InsightSoftwareConsortium/ITKVariationalRegistration.git Upstream tip: 1941db6bec69fe9332fe6cbec8b0256941facaa9 Ingest date: 2026-05-14 Whitelist: default.list Per-commit transforms applied across all 168 commits: - filter-repo --paths-from-file (whitelist) - filter-repo --to-subdirectory-filter Modules/Registration/VariationalRegistration - clang-format -style=file (ITK main's .clang-format) for *.cxx/.h/.hxx/... - black for *.py - heuristic ITK prefix added to commit subjects without one Merge topology preserved: 35 -> 27 merge(s). Primary author: aschmiri <a.schmidtrichberg@gmail.com> Co-authored-by: Alexander Schmidt-Richberg <a.schmidtrichberg@gmail.com> Co-authored-by: aschmiri <a.schmidt-richberg@imperial.ac.uk> Co-authored-by: aschmiri <alexander.schmidt-richberg@philips.com> Co-authored-by: bvadmin <bvadmin@elmo.imi.uni-luebeck.de> Co-authored-by: bvadmin <bvadmin@ErnieLinux.(none)> Co-authored-by: Dženan Zukić <dzenan.zukic@kitware.com> Co-authored-by: ehrhardt <ehrhardt@imi.uni-luebeck.de> Co-authored-by: Francois Budin <francois.budin@gmail.com> Co-authored-by: Hans J. Johnson <hans-johnson@uiowa.edu> Co-authored-by: Hans Johnson <hans-johnson@uiowa.edu> Co-authored-by: Jan <jan@ErnieLinux.(none)> Co-authored-by: Jan Ehrhardt <ehrhardt@imi.uni-luebeck.de> Co-authored-by: Jon Haitz Legarreta <jhlegarreta@vicomtech.org> Co-authored-by: Jon Haitz Legarreta Gorroño <jon.haitz.legarreta@gmail.com> Co-authored-by: Mathew Seng <mathewseng@gmail.com> Co-authored-by: Matt McCormick <matt.mccormick@kitware.com> Co-authored-by: Matt McCormick <matt@mmmccormick.com> Co-authored-by: Rene Werner <r.werner@uke.de> Co-authored-by: Tom Birdsong <tom.birdsong@kitware.com> Co-authored-by: Zach Williamson <zachary-williamson@uiowa.edu>
Remove the configure-time fetch stub in Modules/Remote/ now that the sources live at Modules/Registration/VariationalRegistration/, enable Module_VariationalRegistration in the configure-ci pixi task, and absorb a residual clang-format fixup in the K&R-style win32 getopt.c that pre-commit caught after the ingest merge.
The wrap files referenced itk::VariationalDiffeomophicRegistrationFilter (missing 'r') which would fail Python wrapping compilation. Rename files and class reference to match the actual C++ class name VariationalDiffeomorphicRegistrationFilter.
The function was defined in a header without inline, which would trigger a multiple-definition linker error if the header is ever included in more than one translation unit.
Replace directory-scoped include_directories with target-scoped target_include_directories, add the missing module include/ path so the example executable finds module headers, and replace the deprecated COMPILE_FLAGS target property with target_compile_definitions for USE_2D_IMPL.
The ten ITKIO* modules are required only by the standalone example executable's RegisterRequiredFactories(), not by the header-only library. Moving them to PRIVATE_DEPENDS prevents every downstream consumer from being forced to link all ten IO backends transitively.
The IPFS CIDs for VariationalRegistrationElastic2DTest.tif and VariationalRegistrationCurvature2DTest.tif (bafkrei...la and bafkrei...s4) are not retrievable through any IPFS gateway (dweb.link, ipfs.io, w3s.link all return 504) and the Populate ExternalData cache job rejects partial caches. Replace the .cid content links with .sha512 content links matching the upstream ITKVariationalRegistration test baselines; the blobs are present on data.kitware.com and resolve through ITK's existing sha512 ExternalData URL template.
The example executables (VariationalRegistration and
VariationalRegistration2D) previously linked against
${VariationalRegistration_LIBRARIES}, which is never populated
because the module exposes no compiled library sources of its own.
This caused undefined references to itk::DataObjectError and
itk::InvalidRequestedRegionError at link time on macOS / Linux /
Windows Pixi-Cxx builds.
Enumerate the module DEPENDS / PRIVATE_DEPENDS targets directly so
the example resolves itk::Exception and image IO symbols
deterministically from inside the ITK source tree.
- itk-module.cmake: replace placeholder DESCRIPTION with substantive one-liner describing the demons / diffeomorphic / curvature-based variational registration filters with multi-resolution support. - src/CMakeLists.txt: use CMAKE_CURRENT_LIST_DIR instead of CMAKE_CURRENT_SOURCE_DIR for example-executable target_include_directories (and the WIN32 win32_compatibility branch). CMAKE_CURRENT_LIST_DIR is the directory of the currently-processed CMakeLists file, which is the more robust idiom inside an included subdirectory.
…ink list ITKImageFilterBase, ITKFiniteDifference, ITKDisplacementField, ITKRegistrationCommon, and ITKBinaryMathematicalMorphology are header-only ITK modules (no src/ directory, no compiled library). Passing them to target_link_libraries caused CMake to emit bare `-lITKImageFilterBase` etc. on the link line, which the linker could not resolve: ld: library not found for -lITKImageFilterBase The headers from these modules remain available via the module DEPENDS include-path propagation, so dropping them from the example link list is sufficient to fix macOS / Linux Pixi-Cxx builds without losing any compile-time access.
Test2D appended a bare "-O ${OutParam}" even when OutputExt was empty,
so OutParam was unset and the test driver invoked the CLI with a
trailing "-O" and no value. getopt ("O:" requires an argument) aborted
the CLI before any output was written, so --compare then failed with
"Could not create IO object". Build the optional -O <file> pair only
when an output extension is given.
13 CLI registration tests compare against baselines inherited from the archived remote module that do not match ITK-proper's deterministic output, and whose source is unrecoverable. The deltas are not bit-portable across platforms, so neither baseline regeneration from a single platform nor a blanket tolerance is safe. Disable them pending a cross-platform baseline review tracked in InsightSoftwareConsortium#6305 (parity with the already-disabled Curvature3D). Diffeomorph2D and the driver/print-help tests remain enabled.
2f9f6e1 to
b1780a3
Compare
…egistration # Conflicts: # pyproject.toml
dzenanz
approved these changes
May 20, 2026
00e9d12
into
InsightSoftwareConsortium:main
19 of 20 checks passed
Member
|
After merging: |
hjmjohnson
added a commit
to InsightSoftwareConsortium/ITKVariationalRegistration
that referenced
this pull request
May 27, 2026
…s repo The VariationalRegistration module has been ingested into ITK main under Modules/Registration/VariationalRegistration via InsightSoftwareConsortium/ITK#6276. Delete the whitelisted module sources, preserve the original README, and promote the migration notice to README.md so the GitHub landing page reflects archived status.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ingest the ITKVariationalRegistration remote module into
Modules/Registration/VariationalRegistration(group: Registration). Source upstream:InsightSoftwareConsortium/ITKVariationalRegistration. Tracking issue: #6160.Ingest stats
Utilities/Maintenance/RemoteModuleIngest/INGESTION_STRATEGY.md)Modules/Registration/VariationalRegistration/: 824f2adde59d738dd57f6ea32b9ee3eef9a40b31f5External-data fixtures
CID / .sha512 content-links present in this ingest:
If any fixtures resolve via ITKTestingData, that repo must contain the matching content-link before this PR can merge cleanly.
Follow-on commits (on top of the unrelated-histories merge)