-
Notifications
You must be signed in to change notification settings - Fork 262
Possible not optimal zipping for nii.gz? #566
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
Comments
Possibly related: #382 You can adjust the default compression level. I can look up where, if you can't quickly find it. (I think it's in openers.py.) |
Nibabel uses a relatively low level of compression by default. This usually doesn't make much difference, but maybe that's not true for you image. Try doing:
before you load and save, does that help? |
Bingo! |
@matthew-brett - would it make sense to up the default to something like 5? may provide a reasonable balance between time to compress and compression ratio. looks like decompression isn't bad in terms of time. |
Hi,
In loading and re-saving an image with nibabel I noticed an increase in memory.
Below some IO from an ipython session:
Here I open the image with ITK-snap, and re-save it under the name initial_re_saved_same_dtype_re_Saved_itksnap.nii.gz:
Same issue happens even if not changing the data-type, but only in loading and re-saving.
Is it an issue or am I doing something wrong? Any possible workaround?
Thanks!
The text was updated successfully, but these errors were encountered: