Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ITK ERROR: ITK only supports orthonormal direction cosines. No orthonormal definition found! #756

Closed
YingdiZhang opened this issue Aug 31, 2021 · 3 comments

Comments

@YingdiZhang
Copy link

YingdiZhang commented Aug 31, 2021

verse004.nii.gz
When I run nnUNet/nnunet/dataset_conversion/Task083_VerSe2020.py /
an error occurs, I found that there is an error in ITK reading this images:verse004.nii.gz, and the error is this:
Traceback (most recent call last):
File "Task083_VerSe2020.py", line 115, in
check_if_all_in_good_orientation(imagestr, labelstr, join(out_base, 'sanitycheck'))
File "/home/zyd/beifen_xinsuoqu_/nnUNet/nnunet/dataset_conversion/Task056_VerSe2019.py", line 34, in check_if_all_in_good_orientation
lab = sitk.GetArrayFromImage(sitk.ReadImage(join(labelsTr_folder, n)))
File "/home/zyd/anaconda3/envs/nnunet/lib/python3.7/site-packages/SimpleITK/extra.py", line 346, in ReadImage
return reader.Execute()
File "/home/zyd/anaconda3/envs/nnunet/lib/python3.7/site-packages/SimpleITK/SimpleITK.py", line 8015, in Execute
return _SimpleITK.ImageFileReader_Execute(self)
RuntimeError: Exception thrown in SimpleITK ImageFileReader_Execute: /tmp/SimpleITK-build/ITK/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx:1980:
ITK ERROR: ITK only supports orthonormal direction cosines. No orthonormal definition found!

@FabianIsensee
Copy link
Member

FabianIsensee commented Aug 31, 2021

that is strange but it really it not a nnU-Net problem - that is something the ITK community should look at. Or you use nibabel instead

@h510166404
Copy link

verse004.nii.gz
When I run nnUNet/nnunet/dataset_conversion/Task083_VerSe2020.py /
an error occurs, I found that there is an error in ITK reading this images:verse004.nii.gz, and the error is this:
Traceback (most recent call last):
File "Task083_VerSe2020.py", line 115, in
check_if_all_in_good_orientation(imagestr, labelstr, join(out_base, 'sanitycheck'))
File "/home/zyd/beifen_xinsuoqu_/nnUNet/nnunet/dataset_conversion/Task056_VerSe2019.py", line 34, in check_if_all_in_good_orientation
lab = sitk.GetArrayFromImage(sitk.ReadImage(join(labelsTr_folder, n)))
File "/home/zyd/anaconda3/envs/nnunet/lib/python3.7/site-packages/SimpleITK/extra.py", line 346, in ReadImage
return reader.Execute()
File "/home/zyd/anaconda3/envs/nnunet/lib/python3.7/site-packages/SimpleITK/SimpleITK.py", line 8015, in Execute
return _SimpleITK.ImageFileReader_Execute(self)
RuntimeError: Exception thrown in SimpleITK ImageFileReader_Execute: /tmp/SimpleITK-build/ITK/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx:1980:
ITK ERROR: ITK only supports orthonormal direction cosines. No orthonormal definition found!

I met the same problem, how did you solve it?

@joshy
Copy link

joshy commented Nov 5, 2021

The problem happens with the latest SimpleITK version: 2.1.0 released Jul 23, 2021. Because nnUNet has no fixed version of SimpleITK in the setup.py the problem appears on niftis with small voxels sizes [1] which are installed after Jul 23. 2021.

Freezing SimpleITK to SimpleITK < 2.1.0 would temporarily solve the issue [2]

References:
[1] ITK error: SimpleITK/SimpleITK#1433
[2] Error report in nnDetection: MIC-DKFZ/nnDetection#24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants