External Email - Use Caution
Hi Carly,
This link will take you to the github page for HCPex - in the issues (link below), the authors provide HCPMMP annotation files for FSaverage.
https://secure-web.cisco.com/1CkQjdLgy9g_NqbIkCmPv83fXvDlxbKHhMJzOGKVYq_JiMC...
Good luck.
Shawn
On Tue, Mar 10, 2026 at 7:57 PM Carly McIntyre-Wood mcintc10@mcmaster.ca wrote:
External Email - Use CautionFreesurfer8.0
Hi all,
I’m trying to get stats using the HCPex atlas and I’m having issues with creating the HCPex_in_T1.mgz file. When I open it in Freeview it is misaligned or missing portions. I’m wondering if anyone can offer any advice, or may even know of an HCPex annot file in fsaverage space to avoid all of this. This is after several iterations of unsuccessful scripts, so perhaps there is a much simpler way to attempt this. Any help is greatly appreciated!
Thank you, Carly
Script:
set subject_list = ( 2090 )
foreach subj ( $subject_list )
echo "==== Processing subject $subj ===="
set subj_dir = "${SUBJECTS_DIR}/${subj}" set mri_dir = "${subj_dir}/mri" set stats_dir = "${subj_dir}/stats"
set t1 = "${mri_dir}/T1.mgz" set brain = "${mri_dir}/brain.mgz" set seg = "${mri_dir}/HCPex_in_T1.mgz" set stats = "${stats_dir}/HCPex_1mm.stats" set lta = "${mri_dir}/MNI2009c_from_${subj}.lta"
# --- Step 1: Build (or reuse) LTA transform: subject brain -> MNI brain
if ( ! -e "$lta" ) then echo "[INFO] Creating LTA for $subj (brain -> MNI)..." mri_robust_register \ --mov "$brain" \ --dst "$MNI_BRAIN" \ --lta "$lta" \ --cost NMI --satit else echo "[INFO] Using existing LTA: $lta" endif
# --- Step 2: Warp HCPex atlas (MNI) into subject T1 using inverse of that LTA echo "[INFO] Warping HCPex atlas to subject T1 for $subj..."
# Bake src/trg geometry into the LTA so mri_vol2vol 8.0.0 applies it correctly set lta_fixed = "${mri_dir}/MNI2009c_from_${subj}.fixed.lta" if ( ! -e "$lta_fixed" ) then lta_convert \ --inlta "$lta" \ --src "$MNI_BRAIN" \ --trg "$brain" \ --outlta "$lta_fixed" endif
mri_vol2vol \ --mov "$HCPex_ATLAS" \ --targ "$t1" \ --lta "$lta_fixed" \ --inv \ --interp nearest \ --o "$seg"
# Step 3: Warp HCPex atlas (MNI) into subject T1 using inverse LTA mri_vol2vol \ --mov "$HCPex_ATLAS" \ --targ "$t1" \ --lta "$lta_fixed" \ --inv \ --interp nearest \ --o "$seg"
end _______________________________________________ Freesurfer mailing list -- freesurfer@nmr.mgh.harvard.edu To unsubscribe send an email to freesurfer-leave@nmr.mgh.harvard.edu
https://secure-web.cisco.com/1QdlF0I0N_FGU4MsD_EE3xdljM9i9a64EXsh236e2Lzhel5... The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at https://secure-web.cisco.com/1FHEZd_gt3P4A0pZXpNnP1g-rfZZ6trz3okt8xzdsAKJj_o... < https://secure-web.cisco.com/1FHEZd_gt3P4A0pZXpNnP1g-rfZZ6trz3okt8xzdsAKJj_o... . Please note that this e-mail is not secure (encrypted). If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately. Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail.
freesurfer@nmr.mgh.harvard.edu