You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the write_nifti function that exports the 3D segmentation prediction to a nifty image file, and addition dimension is added (either for channel or batch) which makes it unreadable using ITK-SNAP or Slicer.
I propose the following solution
results_img = nib.Nifti1Image(data.squeeze().astype(output_dtype), to_affine_nd(3, target_affine)) # squeeze channel dim