You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
.nii.gz is a format, that cannot deal with very large data. It would be nice to be able to write hdf5 displacement fields instead of nii.gz. antsApplyTransforms itself makes this possble, but the python wrapper function ants.apply_transforms can only write .nii.gz. It is quite easy to let the developer decide, which kind of displacement field format he would like to create.
Describe the solution you'd like
In ants.apply_transforms, just replace the line
tfn = '%scomptx.nii.gz' % compose if compose is not None else 'NA'
with
if compose:
tfn = '%scomptx.nii.gz' % compose if not compose.endswith('.h5') else compose
else:
tfn = 'NA'
Using this solution. The developer can use ants.apply_transforms(..., compose="path/to/my/dispfield.h5") to create an hdf5 displacement field. Using the old code instead, this would just create the following displacement field: "path/to/my/dispfield.h5comptx.nii.gz", which is a .nii.gz.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
.nii.gz is a format, that cannot deal with very large data. It would be nice to be able to write hdf5 displacement fields instead of nii.gz.
antsApplyTransforms
itself makes this possble, but the python wrapper functionants.apply_transforms
can only write.nii.gz
. It is quite easy to let the developer decide, which kind of displacement field format he would like to create.Describe the solution you'd like
In
ants.apply_transforms
, just replace the linewith
Using this solution. The developer can use
ants.apply_transforms(..., compose="path/to/my/dispfield.h5")
to create an hdf5 displacement field. Using the old code instead, this would just create the following displacement field: "path/to/my/dispfield.h5comptx.nii.gz", which is a .nii.gz.The text was updated successfully, but these errors were encountered: