ENH: Ingest ITKMorphologicalContourInterpolation (stacked on #6208)#6209
ENH: Ingest ITKMorphologicalContourInterpolation (stacked on #6208)#6209hjmjohnson wants to merge 222 commits intoInsightSoftwareConsortium:mainfrom
Conversation
Issue #1.
ENH: Add module skeleton.
ENH: adding test data
ENH: adding the rest of test data from Paul
Started implementation
…ement the 3 cases, implement alignment
Bumping Python version number in the process.
This includes enabling shared libraries in itk-module.cmake and addressing CMake policy CMP0135 and its associated warning.
Build javascript, typescript, cli, packages, documentation via ITK-Wasm. A few tests added for the CLI, javascript, typescript to ensure they run. Other testing is left to the module. CI for build/test of everything and build / deploy of the documentation to GitHub Pages.
ENH: Add wasm configuration
Remove unused variable and commented code block: getting the largest
possible region of the superclass (`ImageToImageFilter`) is most likely
being exercised in ITK proper.
Fixes:
```
test/itkMorphologicalContourInterpolationTest.cxx:37:34:
warning: unused variable 'reg' [-Wunused-variable]
37 | typename ImageType::RegionType reg = test->GetLargestPossibleRegion();
| ^~~
```
raised for example in:
https://open.cdash.org/viewBuildError.php?type=1&buildid=10154304
When preparing for the future with ITK by setting ITK_FUTURE_LEGACY_REMOVE:BOOL=ON ITK_LEGACY_REMOVEBOOL=ON The future preferred macro should be used │ - itkTypeMacro │ + itkOverrideGetNameOfClassMacro
…/update-cid-tags ENH: Convert ExternalData .md5 tags to .cid (IPFS content IDs)
|
Closing temporarily — this PR is stacked on #6208 (RLEImage ingest) and will be reopened (or re-submitted) once #6208 lands on main. MCI's tests use The 11 missing CIDs are now published (ITKTestingData PR #47, merged), and the rerun of "Populate shared ExternalData cache" went green at |
|
PR generally looks good. |
Brings MorphologicalContourInterpolation from a configure-time remote fetch into the ITK source tree at Modules/Filtering/MorphologicalContourInterpolation/ using the v4 ingestion pipeline (whitelist filter-repo + per-commit clang-format + black + commit-prefix sanitization). Upstream repo: https://github.com/KitwareMedical/ITKMorphologicalContourInterpolation.git Upstream tip: a0ed9f7fa58fc09270bb8f2c49a68243acfedd46 Ingest date: 2026-05-04 Whitelist: MorphologicalContourInterpolation.list Per-commit transforms applied across all 217 commits: - filter-repo --paths-from-file (whitelist) - filter-repo --to-subdirectory-filter Modules/Filtering/MorphologicalContourInterpolation - 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: 77 -> 46 merge(s). Primary author: Dženan Zukić <dzenan.zukic@kitware.com> Co-authored-by: Adrien Boucaud <adrien.bk@free.fr> Co-authored-by: Dzenan Zukic <dzenan.zukic@kitware.com> Co-authored-by: Dženan Zukić <dzenanz@gmail.com> Co-authored-by: Hans J. Johnson <hans-johnson@uiowa.edu> Co-authored-by: Hans Johnson <hans-johnson@uiowa.edu> Co-authored-by: Hans Johnson <hans.j.johnson@gmail.com> 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 J. Seng <mathewseng@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: Stephen Aylward <stephen.aylward@kitware.com> Co-authored-by: Tom Birdsong <tom.birdsong@kitware.com> Co-authored-by: vicory <jared.vicory@kitware.com>
…akeLists Removes cmake_minimum_required, CXX_STANDARD policing, and the standalone-build wrapper that the in-tree module never uses.
|
Rebased on |
Ingests
MorphologicalContourInterpolationfrom the standalone remote module KitwareMedical/ITKMorphologicalContourInterpolation into ITK atModules/Filtering/MorphologicalContourInterpolation/. Stacked on PR #6208 (RLEImage ingest) — that PR provides MCI'sTEST_DEPENDS RLEImageand the CTAD deduction guides that MCI's RLE-flavored test exercises.Local validation:
pre-commit run --all-filesclean;MorphologicalContourInterpolationTestDriverbuilds; 24/24 sampled MCI tests pass locally (12 plain + 12 RLE-flavored acrossEmpty/NoSlices/SimplestOneToOne/OneToOne); 730 tests registered in total onceExternalDatafetches their content links.What this provides
MorphologicalContourInterpolationprovides filters that interpolate manually-segmented anatomical contours through volumetric label data using morphological reconstruction. Given a sparse set of 2D contours on arbitrary slices, the filter reconstructs a complete 3D label mask. The flagship class isitk::MorphologicalContourInterpolator.Path:
Modules/Filtering/MorphologicalContourInterpolation/(alongside the existingModules/Filtering/RLEImage/from the stacked PR #6208).Pipeline metrics
The relatively high commit count comes from MCI's long history (327 upstream commits since 2016) — reflects the maturity of this module.
Dependencies
DEPENDS(library):ITKBinaryMathematicalMorphology,ITKDistanceMap— both ITK core (always available)TEST_DEPENDS:ITKTestKernel(core),RLEImage(provided by stacked PR ENH: Ingest ITKRLEImage into Modules/Filtering #6208)EXCLUDE_FROM_DEFAULTis set on the module so it does not auto-build unlessModule_MorphologicalContourInterpolation:BOOL=ONis passed.Stack relationship to PR #6208
This PR stacks on PR #6208 (RLEImage ingest) for two reasons:
TEST_DEPENDS RLEImage— MCI'sitkMorphologicalContourInterpolationTestWithRLEImage.cxxinstantiates the morphological filter againstRLEImagetypes. Without RLEImage as an in-tree module, the test directory is not configured.CTAD deduction guides — when MCI's test code includes
itkImageFileWriter.h(which transitively pulls initkImageAlgorithm.hxx) and instantiates the writer's templates against anRLEImage, ITK core's CTAD-using calls (e.g.ImageRegionConstIterator it(inImage, inRegion);) need explicit deduction guides on theImageRegionConstIterator<RLEImage<...>>partial specialization. Those guides were added in8dcb1e8fe3on PR ENH: Ingest ITKRLEImage into Modules/Filtering #6208. Without them, MCI's RLEImage-flavored test fails to compile.If reviewers prefer to land MCI without the RLEImage dependency in this cycle, the alternative is to disable the
itkMorphologicalContourInterpolationTestWithRLEImage.cxxsource fromtest/CMakeLists.txtuntil RLEImage lands. The plain (non-RLE) MCI test suite does not need PR #6208.Follow-up commits in this PR
After the merge commit (
ENH: Ingest ITKMorphologicalContourInterpolation into Modules/Filtering):DOC:AddModules/Filtering/MorphologicalContourInterpolation/README.mdpointing at the archived upstream.COMP:RemoveModules/Remote/MorphologicalContourInterpolation.remote.cmake(now in-tree).ENH:EnableModule_MorphologicalContourInterpolation:BOOL=ONinpyproject.tomlconfigure-ci.No
STYLE:gersemi-0.19.3 fixup was needed for this ingest — the post-mergepre-commit run --all-filesgate was clean on first try. The v4 sanitize correctly handled the upstream'sexamples/,wasm/, anddoc/directories (excluded from the whitelist; left in upstream archive).Phase B (upstream archival) — deferred
Per the v4 design (PR #6204), the upstream archival step is intentionally separated. After this PR merges into ITK
main, run:Note the upstream is
KitwareMedical/ITKMorphologicalContourInterpolation(not the InsightSoftwareConsortium org); confirm push permission before flippingarchived=true.