How to convert Nifti file to Numpy array?
From nipy
import numpy as np
import nibabel as nib
img = nib.load(example_filename)
a = np.array(img.dataobj)
From nipy
import numpy as np
import nibabel as nib
img = nib.load(example_filename)
a = np.array(img.dataobj)