Skip to content

Distortion in the inferior cerebellum when registering MRI to MNI space. #1856

@guilhermepovala

Description

@guilhermepovala

Operating system and version

Ubuntu 22.04

CPU architecture

x86_64 (PC, Intel Mac, other Intel/AMD)

ANTs code version

2.2.0.dev133-gc7310

ANTs installation type

Downloaded Github release binaries

Summary of the problem

Hi,

I'm having a consistent problem when registering T1 images to MNI space.
The problem is related to a distortion in the inferior cerebellum, as can be seen in the following image.
Image

I have tried antsRegistrationSyNQuick.sh, antsRegistration, and also antsRegistration_affine_SyN.sh
With and without the brain mask.
It doesn't happen only with this subject in specific, but with about 10% of our T1s. It is not scanner specific, and doesn't relate much with the quality of the sequence, some good quality present this problem and some bad images work just fine.

Here's the same subject before registration:
Image

Any tips on how to overcome this problem?

Commands to reproduce the problem.

antsRegistration_affine_SyN.sh --fixed-mask model_t1w_mask.nii -o moving_resampled_to_mni.nii.gz subject_t1.nii mni_adni_t1w_tal_nlin_asym.nii moving_to_mni

Output of the command with verbose output.

output.txt

Data to reproduce the problem

Unfortunately, the data can't be shared.

Activity

ntustison

ntustison commented on Feb 27, 2025

@ntustison
Member

Without the data, I can't confirm but it looks like a well-known boundary effect and the MNI template is particularly susceptible because it cuts off really close to the inferior portion of the cerebellum. Following the linear transformation, the boundary of the deformable region is purposely clamped at the image boundaries to satisfy the SyN diffeomorphic constraints. One thing you can try is to pad the MNI template, run your registration, and then crop back to the original size as a post-processing step.

cookpa

cookpa commented on Feb 27, 2025

@cookpa
Member

This is a common registration problem with two main causes

  1. Images that extend to the boundaries of the FOV - this leads to instability due to edge effects
  2. Different FOV - there's features in one image not in the other

I use a script to reduce neck coverage, which uses c3d (available with ITK-SNAP).

Then ImageMath can pad the images on all sides

ImageMath 3 padded.nii.gz PadImage t1w.nii.gz 20

This is often sufficient, but if problems persist you can also pad the template image. I do most of my registrations on brain-extracted images, which is a kind of implicit padding as it removes features at the edge of the images.

gdevenyi

gdevenyi commented on Feb 27, 2025

@gdevenyi
Contributor

There is now an "extended neck" MNI ICBM model released in 2020 from the original team:
https://nist.mni.mcgill.ca/icbm-152-extended-nonlinear-atlases-2020/

guilhermepovala

guilhermepovala commented on Feb 27, 2025

@guilhermepovala
Author

Thank you everyone for the fast replies. It worked pretty well after padding the template file. I didn't have to pad the moving file, only the fixed (which makes more sense to me, since there's little margin for error in the bottom part of the template).

I also like that the MNI ICBM has an extended neck template. We are using MNI-ADNI space (https://github.com/aces/mni-models_adni_nl), which is has bigger ventricles compared to the original MNI. Unfortunately they don't provide extended images. Does anyone know if they also provide this extended version? I couldn't find anywhere.

Is there a way to embed the Padding in the Warp.nii.gz file or I will always have to apply the transform and then un-pad the output?

cookpa

cookpa commented on Feb 27, 2025

@cookpa
Member

We don't have a script that does padding, though maybe it would be useful to add.

Another risk with cropped templates is that the initial center of mass alignment in antsRegistration can be suboptimal. A tell for this would be to look at the affine only (apply the .mat, not the warp) transforms in your failed cases. If they look bad, that might be an issue as well.

gdevenyi

gdevenyi commented on Feb 27, 2025

@gdevenyi
Contributor

I also like that the MNI ICBM has an extended neck template. We are using MNI-ADNI space

Oh I use that, but I didn't know it was public. Cool.

also provide this extended version? I couldn't find anywhere.

I don't think one exists right now. They are are a different team at the MNI, they certainly have access to the methods and they probably could reconstruct an extended range one.

guilhermepovala

guilhermepovala commented on Feb 27, 2025

@guilhermepovala
Author

Interesting @gdevenyi.
I will get in contact with them.

Would you be able to share how do you process the T1 images using the MNI-ADNI template?

I did try with the padding and it solve the problem of the cerebellum, but now many images are distorted overall.
So it basically solved one problem but created another one.

I will try to remove neck coverage like @cookpa mentioned. We just can't register only the extracted brain, but I will give it a try.

gdevenyi

gdevenyi commented on Feb 28, 2025

@gdevenyi
Contributor

Would you be able to share how do you process the T1 images using the MNI-ADNI template?

I use it as one of the potential priors for my preprocessing pipeline here:
https://github.com/coBrALab/iterativeN3

For the case for aged subjects.

I also use it as a starting target for https://github.com/CoBrALab/optimized_antsMultivariateTemplateConstruction for aged subjects.

Underneath, both use my antsRegistration_affine_SyN.sh and ants_generate_iterations.py scripts for registration from https://github.com/cobralab/minc-toolkit-extras/ (don't let the name fool you, just needs base python and ANTs). Just using these might solve your registration problems as well...

guilhermepovala

guilhermepovala commented on Feb 28, 2025

@guilhermepovala
Author

Great! I will take a look at your scripts and implement here.
I will let you know how it goes. Thank you very much for sharing.
Would you be able to share the priors with me?

gdevenyi

gdevenyi commented on Mar 4, 2025

@gdevenyi
Contributor

@guilhermepovala run these commands against the (gunzip'd) files from the mni adni repo:

Atropos  -d 3 --verbose \
  -i KMeans[3] \
  -o [mni_adni_hi_t1w_tal_nlin_sym_atropos.mnc,mni_adni_hi_t1w_tal_nlin_sym_posterior%02d.mnc] \
  -a mni_adni_hi_t1w_tal_nlin_sym.mnc \
  -x mni_adni_hi_t1w_tal_nlin_sym_mask.mnc \
  -s 1x2 -s 2x3

Atropos  -d 3 --verbose \
  -i KMeans[3] \
  -o [mni_adni_t1w_tal_nlin_asym_atropos.mnc,mni_adni_t1w_tal_nlin_asym_posterior%02d.mnc] \
  -a mni_adni_t1w_tal_nlin_asym.mnc  \
  -x mni_adni_t1w_tal_nlin_asym_mask.mnc \
  -s 1x2 -s 2x3

The model I was using corresponds to the asym model, but the sym models work fine too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ntustison@cookpa@gdevenyi@guilhermepovala

        Issue actions

          Distortion in the inferior cerebellum when registering MRI to MNI space. · Issue #1856 · ANTsX/ANTs