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: Allow writing HDF5 transforms as ITK transforms #1317

Merged
merged 1 commit into from
Mar 16, 2022

Conversation

cookpa
Copy link
Member

@cookpa cookpa commented Mar 11, 2022

HDF5 vector images don't work with transform readers.

…mages

HDF5 vector images don't work with transform readers
@cookpa
Copy link
Member Author

cookpa commented Mar 11, 2022

Feels wrong to put a file type dependence into antsApplyTransforms.cxx, but it works.

The other option would be to continue writing H5 files as vector images, and modify itkantsReadWriteTransform.h so that it tries to read an HDF5 file as a displacement field first. This strategy would avoid any file type testing in antsApplyTransforms, but the resulting .h5 files still won't be ITK transforms. I guess we could add a separate program to do that.

@cookpa
Copy link
Member Author

cookpa commented Mar 11, 2022

Addressing #1315

@gdevenyi
Copy link
Contributor

but the resulting .h5 files still won't be ITK transforms.

I think I'd rather we write out ITK transforms, so they can be loaded/used elsewhere with minimal effort.

@ntustison
Copy link
Member

Thanks @cookpa . I think @gdevenyi has a good point---if anybody is using ANTs with hdf5 files, I imagine they're using them elsewhere as well.

@cookpa
Copy link
Member Author

cookpa commented Mar 14, 2022

Thanks - I will merge this after some more tests.

@cookpa cookpa marked this pull request as ready for review March 16, 2022 13:08
@cookpa cookpa merged commit fc16efb into master Mar 16, 2022
@cookpa
Copy link
Member Author

cookpa commented Mar 16, 2022

Fixes #1315

@hjmjohnson hjmjohnson deleted the hdf5TransformWrite branch May 12, 2022 19:49
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.

None yet

3 participants