I have dataset of nii.gz
files each around 1G
including 4d
tensor. There are two ways of reading them that I am aware of as the following:
img = nib.load('fMRI.nii.gz')
imgarr = np.array(img.dataobj)
or
img = nib.load('fMRI.nii.gz')
imgarr = img.get_data()
the problem is reading the whole tensor is expensive and I just need an slice. Is there any other way?