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

FIX: Preserve pixdim4+ of resampled images #3239

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions fmriprep/interfaces/resampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,8 @@
)
resampled_img = nb.Nifti1Image(resampled_data, target.affine, target.header)
resampled_img.set_data_dtype('f4')
# Preserve zooms of additional dimensions
resampled_img.header.set_zooms(target.header.get_zooms()[:3] + source.header.get_zooms()[3:])

Check warning on line 592 in fmriprep/interfaces/resampling.py

View check run for this annotation

Codecov / codecov/patch

fmriprep/interfaces/resampling.py#L592

Added line #L592 was not covered by tests

return resampled_img

Expand Down
Loading