AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
February 21, 2020 10:38AM
Hi --pt,

So sorry for the confusion,

1. The first group of monkeys (including the image that I send to you) has successfully ended. All the images are well aligned with the template (thank you again!) using the protocol that I describe here:
[afni.nimh.nih.gov]

2. I have a second group of monkey that has been scan with another coil. For almost all these 8 monkeys, the coregistration between the functional images and the Template is not very good. I used exactly the same protocol as previously described.

3. My guess for why it is not working (probably wrong):

For some reason, I had to take a different FOV orientation for the anatomical images and the functional of the same animal. I thought that it will not be an issue since the orientation of the FOV is stored in the header. The images in my previous message are the raw functional and anatomical images open with MRIcron. You can see that the brain has a different orientation. However, when I use any viewer (AFNI, ITK, MRIcron), the viewer is able to superpose these two images perfectly (probably by reading the FOV orientation). In the third image, you have the result when I open an anatomical image and add as overlay the functional image.

Why am I thinking that it is the issue that led to a bad coregistration?

If I understood correctly:

For the first group of monkeys (1.) we helped the coregistration with the template by deobliquing and centering together the raw images (anat and func) on 0.
[afni.nimh.nih.gov]

first group of monkeys (1.): LONGER_e00_deob_RECEN.nii and a00_deob_ns_RECEN.nii.gz
If you look at the two images (deobolique and recentered) overlayed using afni, the results is:
[ibb.co]

Then, we applied @animal_warper and afni_proc.py on the two images and the result is very good.

For the second group:
If I applied the same step to helped the coregistration with the template by deobliquing and centering together the raw images (anat and func) on 0 and observed their overlayed using afni:

Second group of monkeys (2.): LONGER_e00_deob_RECEN.nii and a00_deob_ns_RECEN.nii.gz
[ibb.co]

Then, I applied @animal_warper and afni_proc.py on the two images and the images are not well aligned.

afni_proc.py                                                              \
    -subj_id ${subj}                                                      \
    -script proc.${subj}                                                  \
    -scr_overwrite                                                        \
    -out_dir ${subj}.results                                              \
    -blocks tshift align tlrc volreg                                      \
    -dsets      LONGER_e00_deob_RECEN.nii                                 \
    -copy_anat  a00_deob_ns_RECEN.nii.gz                                  \
    -anat_has_skull no                                                    \
    -volreg_align_to   MIN_OUTLIER                                        \
    -volreg_align_e2a                                                     \
    -volreg_tlrc_warp                                                     \
    -align_opts_aea                    \
        -epi_strip 3dAutomask          \
        -cost lpc+zz                   \
        -giant_move                    \
        -check_flip                    \
    -tlrc_base  ${refvol}              \
    -tlrc_NL_warp                      \
    -tlrc_NL_warped_dsets                                   \
        ${aw_dir}/a00_deob_warp2std_nsu.nii.gz              \
        ${aw_dir}/a00_deob_shft_al2std_mat.aff12.1D         \
        ${aw_dir}/a00_deob_shft_WARP.nii.gz                 \
    -html_review_style pythonic                             \
    -execute

So my guess was that the FOV orientation is lost in the centering process. So, when I applied afni_proc.py on these two images LONGER_e00_deob_RECEN.nii and a00_deob_ns_RECEN.nii.gz (the one seen on afni with the previous link) the movement parameters are wrong because the orientation of the two brains are differents.

${aw_dir}/a00_deob_warp2std_nsu.nii.gz              \
        ${aw_dir}/a00_deob_shft_al2std_mat.aff12.1D         \
        ${aw_dir}/a00_deob_shft_WARP.nii.gz

So I was looking to:
First, reorient the grid? image? orientation? (I don't know what is the appropriate word for that?) of the functional images on the anatomical to keep the same brain orientation.

Then, I will safely recenter and deoblique the images before @animal_warper and afni_proc.py as for the monkey of the first group.
Again, I am probably wrong on the origin of my problem but this is the explanation that has made sense to me.

Sorry again for the mess in my previous explanation,
I really hope that my explanations clear,

Thank you so much again!
Clément



Edited 1 time(s). Last edit at 02/21/2020 12:46PM by Doughboys.
Subject Author Posted

2 images in the same space

Doughboys February 20, 2020 04:50PM

Re: 2 images in the same space

ptaylor February 20, 2020 05:16PM

Re: 2 images in the same space

Doughboys February 20, 2020 05:35PM

Re: 2 images in the same space

ptaylor February 20, 2020 05:50PM

Re: 2 images in the same space

Doughboys February 20, 2020 06:05PM

Re: 2 images in the same space

ptaylor February 20, 2020 06:25PM

Re: 2 images in the same space

Doughboys February 20, 2020 07:10PM

Re: 2 images in the same space

ptaylor February 21, 2020 06:24AM

Re: 2 images in the same space

Doughboys February 21, 2020 10:38AM

Re: 2 images in the same space

Doughboys February 26, 2020 10:01AM