<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>FreesurferGoodies/AutomaticLabeling</title><revhistory><revision><revnumber>5</revnumber><date>2013-03-07 21:23:08</date><authorinitials>localhost</authorinitials><revremark>converted to 1.6 markup</revremark></revision><revision><revnumber>4</revnumber><date>2012-03-07 16:14:47</date><authorinitials>IanCharest</authorinitials></revision><revision><revnumber>3</revnumber><date>2012-03-07 16:14:29</date><authorinitials>IanCharest</authorinitials></revision><revision><revnumber>2</revnumber><date>2012-03-07 16:14:17</date><authorinitials>IanCharest</authorinitials></revision><revision><revnumber>1</revnumber><date>2012-03-07 16:14:05</date><authorinitials>IanCharest</authorinitials></revision></revhistory></articleinfo><screen><![CDATA[#
# this is an example of an automatic labeling script for the left hemisphere, 
# for the PPG that we have drawn on the study average cortical surface called "myAverage"
]]><![CDATA[
## variables
]]><![CDATA[
## Freesurfer directory
thePath='/imaging/yourusername/yourproject/subjects'
]]><![CDATA[
subjects=(
'CBUXXXXXX' \  
'CBUYYYYYY' \ 
)
]]><![CDATA[
## Processing:
]]><![CDATA[
nsubjects=${#subjects[*]}
lastsubj=`expr $nsubjects - 1`
]]><![CDATA[
for m in `seq 0 ${lastsubj}`
do
        echo "======================================================="
        echo " "
        echo " Computing hPPG cortex surface label left hemisphere"
        echo " "
        echo "======================================================="  
]]><![CDATA[
mri_label2label \
 --srcsubject myAverage \
 --srclabel ${thePath}/myAverage/label/lh.hPPG.label \
 --trgsubject ${subjects[m]} \
 --trglabel ${thePath}/${subjects[m]}/label/lh.hPPG.label \
 --hemi lh \
 --regmethod surface
]]><![CDATA[
done # subjects lh]]></screen></article>