Skip to content

ENH: make ApplyToImageMetadata available in Python wrapping - #6804

Open
dzenanz wants to merge 1 commit into
InsightSoftwareConsortium:mainfrom
dzenanz:pythonApplyToImageMetadata
Open

ENH: make ApplyToImageMetadata available in Python wrapping#6804
dzenanz wants to merge 1 commit into
InsightSoftwareConsortium:mainfrom
dzenanz:pythonApplyToImageMetadata

Conversation

@dzenanz

@dzenanz dzenanz commented Aug 25, 2026

Copy link
Copy Markdown
Member

PR Checklist

  • No API changes were made (or the changes have been approved)
  • No major design changes were made (or the changes have been approved)
  • Added test (or behavior not changed)
  • Updated API documentation (or API not changed)

@github-actions github-actions Bot added type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Enhancement Improvement of existing methods or implementation area:Python wrapping Python bindings for a class type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct area:Core Issues affecting the Core module labels Aug 25, 2026
@dzenanz
dzenanz force-pushed the pythonApplyToImageMetadata branch 2 times, most recently from 93007ab to 74ae5e0 Compare August 25, 2026 21:05
@hjmjohnson

This comment was marked as resolved.

Comment thread Modules/Core/Transform/include/itkTransform.h
@dzenanz

dzenanz commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Actions update split out into #6806.

@dzenanz
dzenanz force-pushed the pythonApplyToImageMetadata branch from 74ae5e0 to 32b44f6 Compare August 26, 2026 15:02
@dzenanz
dzenanz marked this pull request as ready for review August 26, 2026 15:30
@greptile-apps

greptile-apps Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This change exposes transform metadata application to Python and adds a Python test for that behavior. The new test always requests 3D wrapped image and transform types, but its CMake registration is not limited to builds that enable dimension 3. As a result, Python wrapping builds configured without 3D support can register a test that cannot run.

T-Rex validation blocked

The direct reduced-dimension configuration check could not complete because the cmake tool is missing. The attempted configuration with ITK_WRAP_PYTHON=ON and ITK_WRAP_IMAGE_DIMS=2 exited with status 127 before CMake could generate the test manifest or run the test.

Confidence Score: 4/5

The change is not safe for Python wrapping configurations that intentionally exclude 3D image types until the test registration is gated by the available wrapped dimensions.

One non-security build-compatibility issue remains: the test registration does not match the fixed 3D types used by the test. The source relationship is clear, although the reduced-dimension build could not be configured locally because CMake is unavailable.

Files Needing Attention: Modules/Core/Transform/wrapping/test/CMakeLists.txt needs a dimension-3 wrapping guard around itkApplyToImageMetadataTest; Modules/Core/Transform/wrapping/test/itkApplyToImageMetadataTest.py establishes the test's fixed 3D dependency.

T-Rex T-Rex Logs

What T-Rex did

  • The 2D wrapping probe script was uploaded and identified as the minimal configuration probe.
  • The first blocked probe output log was uploaded, showing the attempted command, the working directory, the missing cmake failure, and exit status 127.
  • The repeated blocked probe output log was uploaded, providing corroborating evidence of the same missing cmake failure and exit status 127.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "ENH: make ApplyToImageMetadata available..." | Re-trigger Greptile

Comment thread Modules/Core/Transform/wrapping/test/CMakeLists.txt Outdated
@dzenanz
dzenanz force-pushed the pythonApplyToImageMetadata branch from 32b44f6 to cc5694f Compare August 26, 2026 17:57
@dzenanz
dzenanz force-pushed the pythonApplyToImageMetadata branch from cc5694f to 7ebba67 Compare August 26, 2026 18:01
@dzenanz

dzenanz commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

This is ready for review. CI is green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Core Issues affecting the Core module area:Python wrapping Python bindings for a class type:Enhancement Improvement of existing methods or implementation type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants