Skip to content

COMP: Declare ITKIOImageBase for BoneMorphometry wrapping - #6880

Merged
hjmjohnson merged 1 commit into
InsightSoftwareConsortium:mainfrom
hjmjohnson:fix/bonemorphometry-wrapping-ioimagebase
Sep 21, 2026
Merged

hjmjohnson merged 1 commit into
InsightSoftwareConsortium:mainfrom
hjmjohnson:fix/bonemorphometry-wrapping-ioimagebase

Conversation

@hjmjohnson

Copy link
Copy Markdown
Member

itkBoneCommon.wrap wraps itk::ImageIOBase, itk::ImageFileReader, and itk::ImageFileWriter, which are declared in ITKIOImageBase, but the module never depended on it. Declaring it fixes itkImageIOBase.h file not found when building this module's Python wrapping.

How this was found, and why it went unnoticed

Found while building ITK with every EXCLUDE_FROM_DEFAULT module enabled, to test whether the ITK Python wheel cache could ship the ingested remote modules.

BoneMorphometry is EXCLUDE_FROM_DEFAULT, so no dashboard configuration builds it, and nothing has ever compiled its generated wrapping sources. Three wrapping translation units fail without this change:

Wrapping/Modules/BoneMorphometry/.../itkBoneCommonPython.cpp.o
Wrapping/Modules/BoneMorphometry/.../itkBoneMorphometryFeaturesImageFilterPython.cpp.o
Wrapping/Modules/BoneMorphometry/.../itkReplaceFeatureMapNanInfImageFilterPython.cpp.o
    fatal error: 'itkImageIOBase.h' file not found

COMPILE_DEPENDS is the right list: the dependency is needed to compile the wrapping sources, not to link the module library.

Verification

Configured with -DModule_BoneMorphometry=ON -DITK_WRAP_PYTHON=ON on macOS arm64. ninja BoneMorphometryPython compiles all five translation units and links _BoneMorphometryPython.abi3.so. pre-commit run --all-files exits 0.

itkBoneCommon.wrap wraps itk::ImageIOBase, itk::ImageFileReader and
itk::ImageFileWriter, all of which are declared in ITKIOImageBase, but the
module never depended on it. The generated wrapping sources therefore failed
with "itkImageIOBase.h file not found".

The module is EXCLUDE_FROM_DEFAULT, so no dashboard configuration builds its
wrapping and the missing dependency went unnoticed.
@github-actions github-actions Bot added type:Compiler Compiler support or related warnings area:Filtering Issues affecting the Filtering module labels Sep 21, 2026
@hjmjohnson
hjmjohnson marked this pull request as ready for review September 21, 2026 19:12
@greptile-apps

greptile-apps Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

No actionable issue was established in the changed dependency declaration; the native wrapping build remains unverified in this environment.

What we checked:

  • T-Rex compared the parent dependency metadata with the updated declaration and attempted the BoneMorphometryPython configure-and-build validation, but the configuration could not begin because CMake, Ninja, SWIG, and CastXML were unavailable. T-Rex
  • T-Rex captured the pre-validation state, showing the parent metadata and the missing CMake, Ninja, SWIG, and CastXML. T-Rex
  • T-Rex captured the post-validation state, showing the added ITKIOImageBase metadata and the same blocking tools still present. T-Rex
  • T-Rex recorded the complete executed validation source as bonemorphometry-python-wrap-validation.sh. T-Rex
Summary
  • Adds ITKIOImageBase as a compile dependency of BoneMorphometry, providing ImageIO declarations to its generated Python wrapping sources.

T-Rex validation blocked

  • The focused BoneMorphometryPython configure-and-build check could not run because CMake, Ninja, SWIG, and CastXML are unavailable in the environment.

Reviews (1) · Last reviewed commit: "COMP: Declare ITKIOImageBase for BoneMor..."

@hjmjohnson
hjmjohnson merged commit fa4b2d3 into InsightSoftwareConsortium:main Sep 21, 2026
16 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Filtering Issues affecting the Filtering module type:Compiler Compiler support or related warnings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants