-
Notifications
You must be signed in to change notification settings - Fork 261
ENH: Add to/from_stream methods and from_url classmethod to SerializableImage #1129
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1129 +/- ##
==========================================
+ Coverage 91.74% 91.78% +0.03%
==========================================
Files 101 101
Lines 12382 12392 +10
Branches 2424 2424
==========================================
+ Hits 11360 11374 +14
+ Misses 694 692 -2
+ Partials 328 326 -2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Anybody interested in reviewing? |
Sorry - yes - will do - tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we automatically recognize the URL and plumb this into nib.load
etc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops - sorry - forgot to add this comment.
Probably. Feels like a bit of a can of worms that I didn't want to open in this PR. Okay to push off to another one? |
Yes, that's fine. |
LGTM |
Thanks! |
Extends #639 to allow
from_url()
to load an image. Does not currently handle gzipped (see #1128 for some more discussion) streams, though this should be doable.Abstracts to using
io.IOBase
to permit easy extension to other streams, but does not expose it generically at this point.Tested to work on https://openneuro.org/crn/datasets/ds000117/snapshots/1.0.5/files/sub-01:ses-mri:fmap:sub-01_ses-mri_magnitude1.nii and a
file:///...
option.