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" when using antsRegistrationSyN.sh #1675
Comments
Please post the full output of
as well as your OS and ANTs version. |
The output of that line of code is as follows:
OS is WSL under Windows 10 (Ubuntu 22.04.2 LTS) ANTs version: 2.4.3.post23-g2d10611 (as reported in ANTsVersionConfig.h) Many thanks, |
Thanks. There were some ITK updates to try to avoid this problem. ITK requires an orthonormal cosine matrix, there can't be a shear or scaling (other than the voxel spacing). But sometimes it's too sensitive in detecting this. Can you try the most recent ANTs? You can try binaries from the release page if you don't want to build from source again |
Unfortunately the issue is still persistent. The difference with the previous prompt is that now it looks for ITKv5 in another folder, namely: I cannot navigate to that directory though for some reason |
OK, I'll have to look more into this and possibly involve the ITK folks. Can you share the problematic image? If not, can you share the header? You can do this with
Note you need to unzip first (it doesn't work with .nii.gz) |
The problematic image is actually the default ICBM152 included in the Brainstorm toolbox, hence I can share it (attached). I was wondering if I should install ITK separately? Or shall the binary files suffice to make ANTs work? Many thanks |
Perfect, you don't need to install ITK separately. The libraries are built into the executables. If you build from source, ITK will be downloaded and compiled first. |
The official MNI atlases are available in NIFTI form from the original authors, https://nist.mni.mcgill.ca/atlases/ |
It looks like this problem is caused by the header transform being almost orthonormal, but not quite enough for ITK. If you're OK with using the latest ANTs release, and dealing with some slight deviations in the image coordinates, you can set
ITK will then "correct" the sform transform to be exactly orthonormal when reading the image. In this case:
|
Many thanks for your help, I will try and see how it works. Ramtin |
Any idea how to set
in ANTsPy? |
os.environ['ITK_NIFTI_SFORM_PERMISSIVE'] = '1' |
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:By checking the header, the sform looks like this:
Any clue?
Thank you,
Ramtin
The text was updated successfully, but these errors were encountered: