Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #store #array #nii #file
ADD COMMENT
Topic
Name
9+8 =