"ITK only supports orthonormal direction cosines" when using ANTs

Hi all,

Although from the title it reads as an ANTs-related issue, it appears to be potentially related to the way Brainstorm exports MRI files.

I am trying to perform a transformation from the ICBM152 provided in Brainstorm to a subject's T1. I exported the MRI from the @default_subject, but I get this error related to the ICBM152 MRI file:

NiftiImageIO (0x55eddc235bc0): /mnt/d/T1.nii has unexpected scales in sform

Exception caught during reference file reading

itk::ExceptionObject (0x55eddc2105b0)
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!

Any clue on what this could mean?

Thank you,
Ramtin

As per this GitHub issue, the issue in on the ITK side:

1 Like

They indeed suggested to me to neglect the sform-check if I trust the data, but do you think the sform of the template provided in Brainstorm could be double-checked for potential imprecision? Since this is the first time I encounter this issue while using ANTs.

Thank you,
Ramtin

Yes, we will check that.
Could you share a simple script with ANTs that prompts the error?

Hi Raymundo,

This should generate the error:

antsRegistrationSyN.sh -t "s" -d 3 -f <someT1file> -m <defaultBrainstormICBM> -o <output> -x <someMask> -n 4 -j 1

ITK people suggested to run export ITK_NIFTI_SFORM_PERMISSIVE=1 to make this work, by letting ITK adjust the sform. However this should be done if I am confident that the sform is pretty much correct.