Project-MONAI / MONAILabel

MONAI Label is an intelligent open source image labeling and learning tool.
https://docs.monai.io/projects/label
Apache License 2.0
567 stars 185 forks source link

"ITK only supports orthonormal direction cosines" error when using antsRegistrationSyN.sh #1634

Closed ramBrain closed 4 months ago

ramBrain commented 4 months ago

Hi everyone,

I am trying to generate a transformation using antsRegistrationSyN.sh, but there seems to be an issue with one of the MRIs. Specifically, I get this error:

WARNING: In /usr/local/ANTs/build/ITKv5/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx, line 1934
NiftiImageIO (0x560b169efbb0): ../defT1_bs.nii has unexpected scales in sform

Exception caught during reference file reading 

itk::ExceptionObject (0x560b169c95b0)
Location: "unknown" 
File: /usr/local/ANTs/build/ITKv5/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx
Line: 2016
Description: ITK ERROR: ITK only supports orthonormal direction cosines.  No orthonormal definition found!

 file ../defT1_bs.nii
Exception Object caught: 

itk::ExceptionObject (0x560b169c95b0)
Location: "unknown" 
File: /usr/local/ANTs/build/staging/include/ITK-5.4/itkCenteredTransformInitializer.hxx
Line: 35
Description: ITK ERROR: CenteredTransformInitializer(0x560b169ebcd0): Moving Image has not been set

By checking the header, the sform looks like this:

sto_xyz:1       0.995191 -0.009849 0.097461 -95.062607                            sto_xyz:2       0.047470 0.918793 -0.391875 -52.154037                            sto_xyz:3       -0.085687 0.394617 0.914842 -189.548813                           sto_xyz:4       0.000000 0.000000 0.000000 1.000000 

Any clue?

Thank you, Ramtin