Repository navigation
BUG: Fix pixelType typo breaking WASM tensor round-trip - #6954
Merged
hjmjohnson merged 1 commit intoOct 23, 2026
Merged
hjmjohnson merged 1 commit into
hjmjohnson merged 1 commit into
Conversation
wasm_type_from_image_type tagged SymmetricSecondRankTensor images as "SymmetrySecondRankTensor", a string pixelType_to_prefix does not recognize. image_type_from_wasm_type then raised KeyError converting the type back, breaking the image/WASM round trip for this pixel type.
hjmjohnson
approved these changes
Oct 20, 2026
Member
|
@SID-6921 Is this PR ready for review? Do you still have concerns or modifications you would like to make? |
SID-6921
marked this pull request as ready for review
October 22, 2026 14:14
Contributor
Author
|
Yes, ready for review. CI is clean, no outstanding concerns on my end. Marked it out of draft. |
Contributor
[Medium impact] This PR appears safe to merge.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix a pixelType string typo that broke the WASM round trip for
SymmetricSecondRankTensorimages, and add a regression test.Root cause
wasm_type_from_image_typelabeled these images as"SymmetrySecondRankTensor"whilepixelType_to_prefixandimage_type_from_wasm_typeboth expect"SymmetricSecondRankTensor",matching the
itk.SymmetricSecondRankTensortype name used in thesame branch. The mismatch made
image_type_from_wasm_typeraiseKeyErrorwhen converting the WASM type back to an ITK image type.AI assistance
An AI coding agent (operating under a human developer's direction)
searched for sibling-function inconsistencies in ITK's Python
wrapping support modules, located this typo, applied the one-line
fix, and added the regression test. Verified locally against an
installed
itk5.4.7 package: reproduced theKeyErrorwith theoriginal code, confirmed the fix resolves the round trip.