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

handle nii.gz correctly #93

Merged
merged 1 commit into from
Aug 2, 2024
Merged

handle nii.gz correctly #93

merged 1 commit into from
Aug 2, 2024

Conversation

alessandrofelder
Copy link
Member

@alessandrofelder alessandrofelder commented Aug 2, 2024

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?

save/load_any in Image IO was raising an error when passed a compressed nifti file (.nii.gz) - (but save/load_nii works with these files perfectly fine).

What does this PR do?

In the save/load_any functions, this PR adds handling the case of compressed nifti files appropriately.

References

Closes #89

How has this PR been tested?

Improved tests, to cover this case, were added and pass locally.

Is this a breaking change?

No

Does this PR require an update to the documentation?

No

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality (unit & integration)
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.68%. Comparing base (7098eb8) to head (f5eb737).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #93   +/-   ##
=======================================
  Coverage   92.68%   92.68%           
=======================================
  Files          37       37           
  Lines        1845     1845           
=======================================
  Hits         1710     1710           
  Misses        135      135           
Flag Coverage Δ
numba 92.62% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alessandrofelder alessandrofelder marked this pull request as ready for review August 2, 2024 10:44
@alessandrofelder alessandrofelder requested a review from a team August 2, 2024 10:44
Copy link
Member

@adamltyson adamltyson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks! I tested it on a "real" nii.gz file too and it works fine.

@adamltyson adamltyson merged commit 14f5509 into main Aug 2, 2024
14 checks passed
@adamltyson adamltyson deleted the handle-nii-gz branch August 2, 2024 12:55
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.

[BUG] load_any raises NotImplementedError for .nii.gz file
2 participants