Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Check dimensionality of input warp fields. #1835

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

cookpa
Copy link
Member

@cookpa cookpa commented Jan 27, 2025

Ideally, this would be fixed in itkantsReadWriteTransform.h, but that gets complicated because that function has to handle pointers for antspy and antsr, as well as regular files. So I implemented a dimensionality check in CompositeTransformUtil itself, using itkImageIO.

This retains backwards compatibility by not requiring users to explicitly state ImageDimension or -d .

Fixes #1827

Ideally, this would be fixed in itkantsReadWriteTransform.h, but that gets complicated
because that function has to handle pointers for antspy and antsr, as well as regular files.
@cookpa cookpa merged commit 7206856 into master Jan 28, 2025
1 check passed
@cookpa cookpa deleted the fix_transform_order_segfault branch January 28, 2025 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CompositeTransformUtil --assemble segfaults if first transform is a NIFTI displacement field
1 participant