Dear Freesurfer users, I had a question regarding how to combine multiple register.dat files into one file. Essentially, I have a T1 image which I created masks for in native space. I then import the T1 image into freesurfer and run through the recon-all pipeline. Subsequently, I use bbregister in order to register my last EPI timepoint to the T1 image and generate the register.dat file and when viewing the files the overlap looked great.
1) mri_convert -i m${sub}.T1.nii --in_type nii -o ${sub}.T1.FS.mgz --out_type mgz 2) bbregister --s ${sub}_FS --mov $bbrest_file --reg ${sub}_RS_register.dat --init-header --bold --frame $NP_last --nearest --template-out ${sub}.RS.template.nii 3) tkregister2 --mov EP_001.RS.template.nii --reg EP_001_RS_register.dat --surf I wanted to take my brain (freesurfer) and masks(native space pre-freesurfer) and the aseg file and then register this to the EPI scan and used the following commands: 4) Convert mask to freesurfer format mri_convert -i ${loc_dir}/spm/c1${sub}.T1.nii --in_type nii -o ${out_dir}/__c1${sub}.T1.mgz --out_type mgz 5) Take mask to brain freesurfer formatted space mri_vol2vol --mov ${out_dir}/__c1${sub}.T1.mgz --targ $SUBJECTS_DIR/${sub}_FS/mri/brainmask.mgz --regheader --o ${out_dir}/__c1${sub}.T1.FS.mgz --no-save-reg --nearest 6) Apply the inverse transforms of EPI to Anatomical so that the anatomical scans and masks are now registered with the EPI scan in native space (pre-freesurfer file). mri_vol2vol --mov $loc_dir/spm/m${sub}.T1.nii --targ $SUBJECTS_DIR/${sub}_FS/mri/brain.mgz --o $out_dir/__brain_FS2spm.nii --inv --no-save-reg --reg $out_dir/${sub}_RS_register.dat mri_vol2vol --mov $loc_dir/spm/m${sub}.T1.nii --targ $SUBJECTS_DIR/${sub}_FS/mri/aseg.mgz --o $out_dir/__aseg_FS2spm.nii --inv --reg $out_dir/${sub}_RS_register.dat --interp nearest mri_vol2vol --mov $loc_dir/spm/m${sub}.T1.nii --targ ${out_dir}/__c1${sub}.T1.FS.mgz --o $out_dir/__c1${sub}.T1.FS2spm.nii --inv --no-save-reg --reg $out_dir/${sub}_RS_register.dat --interp nearest The steps above work great when the T1, generated masks and EPI were all acquired plumb (no oblique angle). I tried using the steps for when the T1 (10.144 deg from plumb) and EPI (12.44 deg from plumb) were taken at 2 different oblique angles and the images did not register correctly when going back to native space. I essentially would not be able to apply the inverse register.dat directly to the aseg and mask files because when I did they did not look oriented correctly in afni (I did also try 3dWarp -deoblique on the resulting freesurfer files but this did not work for the oblique images). I wanted to see if I created two registration.dat files (One for EPI to Freesurfer's brain.mgz and another for the masks to Freesurfers brain.mgz) and combine these transforms into one file which I can pass to the native space images via commands in 6) so that they transforms are correct. OR am I wrong and there is a simpler way to achieve this. Please specify the commands to use in either case. Thanks, Ajay
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer 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 Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.