Traceback (most recent call last):
File "", line 1, in
File "D:\miniconda3\envs\DL\lib\site-packages\SimpleITK\extra.py", line 355, in ReadImage
return reader.Execute()
File "D:\miniconda3\envs\DL\lib\site-packages\SimpleITK\SimpleITK.py", line 8438, in Execute
return _SimpleITK.ImageFileReader_Execute(self)
RuntimeError: Exception thrown in SimpleITK ImageFileReader_Execute: D:\a\1\sitk-build\ITK\Modules\IO\NIFTI\src\itkNiftiImageIO.cxx:2016:
ITK ERROR: ITK only supports orthonormal direction cosines. No orthonormal definition found!
来个一个大佬的操作
import nibabel as nib
img = nib.load("xxxxx.nii.gz")
img.set_qform(img.get_qform())
img.set_sform(img.get_sform())
nib.save(img, "xxxxx.nii.gz")
虽然不是很推荐这个操作
pip install SimpleITK==2.0.2
参考:
https://blog.csdn.net/qq_27095227/article/details/121045586