Irev-Dev/MRI-Volume-Slice

fetch default data from openneuro.org (or else where)

Closed this issue · 3 comments

Currently a nifti file is being use as part of the bundle making it pretty large (20mb or so), it would be good to fetch data from open neuro instead. for example
https://openneuro.org/crn/datasets/ds001417/files/sub-study002:ses-after:anat:sub-study002_ses-after_T1w.nii.gz
will work just fine.

default data is currently being loaded in at line 41 of scipts.js

async function loadDefaultData(niftiData) {
    const response = await fetch(niftiData);
    const blob = await response.blob();

niftiData can more or less be replaced with the url above however it is .gz compressed which is common, so a decompression library from npm is in order.

(later we might add functionality to select from a few data sets)

I'd like to look into this please.

I've been trying to deploy this app with netlify.com, and the build have been failing, I suspected it might be because of the bundle size, and that's been confirmed, they state that files over 10mb are not supported well by their CDN and can cause the whole build to fail.

https://www.netlify.com/docs/build-gotchas/?_ga=2.119023817.1948507976.1539065552-1201275283.1539065552

so pulling in the data from else where will be great.

Thanks @AliObaji!

Fixed in #20