Data Science Asked by Eren Kallikci on August 1, 2021
I have a prediction numpy array. How can I make a .nii or .nii.gz mask file from the array?
You can this using nibabel:
import nibabel as nb
ni_img = nib.Nifti1Image(numpy_array, affine=np.eye(4))
nib.save(ni_img, "dicom_volume_image.nii")
Answered by Tallys Prado on August 1, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP