我有很多 nii.gz 图像需要从 3D 重塑为 2D,我正在尝试使用以下代码,但由于 nii.gz 扩展名,它无法正常工作:
import nibabel as nib
img = nib.load('teste01converted.nii.gz')
img.shape
newimg = img.reshape(332,360*360)
谁能帮我?
这是我正在使用的图像类型的示例:https ://drive.google.com/drive/folders/1681T99hp6qZRUgx1Ej_h1hwFv1g_LJo4?usp=sharing