How can I create .nii (nifti) file from 3D Numpy array
You can this using nibabel:
import nibabel as nb

ni_img = nib.Nifti1Image(numpy_array, affine=np.eye(4))
nib.save(ni_img, &quot;dicom_volume_image.nii&quot;)