External Email - Use Caution
_______________________________________________External Email - Use Caution
Freesurfer8.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" ) thenecho "[INFO] Creating LTA for $subj (brain -> MNI)..."mri_robust_register \--mov "$brain" \--dst "$MNI_BRAIN" \--lta "$lta" \--cost NMI --satitelseecho "[INFO] Using existing LTA: $lta"endif
# --- Step 2: Warp HCPex atlas (MNI) into subject T1 using inverse of that LTAecho "[INFO] Warping HCPex atlas to subject T1 for $subj..."
# Bake src/trg geometry into the LTA so mri_vol2vol 8.0.0 applies it correctlyset lta_fixed = "${mri_dir}/MNI2009c_from_${subj}.fixed.lta"if ( ! -e "$lta_fixed" ) thenlta_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 LTAmri_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://mail.nmr.mgh.harvard.edu/mailman3/lists/freesurfer@nmr.mgh.harvard.edu/
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://www.massgeneralbrigham.org/complianceline <https://www.massgeneralbrigham.org/complianceline> .
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.