import numpy as np import nibabel as nib # 3.0.0 nibimage=nib.load('test.nii') imagedata=nibimage.get_fdata() npimage=np.array(imagedata)
>>>npimage.shape >>>[256,256,8,49] # [长,宽,冠、矢、横轴状,高]