Hello together,
I try to load a (large) 4D NIfTI file (fMRI EPI timeseries from Human Connectome Project, about 1 GB) with NiBabel.
import nibabel as nib
img = nib.load("fmri.nii.gz")
data = img.get_data()
The program crashes during "img.get_data()" with an "MemoryError" (having 6 GB of RAM in my machine).
Is there a way to fetch data from the image partially, for example:
img.get_data(3) // for 3rd time series
Any suggestions? Or do I really have to split up the 4D volume into multiple 3D volumes (in my case 1200 time points, so 1200 images per 4D volume)?
Best regards,
Kai