ENH: Ingest ITKRANSAC into Modules/Registration/RANSAC#6275
ENH: Ingest ITKRANSAC into Modules/Registration/RANSAC#6275hjmjohnson wants to merge 92 commits into
Conversation
|
/azp run |
|
@greptileai review |
|
It looks good to me. We can add code samples from SlicerMorph project to demonstrate how to use it. |
|
Brining this to the attention of @muratmaga. |
|
Not sure what this means for alpaca. Does it mean we need to install differently? |
Brings RANSAC from a configure-time remote fetch into the ITK source tree at Modules/Registration/RANSAC/ using the v4 ingestion pipeline (whitelist filter-repo + per-commit clang-format + black + commit-prefix sanitization). Upstream repo: https://github.com/InsightSoftwareConsortium/ITKRANSAC.git Upstream tip: 0a5b2273b34ee4e94c8ff6a3bda37c6c9e0bd943 Ingest date: 2026-05-14 Whitelist: default.list Per-commit transforms applied across all 77 commits: - filter-repo --paths-from-file (whitelist) - filter-repo --to-subdirectory-filter Modules/Registration/RANSAC - 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: 22 -> 11 merge(s). Primary author: Pranjal Sahu <pranjalsahu5@gmail.com> Co-authored-by: Matt McCormick <matt.mccormick@kitware.com> Co-authored-by: Pranjal Sahu <pranjal.sahu@kitware.com> Co-authored-by: root <root@insight-journal.org>
Remove the Modules/Remote/RANSAC.remote.cmake stub now that the upstream history has been ingested into Modules/Registration/RANSAC, and enable -DModule_RANSAC:BOOL=ON in the pixi configure-ci task.
AgreeMultiple was comparing nanoflann squared distance against linear delta threshold, yielding sqrt(3)x tighter inlier set than Agree(). mat_adaptor was a raw owning pointer never deleted; convert to std::unique_ptr so SetAgreeData can be safely re-invoked.
SetGlobalDefaultNumberOfThreads mutated process-wide ITK state; use threader->SetNumberOfWorkUnits() instead. rand()/srand() share global C library state and produce data races when numberOfThreads > 1; replace with per-thread std::mt19937.
The shuffled indexArray was built but the subsequent loop ignored it and iterated by sequential index; remove the dead code.
The if(NOT ITK_SOURCE_DIR) branch (find_package(ITK) + include(ITKModuleExternal)) only executes when building the module standalone outside ITK. In-tree builds always take the itk_module_impl() else branch. Drop the dead branch following the cleanup pattern from InsightSoftwareConsortium#6272/InsightSoftwareConsortium#6279.
Replace 4 baselines under test/Baseline and 4 baselines under
wrapping/test/Baseline with ExternalData .sha512 content-links.
The wrapping/ copies are byte-identical to the test/ copies
(same sha512), so only 4 unique blobs need upload to
data.kitware.com.
Modules/Registration/RANSAC/test/Baseline/fixedFeatureMesh.vtk
sha512: 4ce07d9364490b6b4b194f8596551f757138b86a209f9f89fb40fe2d6ed3381408c59448aceea3afcf8202c2951de465e51af3ed6e14a7e15299ae5767f570c2
status: needs_upload
Modules/Registration/RANSAC/test/Baseline/fixedMesh.vtk
sha512: e9c26e932c9172c8777816c0be1a56043bd9bd752f30f3641783b98bfb6663bdcf08d1e119973fe2241c6a320dc52b0595b11cdd12b87ebfcc03511b2a77cac7
status: needs_upload
Modules/Registration/RANSAC/test/Baseline/movingFeatureMesh.vtk
sha512: f403cb283bb780d8c527bc630c31fe6cd3db52d2d18211f6ca56a28e005b921263863600fd9b1bd10cbe414c4abe01ec886baf9d1c8d5e1311f64cf6d1ee5da2
status: needs_upload
Modules/Registration/RANSAC/test/Baseline/movingMesh.vtk
sha512: 0ac2e44b04f867111c54dc16c55f1dcf5f350d6cd28f276a80091de49013340a8544ab962339718779e4f623fb60a2c0700916acd75b3f5259231bdd9245e6e1
status: needs_upload
Modules/Registration/RANSAC/wrapping/test/Baseline/fixedFeatureMesh.vtk
sha512: 4ce07d9364490b6b4b194f8596551f757138b86a209f9f89fb40fe2d6ed3381408c59448aceea3afcf8202c2951de465e51af3ed6e14a7e15299ae5767f570c2
status: needs_upload
Modules/Registration/RANSAC/wrapping/test/Baseline/fixedMesh.vtk
sha512: e9c26e932c9172c8777816c0be1a56043bd9bd752f30f3641783b98bfb6663bdcf08d1e119973fe2241c6a320dc52b0595b11cdd12b87ebfcc03511b2a77cac7
status: needs_upload
Modules/Registration/RANSAC/wrapping/test/Baseline/movingFeatureMesh.vtk
sha512: f403cb283bb780d8c527bc630c31fe6cd3db52d2d18211f6ca56a28e005b921263863600fd9b1bd10cbe414c4abe01ec886baf9d1c8d5e1311f64cf6d1ee5da2
status: needs_upload
Modules/Registration/RANSAC/wrapping/test/Baseline/movingMesh.vtk
sha512: 0ac2e44b04f867111c54dc16c55f1dcf5f350d6cd28f276a80091de49013340a8544ab962339718779e4f623fb60a2c0700916acd75b3f5259231bdd9245e6e1
status: needs_upload
…InsightSoftwareConsortium#56) Convert 8 .sha512 content-links to .cid form now that the blobs are staged on the ITKTestingData gh-pages mirror via PR InsightSoftwareConsortium#56. Covers Modules/Registration/RANSAC/{test,wrapping/test}/Baseline/*.vtk.
The ingested module registered as `Ransac` via itk_module(Ransac ...), yielding a `Module_Ransac` CMake cache variable. The upstream remote module and existing downstream build scripts use `RANSAC`/`Module_RANSAC`. On case-sensitive systems `-DModule_RANSAC:BOOL=ON` then silently had no effect. Canonicalize the module identifier (itk_module, project, createtestdriver, itk_wrap_module, Doxygen \ingroup) to RANSAC.
Both members were left uninitialized. When every hypothesis produces zero inliers, the thread callback reads bestRMSE in `rmse_value < caller->bestRMSE` and maxIteration in its early-exit check before either is assigned — undefined behavior. Initialize both at declaration (max sentinels: any real RMSE replaces it; no iteration cap by default).
If you built against ITK with a remote module, it shouldn't change anything for the alpaca build. |
|
They install directly using released pip packages. |
|
Once we finish the ingestion, we will need to decide how to group the new modules into python packages. And it might change from |
We should also look into what it would take to make a directory an independent wrapping and python package. Another factor to consider would be the size of a composite package vs the separate packages. The composite group package may only be marginally bigger than an individual module package. |
Ingest the ITKRANSAC remote module into
Modules/Registration/RANSAC(group: Registration). Source upstream:InsightSoftwareConsortium/ITKRANSAC. Tracking issue: #6160.Ingest stats
Utilities/Maintenance/RemoteModuleIngest/INGESTION_STRATEGY.md)Modules/Registration/RANSAC/: 25c9759665ac99f8a7b8fb52e787d580f63013155fExternal-data fixtures
CID / .sha512 content-links present in this ingest:
(none -- module has no external-data fixtures)
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)