D99 atlas registration

Dear AFNI team,

Apologies if this is a silly question, I have not used AFNI before.

I would like to register a native space T1w macaque image to the D99 v2 atlas using the @animal_warper function. However, it seems that the D99_template.nii.gz is in a different space to the D99_atlas_v2.0.nii.gz. I have probably misunderstood but I was under the impression that @animal_warper uses the template image for registration with a native T1w, and then applies this transformation to the atlas image. I have run it nonetheless (command pasted below) and the atlas results actually seem okay at first glance, however I did notice that the old atlas and the macaque tutorial have the templates and atlas in the same space. Therefore I am wondering if this is making the script work harder than it needs to/ could affect the precision of the results?

The command I have run is:

@animal_warper -input my_T1.nii.gz -base …/Monkey_brains/D99_v2.0_dist/D99_template.nii.gz -atlas …/Monkey_brains/D99_v2.0_dist/D99_atlas_v2.0.nii.gz -outdir test_dir

Many thanks!

Hi, Sam-

You might have already seen these pages, but here is a bit about the D99 v2.0 that you are using:
… and we also have some animal MRI processing demos:
… that include running both @animal_warper and afni_proc.py on nonhuman primate data (macaques in the current cases, but similar considerations apply to other species, too)—the latter is useful if you have FMRI data.

I assume you got your template and anatomical from the same download (see the first link above for different ways to get the data if you want to be sure), but you can run this command to check that multiple datasets are on the same grid:

3dinfo -same_all_grid -prefix D99_atlas_v2.0.nii.gz D99_template.nii.gz

If they are all on the same grid, you should see five 1s to the left of each filename (each one denoting that a given property does match—see 3dinfo’s help about the properties checked).

The command you ran seems fine—indeed, the input T1w volume gets aligned to the base/reference template, and then there are warps created to send any other information from the input T1w space to the template space, as well as vice versa. So you should end up with a warped copy of the atlas in the same space as your input T1w volume.

There should be a QC/ directory in your output that shows various quality control images of processing; those are listed and described in the help, in this section:
and the various output volumes are described here:

Would you mind sharing one of the alignment images, and point out where the alignment issue(s) are?

Note that a slightly larger version of your command might look like:

@animal_warper                                 \
    -input            my_T1.nii.gz                  \
    -input_abbrev     INPT1               \
    -base             ../Monkey_brains/D99_v2.0_dist/D99_template.nii.gz                  \
    -base_abbrev      D99TEMPL                \
    -atlas_followers  ../Monkey_brains/D99_v2.0_dist/D99_atlas_v2.0.nii.gz                    \
    -atlas_abbrevs    D99ATL                \
    -outdir           test_dir                     \

… to assign abbreviations for each of the datasets you are inputting, maybe making the output datasets a little more easily recognizable. The “-ok_to_exist” flag is useful if you want to add more data when running it, such as if there were another atlas in that template space.

And welcome to using AFNI!



That’s great, thank you for the super useful reply. They are indeed on the same grid, I was confused because when opening in fsleyes they were not aligned, but I guess I should avoid mixing software packages!

The outputs look okay to me at first glance, I’m not 100% what I should be looking for but I have attached some of the QC images. Our group is interested mostly in the subiculum and CA1, so we will specifically double check these in more detail before running our analyses. Just to check, I used FLIRT originally to move our T1w images to be roughly in the same space as the atlas images, is this okay? I did that because animal_warper was failing before (I think on the centering stage) and this seemed to fix it.

Many thanks, the atlas a great resource.