Repository navigation
Description
Consolidate remote modules into hierarchical category repos
Reduce ~60 remote module repos to ~5 domain-based category repos plus ~13 independent repos. New itk_fetch_module_group() CMake function enables hierarchical sub-groups. Proof of concept (ITKRemoteAnalysis, 8 modules, 77/77 tests pass) in PR #6061. Supersedes #5134.
Problem
ITK has ~60 remote module repositories, each with its own git repo, CI, Python packaging, and boilerplate:
- ~177 lines of nearly identical config per module (~10,600 lines total duplicated boilerplate)
- CI workflow versions fragmented across 10 different ITKRemoteModuleBuildTestPackageAction tags
- A single CI infrastructure update requires 15+ coordinated PRs
- Every new filter (like SSIM in ENH: Add StructuralSimilarity Beta module (SSIM image filter) — stacked on #6085 #6034) requires creating an entirely new repository
Discussed in #6034 where @blowekamp, @dzenanz, and @hjmjohnson agreed consolidation is needed during the 6.0 beta phase.
Proposal
Group modules into 5 category repos by domain (per @thewtex and @dzenanz: no "Kitware" category, no standalone "Microscopy" — group by domain):
| Category Repo | Candidate Modules | Count |
|---|---|---|
| ITKRemoteIO | AnalyzeObjectLabelMap, IOFDF, IOMeshMZ3, IOMeshSTL, IOMeshSWC, IOScanco, IOTransformDCMTK, MGHIO, IOOpenSlide | 9 |
| ITKRemoteFiltering | AnisotropicDiffusionLBR, FastBilateral, GenericLabelInterpolator, HigherOrderAccurateGradient, LabelErodeDilate, MorphologicalContourInterpolation, MultipleImageIterator, ParabolicMorphology, PhaseSymmetry, RLEImage, SimpleITKFilters, SmoothingRecursiveYvvGaussianFilter, SplitComponents | 13 |
| ITKRemoteMesh | BSplineGradient, Cuberille, FPFH, MeshNoise, MeshToPolyData, PrincipalComponentsAnalysis, SubdivisionQuadEdgeMeshFilter | 7 |
| ITKRemoteAnalysis | BoneEnhancement, BoneMorphometry, HASI, IsotropicWavelets, PerformanceBenchmarking, RANSAC, TextureFeatures, Thickness3D, (+ StructuralSimilarity from #6034) | 8-9 |
| ITKRemoteRegistration | FixedPointInverseDisplacementField, GrowCut, LesionSizingToolkit, MinimalPathExtraction, Montage, PolarTransform, SkullStrip, Strain, TwoProjectionRegistration, VariationalRegistration | 10 |
Stay independent (large, complex, or external dependencies):
- RTK, CudaCommon (RTKConsortium)
- TubeTK (large, many examples/applications — @dzenanz)
- Ultrasound (complex multi-dependency, serves as blueprint — @dzenanz)
- WebAssemblyInterface (wasm toolchain)
- AdaptiveDenoising (ntustison — external maintainer)
- Cleaver (SCIInstitute — external dependencies, defer — @dzenanz)
- SCIFIO, Shape, TractographyTRX (external orgs)
- SphinxExamples (documentation)
- VkFFTBackend (GPU backend)
- TotalVariation, IOOMEZarrNGFF (external dependencies, defer — @dzenanz)
- BioCell (legacy, may deprecate)
CMake mechanism
New ITKGroup_Remote_<Category> sub-group options, all OFF by default:
ITKGroup_Remote = OFF # master switch (existing)
ITKGroup_Remote_IO = OFF # NEW: fetches ITKRemoteIO repo when ON
ITKGroup_Remote_Filtering = OFF
ITKGroup_Remote_Mesh = OFF
ITKGroup_Remote_Analysis = OFF
ITKGroup_Remote_Registration = OFF
- Sub-group OFF: repo not cloned, modules not available
- Sub-group ON: repo cloned, all contained modules individually toggleable via
Module_<name> ITKGroup_Remote=ON: all sub-groups enabled (backward compat)- Modules with
EXCLUDE_FROM_DEFAULTneed explicitModule_<name>=ONeven when sub-group is ON
~160 lines of CMake changes across 3 files. New itk_fetch_module_group() function. Existing itk_fetch_module() untouched (independent repos keep working).
Python packaging
Per-category wheels (itk-remote-io, itk-remote-filtering, etc.) replace individual itk-<name> packages. Old packages get a deprecation release pointing to the new category package.
New module workflow
New filters added as a subdirectory PR to the appropriate category repo. No new git repo, no new CI, no new PyPI package setup.
Example: SSIM (PR #6034) goes into ITKRemoteAnalysis as StructuralSimilarity/ subdirectory.
Implementation phases
- Phase 0: Community discussion — Discourse #7753, this issue
- Phase 1: CMake infrastructure —
itk_fetch_module_group()in WIP: Combine many remote to few remote module groups #6061 - Phase 2: Proof of concept — ITKRemoteAnalysis (8 modules, 1662 commits, 77/77 tests pass)
- Phase 3: Push to GitHub, CI validation — hjmjohnson/ITKRemoteAnalysis, CI running in WIP: Combine many remote to few remote module groups #6061
- Phase 4: Transfer to ISC org once CI green
- Phase 5: Roll out remaining categories (IO, Filtering, Mesh, Registration)
Decisions
| Question | Decision | Source |
|---|---|---|
| Category groupings | 5 domain categories (IO, Filtering, Mesh, Analysis, Registration) | @thewtex, @dzenanz |
| No — merge by domain | @thewtex, @dzenanz | |
| No — IOOpenSlide goes to IO | @dzenanz | |
| KitwareMedical modules | Merge into domain categories | @thewtex, @dzenanz |
| TubeTK | Stay independent (large, many examples) | @dzenanz |
| Ultrasound | Stay independent, serves as blueprint | @dzenanz |
| External-dep modules | Defer (TotalVariation, Cleaver, IOOMEZarrNGFF) | @dzenanz |
| EXCLUDE_FROM_DEFAULT | Respected: need explicit Module_<name>=ON |
Confirmed by prototype |
| Backward compat | ITKGroup_Remote=ON enables all sub-groups |
Confirmed by prototype |
| Supersedes | #5134 | @dzenanz |
| AdaptiveDenoising (ntustison) | TBD — discuss with maintainer | |
| PyPI: individual to category wheels | TBD | |
| BioCell | TBD — may deprecate |
References
- ENH: Add StructuralSimilarity Beta module (SSIM image filter) — stacked on #6085 #6034 — StructuralSimilarityImageFilter (triggered this discussion)
- ENH: Integrate FastBilateralImageFilter from remote module #5134 — Earlier consolidation discussion (superseded)
- WIP: Combine many remote to few remote module groups #6061 — WIP PR with
itk_fetch_module_group()and Analysis proof of concept - Discourse: https://discourse.itk.org/t/7753
- Prototype repo: https://github.com/hjmjohnson/ITKRemoteAnalysis
Activity
thewtex commentedon Apr 14, 2026
I don't think "Kitware" is a topic category and the modules should be added to the appropriate topics.
dzenanz commentedon Apr 14, 2026
This consolidation sure would make any future refactoring easier. It would also supersede #5134.
I agree with this.
dzenanz commentedon Apr 14, 2026
IOOpenSlideshould be part of IO group, not a group by itself.TubeTK is quite big, with a lot of examples and applications. I would not group it with anything else.
The main general problem with grouping is that some modules have external dependencies (e.g. TotalVariation, IOOMEZarrNGFF) which are hard to update, and require special build-related code. Maybe we should leave those alone for now?
dzenanz commentedon Apr 14, 2026
Cleaver has external dependencies. As such, I would leave it alone, at least for the initial refactoring/grouping/combining.
dzenanz commentedon Apr 14, 2026
Ultrasound is already quite a complicated module. It may serve as a blueprint for these combined thematic modules.
WIP: Add itk_fetch_module_group() and ITKRemoteAnalysis proof of concept
hjmjohnson commentedon Apr 14, 2026
Proof of concept complete
Draft PR #6061 implements the CMake infrastructure and demonstrates it with an ITKRemoteAnalysis category repo containing 8 modules. All 77 tests pass across all 8 modules, with 1661 commits and full git blame preserved.
Net result: −221 lines of CMake (106 new lines for
itk_fetch_module_group(), 395 removed from 7 individual.remote.cmakefiles).What works
itk_fetch_module_group(Analysis ...)clones a multi-module repo intoModules/Remote/Analysis/ITKModuleEnablement.cmakediscovers modules atRemote/Analysis/TextureFeatures/itk-module.cmakeITKGroup_Remote_Analysis=ONrequests all non-excluded modules;ITKGroup_Remote=ONpropagates to all sub-groupsModule_<name>=ON/OFFtoggles work within an enabled sub-groupCMake changes required
CMake/ITKModuleEnablement.cmakeCMake/ITKModuleRemote.cmakeitk_fetch_module_group()CMake/ITKGroups.cmakeModules/Remote/ITKRemoteAnalysis.remote.cmake.remote.cmakefilesDecisions confirmed by the prototype
Module_X=ONrequires sub-group enabled first (module won't be discovered otherwise)Module_<name>=ONITKGroup_Remote=ONenables all sub-groupsitk_fetch_module()untouchedITKRemoteAnalysis repo contents
commit-maps/directory with old-to-new hash mappings (1731 entries)COMPLIANCE.mdper module (extracted from.remote.cmakegrading reports)itk-consolidate-remotesskillNext steps
InsightSoftwareConsortium/ITKRemoteAnalysisrepo on GitHub, push.remote.cmakeGIT_REPOSITORY to point at GitHub URLWIP: Enable ITKRemoteAnalysis in CI for validation
WIP: Add itk_fetch_module_group() and ITKRemoteAnalysis proof of concept
WIP: Enable ITKRemoteAnalysis in CI for validation
SimonRit commentedon Apr 15, 2026
Sounds like a good initiative. I don't see where RTK would fit (and it's complicated like Ultrasound), I agree it can be kept independent.
ITKCudaCommon however is small, very similar to (and based on) GPUCommon. I personally would be in favor of integrating it to the Core of ITK, it would be useful for machine learning applications to avoid CPU <-> GPU transfers since it supports
__cuda_array_interface__. It might not be ready for this though, we're happy to do the required developments to this end.dzenanz commentedon Apr 15, 2026
While OpenCL is not dead, its further development has ceased. CUDA has outlived it. I would be fine with adding CudaCommon to the main repository, with implied expectation that you would continue being its primary maintainer.
2 remaining items
blowekamp commentedon Apr 15, 2026
On thing to consider here is the release process and updates for remote modules vs "core" or main repo modules. Having remotes modules separate allows them to be packaged and updated separately from the main ITK repo.
SimonRit commentedon Apr 15, 2026
It's a good point maybe a reason for keeping itk-cudacommon separate. I don't know how gpucommon package has been prepared?
dzenanz commentedon Apr 15, 2026
GPUCommon was last released in 2019. Maybe @thewtex knows.
thewtex commentedon Apr 15, 2026
+1 for dropping the OpenGL GPU modules in ITK 6.
It would be nice to bring the CUDA modules into the main repository, but I agree that CI and packaging are easier in a separate repository.
WIP: Add itk_fetch_module_group() and ITKRemoteAnalysis proof of concept
WIP: Enable ITKRemoteAnalysis in CI for validation
hjmjohnson commentedon Apr 16, 2026
Bringing most remote modules in-tree eliminates the structural CI overhead of maintaining 59 separate repositories. Currently a one-line infrastructure update requires 59 coordinated PRs, each triggering 13 CI jobs — the concrete impact of this is documented in #6074. In-tree modules inherit ITK's build configuration automatically: a CI update is a single commit instead of a multi-week campaign.
The remote module system should be retained for modules that genuinely can't live in-tree — proprietary dependencies (e.g., CUDA/OpenCL backends), external org ownership (RTK, Cleaver, SCIFIO), or specialized toolchains (WebAssemblyInterface). But the ~47 modules that are pure C++/Python algorithm filters with no external dependencies beyond ITK itself are paying a massive infrastructure tax for independence they don't need. The proof-of-concept ITKRemoteAnalysis (8 modules, 77/77 tests) confirms the CMake mechanism works;
Module_<name>granularity andEXCLUDE_FROM_DEFAULTare preserved so users aren't forced to build everything.The Python packaging question (@blowekamp, @SimonRit) becomes simpler in-tree: modules ship with the main
itkwheel or as opt-initk-<group>extras, no separate PyPI packages or release cycles to maintain. The 6.0 beta window is the right time.Action version fragmentation — why coordination doesn't scale
The 59 modules are currently spread across 10 different action versions:
38 modules still need the v5.4.6 bump — each requiring a separate PR, review, CI run, and merge. In-tree modules need zero coordination.
Which modules stay independent
Criteria for remaining as a remote module:
Everything else (~47 modules) is pure ITK C++/Python with no external dependencies — ideal candidates for in-tree.
CI congestion analysis and actionable fixes: #6074
hjmjohnson commentedon Apr 19, 2026
Update: the approach has been redirected per reviewer feedback on #6061.
Rather than consolidating remote modules into a separate category repo, modules are now being ingested inline into the ITK source tree under
Modules/Beta/<Name>/with their full upstream git history preserved viagit merge --allow-unrelated-histories. Upstream authors surface correctly ingit blameandgit log --follow.See #6085 for the new strategy demonstration. 10 modules ingested so far (Cuberille, Montage, FastBilateral, GrowCut, MeshToPolyData, BoneEnhancement, AnalyzeObjectLabelMap, SimpleITKFilters, LabelErodeDilate, BoneMorphometry); all tests passing pre- and post-ingest.
#6061 is closed; its discussion thread contains the reviewer feedback that motivated this pivot.
SimonRit commentedon Apr 22, 2026
I have a concern regarding the on-going work. A major limitation of the current ITK Python packages is the loading time, see e.g. https://discourse.itk.org/t/torch-import-time/6354. I know some people who are not using them for this exact reason and prefer using SimpleITK instead. So a PR like #6093 makes me think this is not going in the right direction. Won't this make the existing modules bigger and longer to load? I would prefer the use of a finer granularity in the building of the Python wheels to avoid increasing / reduce the loading time. What do you think @hjmjohnson?
dzenanz commentedon Apr 22, 2026
ITK python loads modules on demand. I don't think this will change load times, at least not significantly. It only moves where modules are residing. It will increase size of mainline module-group DLLs, but will not require additional modules.
SimonRit commentedon Apr 22, 2026
If a module depends on itk-filtering, I'm pretty sure #6093 will increase the loading time. It might be not "significant" for one module but it will become significant as the number of integrated remote modules increases. And my point is it's already too long and we should consider splitting in more packages to benefit more from the lazy loading.
dzenanz commentedon Apr 22, 2026
I don't think "filtering" is loaded all at once. @thewtex, and maybe @blowekamp might know better.
hjmjohnson commentedon Apr 28, 2026
Subsumed by the master remote-module tracking issue: #6160. Per-module disposition, ingest queue, archival follow-ups, and discoverability work all live there now.
SimonRit commentedon May 5, 2026
Just wondering: are the CI generated Python wheels available somewhere? I'm happy to do some tests to evaluate the effect of the hard work of @hjmjohnson on the import time.