I posted earlier this week about using align_epi_anat.py because I am having trouble getting that to work. While I’m still working that out option, I decided to use afni_proc.py instead to accomplish the same outcome. Essentially I want to perform volume registration on the epi image, align the epi to the T1, the T1 to the atlas, and end up with a volume-registered epi in atlas space. This is the command I set up based on one of the examples in the afni_proc.py page:
My input resting state dataset has resolution of 1.797 x 1.797 x 4.000 mm. The input T1 has resolution of 1.00 x 1.00 x 1.00 mm. The MNI_avg152T1+trlc atlas has resolution of 2.00 x 2.00 x 2.00mm. My understanding is that the volume-registered epi in atlas space is the output file called pb01.sub1.r01.volreg+tlrc (is this correct?). I thought that this volume-registered epi-in-atlas space would have been resampled along the way to match the resolution of the atlas (2x2x2). However, when I run 3dinfo on the output image (pb01.subj1.r01.volreg+tlrc), the resolution is 1.75 x 1.75 x 1.75mm. I’m confused why the resolution wouldn’t match the atlas?
I’m confused. Output from this command includes sub1_T1_ns+tlrc BRIK and HEAD files, which I take to be the ‘no skull’ version of the T1 in atlas space. When I run the align_epi_anat.py (which ultimately fails to move the epi into atlas space), it outputs a sub1_T1+tlrc image without ‘ns’ in the name. Are these essentially the same output files but called different things? Because when I look at them in afni they both are skull-stripped.
Does the order in which the blocks are specified matter? Like if the -blocks flag was followed by ‘volreg align tlrc’, would the order of these preprocessing steps be performed differently? I think conceptually it seems like volreg should be done first, but I followed examples on the afni_proc.py documentation page in which volreg came after align and tlrc.
I never heard back to this question but I have a few more questions about running afni_proc.py with the -volreg_align_e2a and _volreg_tlrc_warp options.
If the registration of epi to the atlas is not great, I’m trying to figure out how you diagnose if it’s a problem with the anat to tlrc, or the epi to anat. Is there an output file that is the epi aligned to the anat in +orig space? I don’t see any that would match that, but curious. If not, can you recommend how to re-create that with the output files that exist?
-Is the registration of epi to T1 done with 6-degrees of freedom, and the t1 to atlas with 12 (affine)? Is there a non-linear warping option?
The final resolution of the EPI data should depend upon the original resolution of the EPI data, not the resolution of the anatomical template. And note that 2 mm^3 is not a good resolution for a template (but that is a separate issue).
afni_proc.py chooses a truncated voxel size, basend on the original resolution, so that a. one does not lose resolution through motion correction and other transformaions, and b. so that the final resolution is basically like the original one.
Historically, matching the atlas resolution is an unnecessary and misleading scaling of the voxel size.
I do not see a reason for a sub1_T1+tlrc dataset to exist, not from the afni_proc.py command that you have shown. Are you sure about the command that was run? If you need to, please mail me the proc script.
Yes, the order matters. You are specifying the order that afni_proc.py puts the blocks in (again, look at the script). While the tranformations on the EPI should come in the order ‘volreg align tlrc’, afni_proc.py wants to know the anat and tlrc transformations by the time the volreg block is run. That way it can put them together without multiple interpolations (blurring) of the EPI data.
The EPI is not directly registered to the atlas. The EPI is registered to the T1, and the T1 is registered to the atlas. See if you can tell with of those is not good and we can refine the discussion.
The orig space registration can be checked by comparing the vr_base dataset with the T1_junk dataset. That ‘junk’ is the T1 aligned to the EPI (which is later inverted, to go from the EPI to the T1).
The EPI/T1 alignment is a 12-parameter affine. You can align the T1 to the template with a non-linear transformation by adding -tlrc_NL_warp.
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.