Skip to content

ENH: Check dimensionality of input warp fields.#1835

Merged
cookpa merged 1 commit intomasterfrom
fix_transform_order_segfault
Jan 28, 2025
Merged

ENH: Check dimensionality of input warp fields.#1835
cookpa merged 1 commit intomasterfrom
fix_transform_order_segfault

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