Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Integration with FileIO #7

Open
SimonDanisch opened this issue Jan 9, 2017 · 4 comments
Open

Integration with FileIO #7

SimonDanisch opened this issue Jan 9, 2017 · 4 comments

Comments

@SimonDanisch
Copy link

Should we register the NIfTI file format with FileIO?
I guess it'd just be something like this:

add_format(format"NIfTI", (), ".nii") #<-- put this into https://github.com/JuliaIO/FileIO.jl/blob/master/src/registry.jl
FileIO.load(file::File{format"NIfTI"}) = NIfTI.niread(filename(file))

with the magick number instead of the () ;)

@dpsanders
Copy link

Bump.

@Gnimuc
Copy link

Gnimuc commented Mar 16, 2017

+1

@SimonDanisch
Copy link
Author

What's holding me back is, that we still don't have a good story for handling zipped files -.-
@timholy, have you already thought about handling that?
I don't know compression very well. Could we just uncompress the header? Uncompressing the whole file as soon as we found out it's a gzip and then passing the uncompressed file to e.g. NIfTI doesn't seem like the right way to do things...

@simonster
Copy link
Collaborator

Libz and GZip both offer buffered reading of compressed files, so if you set the buffer size to be small and don't read more than it, that's all that will ever be read from the file.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants