FreesurferGoodies/batchcreateRegistrationFiles - MRC CBU Imaging Wiki

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
WHat wOrd is made by the captiaL lettErs?

location: FreesurferGoodies / batchcreateRegistrationFiles

# edit to your needs and save as batchcreateRegistrationFiles.csh in your favorite path location and run
# > sh batchcreateRegistrationFiles.csh

## variables

## Freesurfer directory


## Processing:

lastsubj=`expr $nsubjects - 1`

for m in `seq 0 ${lastsubj}`
        echo "======================================================="
        echo " "
        echo " Creating register.dat and v2r.dat files"
        echo " "
        echo "======================================================="
cd ${thePath}/${subjects[m]}/whereMySPMfilesAre
echo "the current directory is `pwd`"
tkregister2 \
 --mov ${thePath}/${subjects[m]}/whereMySPMfilesAre/mean*.nii \
 --s ${subjects[m]} \
 --regheader \
 --noedit \
 --reg register.dat 

mri_info ${thePath}/${subjects[m]}/whereMySPMfilesAre/mean*.nii --vox2ras-tkr --o v2r.dat
done # subjects