Irev-Dev / MRI-Volume-Slice

Tools for view MRI Volumes in the browser
6 stars 7 forks source link

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

Closed Irev-Dev closed 5 years ago

Irev-Dev commented 5 years ago

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)

AliObaji commented 5 years ago

I'd like to look into this please.

Irev-Dev commented 5 years ago

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!

Irev-Dev commented 5 years ago

Fixed in #20