Answers for "store array to nii file"

0

store array to nii file

import nibabel as nib
import numpy as np
data = np.arange(4*4*3).reshape(4,4,3)
new_image = nib.Nifti1Image(data, affine=np.eye(4))
Posted by: Guest on September-16-2021

Python Answers by Framework

Browse Popular Code Answers by Language