Issue
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?
Solution
From nipy
import numpy as np
import nibabel as nib
img = nib.load(example_filename)
a = np.array(img.dataobj)
Answered By - piRSquared
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.