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

Support "sparse remote access" to nii.gz files? #133

Open
yarikoptic opened this issue Jul 19, 2022 · 0 comments
Open

Support "sparse remote access" to nii.gz files? #133

yarikoptic opened this issue Jul 19, 2022 · 0 comments

Comments

@yarikoptic
Copy link
Contributor

I feel like we chatted about it but I failed to find an issue, so here it comes (may be again).

ATM bisweb requires download of the file to the client machine to be visualized. May be that could be avoided if bisweb would have done desired HTTP Range requests (similarly to how https://github.com/fsspec/filesystem_spec and using it datalad-fuse and various other libraries do) for only needed data -- that would allow to visualize data without requiring entire volume download.

Why needed: In dandiarchive.org we have some "sizeable" .nii.gz files in the dandiarchive , e.g. https://dandiarchive.org/dandiset/000026/draft/files?location=derivatives%2Fmri_average%2Fsub-I41%2F contains 2.6GB .nii.gz available via https://api.dandiarchive.org/api/assets/4bb02786-9998-4c2b-b01b-7e2f2aa42d2c/download/ which is (pardon the filename)

$> nib-ls blah.nii.gz
blah.nii.gz float32 [1200, 1110, 576] 0.15x0.15x0.15   sform

May be for that purpose, for integration with
https://github.com/pauldmccarthy/indexed_gzip could be used to index gzip to allow for random access (could even be 4 separate indexes - one per each of possible dimensions to slice ijkt). E.g. it is used by https://github.com/mxmlnkn/ratarmount to provide random access within gzipped tars, and then bisweb provided fetching and local caching for only needed/requested slices of data?

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

No branches or pull requests

1 participant