External Email - Use Caution
_______________________________________________Try to convert the register.dat to lta using the following command, and replace register.dat in mri_vol2vol with the converted lta
lta_convert --inreg register.dat --outlta register.lta --src <> --trg <>
Yujing
From: Ramesh Babu <mgrameshbabu2013@gmail.com>
Sent: Wednesday, November 19, 2025 6:25 PM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: [Freesurfer] Re: DTI Registration issue
External Email - Use Caution
Dear Experts,
Sorry repeating the question. I am expecting to get some reply. My question may be lengthier but need for clarity.
I am analyzing my DTI scans in Ubuntu 22 LTS with FreeSurfer 8.1. I am facing a registration issue when I run the following script.
# Setting Up Environment
BASE_DIR="/mnt/data_analysis/freesurfer_data/sr_dti_analysis/subj02"
SUBJECTS_DIR="$BASE_DIR"
SUBJECT="subj02_fs"
export SUBJECTS_DIR SUBJECT
# Define Input and Output Subfolders
T1_DICOM="$BASE_DIR/t1_SPGR"
DTI_DICOM="$BASE_DIR/epi_dti"
T1_NIFTI="$BASE_DIR/t1_nifti"
DTI_NIFTI="$BASE_DIR/dti_nifti"
DTI_DIR="$BASE_DIR/$SUBJECT/dtrecon"
MRI_DIR="${SUBJECTS_DIR}/${SUBJECT}/mri"
OUTDIR="$DTI_DIR"
# Resampling subject's wmparc, aparc+aseg, and brain volumes to diffusion space
for vol in wmparc aparc+aseg brain; do
vol_file="${SUBJECTS_DIR}/${SUBJECT}/mri/${vol}.mgz"
vol2diff="${OUTDIR}/${vol}2diff.mgz"
cmd=(mri_vol2vol --mov "${OUTDIR}/lowb.nii" \
--targ "$vol_file" \
--inv \
--interp nearest \
--o "$vol2diff" \
--reg "${OUTDIR}/register.dat" \
--no-save-reg)
echo "${cmd[@]}"
"${cmd[@]}"
done
# Mask FA, ADC, ICV volumes using wmparc2diff.mgz
for vol in fa adc ivc; do
cmd=(mri_mask "${OUTDIR}/${vol}.nii" \
"${SUBJECTS_DIR}/${SUBJECT}/mri/wmparc2diff.mgz" \
"${OUTDIR}/${vol}-masked.mgz")
echo "${cmd[@]}"
"${cmd[@]}"
done
# Resampling masked volumes to MNI space
interp="trilin"
template="$FREESURFER_HOME/average/mni152/mri/brain.mgz" # MNI template
morph="${SUBJECTS_DIR}/${SUBJECT}/mri/transforms/${SUBJECT}_to_mni.m3z" # Example morph
for vol in fa adc ivc; do
vol_file="${OUTDIR}/${vol}-masked.mgz"
outvol="${OUTDIR}/${vol}-masked_MNI.mgz"
cmd=(mri_vol2vol --targ "$template" \
--m3z "$morph" \
--noDefM3zPath \
--reg "${OUTDIR}/register.dat" \
--mov "$vol_file" \
--o "$outvol" \
--interp "$interp" \
--no-save-reg)
echo "${cmd[@]}"
"${cmd[@]}"
done
Error:
INFO: This REGISTER_DAT transform is valid only for volumes between COR types with c_(r,a,s) = 0. /mnt/data_analysis/freesurfer_data/sr_dti_analysis/subj02/subj02_fs/dtrecon/lowb.nii.gz /mnt/data_analysis/freesurfer_data/sr_dti_analysis/subj02/subj02_fs/mri/wmparc.mgz error: File exists error: LTAchangeType: src geometry must be valid
Then I did the BB registration separately.
bbregister --s subj02_fs \
--mov $DTI_DIR/lowb.nii.gz \
--dti \
--init-fsl \
--reg $DTI_DIR/register.dat
Still, I am facing the same issue.
Please provide some solutions.
Best
Ramesh
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> .