Alignment issue

Hi all,

I am processing resting state data using AFNI version 21.2.04 (‘Nerva’). Prior to preprocessing, I aligned the centers of the anatomical and functional images to the MNI*2009_SSW template. I ran the centered anatomical images through SSwarper and recon-all and used the following code to process the functional data:                                                                                                            \
                 -subj_id ${sid} -script proc.${sid} -scr_overwrite -out_dir ${sid}.results                             \
                 -blocks despike tshift align tlrc volreg blur mask scale                                               \
                     regress                                                                                            \
                 -radial_correlate_blocks tcat volreg                                                                   \
                 -copy_anat ${ss_dir}/anatSS.${sid}.nii                                                                 \
                 -anat_has_skull no                                                                                     \
                 -anat_follower anat_w_skull anat  ${ss_dir}/anatU.${sid}.nii                                           \
                 -anat_follower_ROI aaseg anat ${fs_dir}/aparc.a2009s+aseg.nii.gz                                       \
                 -anat_follower_ROI aeseg epi ${fs_dir}/aparc.a2009s+aseg.nii.gz                                        \
                 -anat_follower_ROI FSvent epi ${fs_dir}/fs_ap_latvent.nii.gz                                           \
                 -anat_follower_ROI FSWe epi ${fs_dir}/fs_ap_wm.nii.gz                                                  \
                 -anat_follower_erode FSvent FSWe                                                                       \
                 -dsets ${raw_epi}                                                                                      \
                 -tcat_remove_first_trs 4                                                                               \
                 -tshift_opts_ts -tpattern ${tpattern}                                                                      \
                 -align_opts_aea -cost lpc+ZZ -giant_move -check_flip                                                   \
                 -tlrc_base MNI152_2009_template_SSW.nii.gz                                                             \
                 -tlrc_NL_warp                                                                                          \
                 -tlrc_NL_warped_dsets ${ss_dir}/anatQQ.${sid}.nii ${ss_dir}/anatQQ.${sid}.aff12.1D                     \
                     ${ss_dir}/anatQQ.${sid}_WARP.nii                                                                   \
                 -volreg_align_to MIN_OUTLIER                                                                           \
                 -volreg_align_e2a                                                                                      \
                 -volreg_tlrc_warp                                                                                      \
                 -blur_size 4                                                                                           \
                 -mask_epi_anat yes                                                                                     \
                 -regress_motion_per_run                                                                                \
                 -regress_ROI_PC FSvent 3                                                                               \
                 -regress_ROI_PC_per_run FSvent                                                                         \
                 -regress_make_corr_vols aeseg FSvent                                                                   \
                 -regress_anaticor_fast                                                                                 \
                 -regress_anaticor_label FSWe                                                                           \
                 -regress_censor_motion 0.3										\
 	      	 -regress_censor_outliers 0.1										\
                 -regress_apply_mot_types demean deriv                                                                  \
                 -regress_est_blur_epits                                                                                \
                 -regress_est_blur_errts                                                                                \
                 -html_review_style pythonic

I am having two issues with alignment:

  1. These data are from older participants (60+ years). As you can see in the attached screenshot (csf.png) showing the anat_final edges overlayed on the final_epi_vr_base_min_outlier, there is quite a bit of bright data (CSF) outside of the edges of the anat (e.g., 71S, 21L, 19R). The edges of the gray matter of the anat seem to align well with the edges of the gray matter in the EPI. I wanted to check in to see if you had comments on these bright distortions and if this is problematic for analysis (e.g. extracting mean timeseries from 90 ROIs in MNI space to form functional connectivity matrix).
  2. Some images in the dataset are having issues with alignment of the cerebellum/brainstem between the anat and EPI. For example, in slice 1L, you can see that the brain stem is slightly right shifted compared to the anat_final edge overlay. I have attempted to run different cost functions (e.g., lpa, nmi) and have changed or removed the move option (e.g., big_move) but this has not alleviated this issue. Do you have any suggestions on how to adjust align_epi_anat to fix this issue?

Thank you!

This actually looks pretty good. The bright CSF sometimes makes for confusion because it extends outside the brain. If you overlay the EPI data on top of the full anatomical data with skull, then you can see where the CSF should be.

Hi Daniel,

Thanks for your reply. Ok, sounds good. I’ve attached an image with the raw epi overlay on the raw anat and you can see this bright signal is indeed CSF. For my analysis, I plan to extract the mean time series from a set of 90 ROIs registered in MNI space to form a functional connectivity matrix. Would you recommend that I mask out the CSF outside of the warped anatomical brain boundary using the mask_anat or mask_epi_anat image prior to extracting the time series?

Additionally, do you have any suggestions for the images where the brainstem is slightly off? I’ve attached an image here demonstrating the alignment issue with the brainstem/cerebellum. It seems in these instances that the other regions of the brain are relatively well aligned (e.g., ventricles, cortical gyri/sulci). Though I do have some regions of interest in the cerebellum where this might cause a slight issue. Would you suggest I attempt to adjust the alignment of these images to fix the brainstem issue or would you think this is ok to move forward?


Depending on exactly what you want to do, the typical and simple method is to do what you have said and move all ROIs at the same time. You can input CSF/Ventricles/White matter as input ROIs for Brainstem and cerebellum are often more difficult to align across subjects while still trying to align the cerebrum at the same time. You can do these as separate alignments if that’s important to you.The SUIT cerebellum atlas and template have their own template you can use for that purpose.