I have 3D array in Nifti file (.ii.gz) and I want to save it as a 3D numpy array. I used Nibabel to convert Numpy to Nifti1. Can I do the opposite?
From nipy
import numpy as np
import nibabel as nib
img = nib.load(example_filename)
a = np.array(img.dataobj)
来源:https://stackoverflow.com/questions/44422248/how-to-convert-nifti-file-to-numpy-array