[brain1@localhost ~]$ reg-feat2anat --debug --featdir '/home/brain1/fMRI/Homunculus/P121/Experiment.feat' --subject P121
set echo = 1 ;
set debug = 1 ;
set debug = 1
breaksw
breaksw

end
end
while ( $#argv != 0 )
while ( 4 != 0 )

set flag = $argv[1] ; shift ;
set flag = --featdir
shift

switch ( $flag )
switch ( --featdir )
if ( $#argv == 0 ) goto arg1err ;
if ( 3 == 0 ) goto arg1err
set FeatDir = $argv[1] ; shift ;
set FeatDir = /home/brain1/fMRI/Homunculus/P121/Experiment.feat
shift
breaksw
breaksw

end
end
while ( $#argv != 0 )
while ( 2 != 0 )

set flag = $argv[1] ; shift ;
set flag = --subject
shift

switch ( $flag )
switch ( --subject )
if ( $#argv == 0 ) goto arg1err ;
if ( 1 == 0 ) goto arg1err
set subject = $argv[1] ; shift ;
set subject = P121
shift
breaksw
breaksw

end
end
while ( $#argv != 0 )
while ( 0 != 0 )

goto parse_args_return ;
goto parse_args_return


goto check_params ;
goto check_params

if ( $DoBBR ) then
if ( 1 ) then
which bbregister > /dev/null
which bbregister
if ( $status ) then
if ( 0 ) then
endif
endif

if ( $#FeatDir == 0 ) then
if ( 1 == 0 ) then
if ( ! -e $FeatDir ) then
if ( ! -e /home/brain1/fMRI/Homunculus/P121/Experiment.feat ) then
if ( ! $manual ) then
if ( ! 0 ) then
if ( $#subject == 0 ) then
if ( 1 == 0 ) then
else
else
if ( $?SUBJECTS_DIR == 0 ) then
if ( 1 == 0 ) then
if ( ! -e $SUBJECTS_DIR ) then
if ( ! -e /usr/local/freesurfer/subjects ) then
if ( ! -e $SUBJECTS_DIR/$subject ) then
if ( ! -e /usr/local/freesurfer/subjects/P121 ) then
if ( $manxfm != "func2anat" && $manxfm != "std2anat" && $manxfm != "func2std" ) then
if ( func2anat != func2anat && func2anat != std2anat && func2anat != func2std ) then


goto check_params_return ;
goto check_params_return

if ( $?DEV == 0 ) set DEV = "" ;
if ( 0 == 0 ) set DEV = 
set DEV = 

set TKR = tkregister2
set TKR = tkregister2
if ( $usedev ) set TKR = $DEV/$TKR/$TKR
if ( 0 ) set TKR = /tkregister2/tkregister2
if ( ! $manual ) set TKR = $TKR"_cmdl"
if ( ! 0 ) set TKR = tkregister2_cmdl
set TKR = tkregister2_cmdl

set MM = mri_matrix_multiply
set MM = mri_matrix_multiply
if ( $usedev ) set MM = $DEV/$MM/$MM
if ( 0 ) set MM = /mri_matrix_multiply/mri_matrix_multiply

echo FeatDir is $FeatDir
echo FeatDir is /home/brain1/fMRI/Homunculus/P121/Experiment.feat
FeatDir is /home/brain1/fMRI/Homunculus/P121/Experiment.feat
mkdir -p $FeatDir/reg/freesurfer/tmp
mkdir -p /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp

set exf2std_fslmat = $FeatDir/reg/example_func2standard.mat
set exf2std_fslmat = /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/example_func2standard.mat
if ( ! -e $exf2std_fslmat ) then
if ( ! -e /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/example_func2standard.mat ) then


set exfbase = $FeatDir/example_func
set exfbase = /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func
if ( -e $exfbase.nii.gz ) then
if ( -e /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz ) then
setenv FSLOUTPUTTYPE NIFTI_GZ
setenv FSLOUTPUTTYPE NIFTI_GZ
set fslext = nii.gz ;
set fslext = nii.gz
endif
endif
if ( -e $exfbase.nii ) then
if ( -e /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii ) then
if ( -e $exfbase.img ) then
if ( -e /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.img ) then
if ( $#fslext == 0 ) then
if ( 1 == 0 ) then
set tempvol = $FeatDir/example_func.$fslext
set tempvol = /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz
echo "template volume is $tempvol"
echo template volume is /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz
template volume is /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz

set anat2exf_regdat = $FeatDir/reg/freesurfer/anat2exf.register.dat
set anat2exf_regdat = /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat
set anat2std_regdat = $FeatDir/reg/freesurfer/anat2std.register.dat
set anat2std_regdat = /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat
set std2anat_fslmat = $FeatDir/reg/freesurfer/std2anat.fsl.mat
set std2anat_fslmat = /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/std2anat.fsl.mat
set exf2anat_init_fslmat = $FeatDir/reg/freesurfer/exf2anat.init.fsl.mat
set exf2anat_init_fslmat = /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.init.fsl.mat
set exf2anat_fslmat = $FeatDir/reg/freesurfer/exf2anat.fsl.mat
set exf2anat_fslmat = /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.fsl.mat
set std2exf_regdat = $FeatDir/reg/freesurfer/std2exf.register.dat
set std2exf_regdat = /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/std2exf.register.dat
set exf2std_regdat = $FeatDir/reg/freesurfer/exf2std.register.dat
set exf2std_regdat = /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2std.register.dat
set segregdat = $FeatDir/reg/freesurfer/reg.bbr.dat
set segregdat = /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg.bbr.dat
set stdbrain = $FeatDir/reg/standard.$fslext
set stdbrain = /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz

set refvolcor = $SUBJECTS_DIR/$subject/mri/$anatvol.mgz
set refvolcor = /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz
if ( ! -e $refvolcor ) then
if ( ! -e /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz ) then


if ( $manual && $manxfm == func2anat ) then
if ( 0 && func2anat == func2anat ) then


if ( $manual && $manxfm == std2anat ) then
if ( 0 && func2anat == std2anat ) then


if ( $manual && $manxfm == func2std ) then
if ( 0 && func2anat == func2std ) then


set LF = $FeatDir/reg/freesurfer/reg-feat2anat.log
set LF = /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
if ( -e $LF ) mv $LF $LF.bak
if ( -e /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log ) mv /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log.bak
mv /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log.bak
echo log file is $LF
echo log file is /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
log file is /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
date | tee -a $LF
date
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
Sun Jun  8 11:36:04 EDT 2014
pwd | tee -a $LF
pwd
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
/home/brain1
echo $0 | tee -a $LF
echo /usr/local/freesurfer/bin/reg-feat2anat
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
/usr/local/freesurfer/bin/reg-feat2anat
echo $cmdargs | tee -a $LF
echo --debug --featdir /home/brain1/fMRI/Homunculus/P121/Experiment.feat --subject P121
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
--debug --featdir /home/brain1/fMRI/Homunculus/P121/Experiment.feat --subject P121
uname -a | tee -a $LF
uname -a
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
Linux localhost.localdomain 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux


set refvolcor = $SUBJECTS_DIR/$subject/mri/$anatvol.mgz
set refvolcor = /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz
if ( ! -e $refvolcor ) then
if ( ! -e /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz ) then




if ( $fslext == img ) then
if ( nii.gz == img ) then

mri_info --o /tmp/reg-feat2anat.rasgood.$$ --ras_good $FeatDir/example_func.$fslext > & /dev/null
mri_info --o /tmp/reg-feat2anat.rasgood.8606 --ras_good /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz
set exf_ras_good = `cat /tmp/reg-feat2anat.rasgood.$$` ;
set exf_ras_good = `cat /tmp/reg-feat2anat.rasgood.$$`
cat /tmp/reg-feat2anat.rasgood.8606
endif
endif
echo "example_func ras_good_flag $exf_ras_good" | tee -a $LF
echo example_func ras_good_flag 1
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
example_func ras_good_flag 1
if ( $exf_ras_good ) then
if ( 1 ) then
echo "-------------------------------------------------------" | tee -a $LF
echo -------------------------------------------------------
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
-------------------------------------------------------
echo "Initializing exf2anat with header" | tee -a $LF
echo Initializing exf2anat with header
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
Initializing exf2anat with header
set cmd = ( $TKR --targ $refvolcor --mov $FeatDir/example_func.$fslext --reg $anat2exf_regdat.init --fslregout $exf2anat_init_fslmat --regheader )
set cmd = ( tkregister2_cmdl --targ /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat.init --fslregout /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.init.fsl.mat --regheader )
if ( ! $debug ) set cmd = ( $cmd --noedit )
if ( ! 1 ) set cmd = ( tkregister2_cmdl --targ /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat.init --fslregout /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.init.fsl.mat --regheader --noedit )
echo $cmd | tee -a $LF
echo tkregister2_cmdl --targ /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat.init --fslregout /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.init.fsl.mat --regheader
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
tkregister2_cmdl --targ /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat.init --fslregout /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.init.fsl.mat --regheader
$cmd | tee -a $LF
tkregister2_cmdl --targ /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat.init --fslregout /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.init.fsl.mat --regheader
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
tkregister_tcl /usr/local/freesurfer/tktools/tkregister2.tcl
target  volume /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz
movable volume /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz
reg file       /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat.init
LoadVol        0
ZeroCRAS       0
$Id: tkregister2.c,v 1.121.2.1 2011/03/28 20:25:16 greve Exp $
Diagnostic Level -1
INFO: loading target /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz
Ttarg: --------------------
-1.000   0.000   0.000   128.000;
 0.000   0.000   1.000  -128.000;
 0.000  -1.000   0.000   128.000;
 0.000   0.000   0.000   1.000;
INFO: loading movable /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz
Tmov: --------------------
-1.875   0.000   0.000   120.000;
 0.000   0.000   4.000  -72.000;
 0.000  -1.875   0.000   120.000;
 0.000   0.000   0.000   1.000;
mkheaderreg = 1, float2int = 0
Computing reg from header (and possibly input matrix)
---- Input registration matrix (computed) --------
 1.000   0.000   0.000   0.000;
 0.000  -0.074   0.997  -0.161;
 0.000  -0.997  -0.074   2.052;
 0.000   0.000   0.000   1.000;
---------------------------------------
---- Input registration matrix --------
 1.000   0.000   0.000   0.000;
 0.000  -0.074   0.997  -0.161;
 0.000  -0.997  -0.074   2.052;
 0.000   0.000   0.000   1.000;
Determinant 1
subject = subject-unknown
RegMat ---------------------------
 1.000   0.000   0.000   0.000;
 0.000  -0.074   0.997  -0.161;
 0.000  -0.997  -0.074   2.052;
 0.000   0.000   0.000   1.000;
FSLOUTPUTTYPE NIFTI_GZ 
tkreg2FSL: mov det = -14.0625, ref det = -1
if ( $status ) exit 1 ;
if ( 0 ) exit 1
else
else
set outvol = $FeatDir/reg/freesurfer/tmp/exf-in-anat
set outvol = /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/exf-in-anat

if ( ! $UseSPM ) then
if ( ! 0 ) then

set cmd = ( fslregister --s $subject --reg $anat2exf_regdat --mov $tempvol --dof $dof --bins $bins --cost $cost --fslmat $exf2anat_fslmat --fsvol $anatvol --maxangle $maxangle --initfslmat $exf2anat_init_fslmat --tmp $FeatDir/reg/freesurfer/tmp --out $outvol.$fslext )
set cmd = ( fslregister --s P121 --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --dof 6 --bins 256 --cost corratio --fslmat /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.fsl.mat --fsvol brainmask --maxangle 90 --initfslmat /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.init.fsl.mat --tmp /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp --out /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/exf-in-anat.nii.gz )
if ( $DoBETFunc ) set cmd = ( $cmd --betfunc )
if ( 0 ) set cmd = ( fslregister --s P121 --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --dof 6 --bins 256 --cost corratio --fslmat /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.fsl.mat --fsvol brainmask --maxangle 90 --initfslmat /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.init.fsl.mat --tmp /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp --out /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/exf-in-anat.nii.gz --betfunc )
echo "" | tee -a $LF
echo 
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log

echo $cmd | tee -a $LF
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
echo fslregister --s P121 --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --dof 6 --bins 256 --cost corratio --fslmat /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.fsl.mat --fsvol brainmask --maxangle 90 --initfslmat /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.init.fsl.mat --tmp /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp --out /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/exf-in-anat.nii.gz
fslregister --s P121 --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --dof 6 --bins 256 --cost corratio --fslmat /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.fsl.mat --fsvol brainmask --maxangle 90 --initfslmat /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.init.fsl.mat --tmp /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp --out /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/exf-in-anat.nii.gz
$cmd | tee -a $LF
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
fslregister --s P121 --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --dof 6 --bins 256 --cost corratio --fslmat /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.fsl.mat --fsvol brainmask --maxangle 90 --initfslmat /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.init.fsl.mat --tmp /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp --out /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/exf-in-anat.nii.gz

Log file is /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat.fslregister.log

Sun Jun  8 11:36:05 EDT 2014
--s P121 --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --dof 6 --bins 256 --cost corratio --fslmat /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.fsl.mat --fsvol brainmask --maxangle 90 --initfslmat /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.init.fsl.mat --tmp /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp --out /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/exf-in-anat.nii.gz
$Id: fslregister,v 1.34.2.1 2011/03/28 20:35:36 greve Exp $
localhost.localdomain
Linux localhost.localdomain 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux
nIters 1
--------------------------------------
/home/brain1
mri_convert ERROR: could not determine file for /usr/local/freesurfer/subjects/P121/mri/ERROR: /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/refvol.fslregister.nii
mri_convert ERROR: could not determine file for /usr/local/freesurfer/subjects/P121/mri/ERROR: /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/refvol.fslregister.nii 

mri_convert: extra arguments ("not" and following)

type mri_convert -u for usage

--------------------------------------
/home/brain1
mri_convert /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/movvol.fslregister.nii --frame 0
mri_convert /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/movvol.fslregister.nii --frame 0 
$Id: mri_convert.c,v 1.179.2.2 2011/05/16 20:53:47 greve Exp $
reading from /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz...
TR=2000.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, 0.997259, 0.0739863)
k_ras = (0, -0.0739863, 0.997259)
keeping frame 0
writing to /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/movvol.fslregister.nii...
Mov determinant is -14.0625
Sun Jun  8 11:36:06 EDT 2014
/home/brain1
flirt.fsl -ref /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/refvol.fslregister.nii -in /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/movvol.fslregister.nii -bins 256 -cost corratio -dof 6 -searchrx -90 90 -searchry -90 90 -searchrz -90 90 -verbose 0 -omat /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/fslmat0.trans.mat -schedule /usr/local/fsl/etc/flirtsch/xyztrans.sch -init /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.init.fsl.mat
** ERROR (nifti_image_read): failed to find header file for '/home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/refvol.fslregister'
** ERROR: nifti_image_open(/home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/refvol.fslregister): bad header info
Error: failed to open file /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/refvol.fslregister
ERROR: Could not open image /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/refvol.fslregister
Image Exception : #22 :: Failed to read volume /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/refvol.fslregister.nii
terminate called after throwing an instance of 'RBD_COMMON::BaseException'
Abort (core dumped) 
Sun Jun  8 11:36:06 EDT 2014
/home/brain1
flirt.fsl -ref /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/refvol.fslregister.nii -in /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/movvol.fslregister.nii -bins 256 -cost corratio -dof 6 -searchrx -90 90 -searchry -90 90 -searchrz -90 90 -verbose 0 -omat /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.fsl.mat -init /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/fslmat0.trans.mat -schedule /usr/local/freesurfer/bin/flirt.newdefault.20080811.sch -o /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/outvol.fslregister.nii
** ERROR (nifti_image_read): failed to find header file for '/home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/refvol.fslregister'
** ERROR: nifti_image_open(/home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/refvol.fslregister): bad header info
Error: failed to open file /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/refvol.fslregister
ERROR: Could not open image /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/refvol.fslregister
Image Exception : #22 :: Failed to read volume /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/refvol.fslregister.nii
terminate called after throwing an instance of 'RBD_COMMON::BaseException'
Abort (core dumped) 
Sun Jun  8 11:36:06 EDT 2014
/home/brain1
mri_convert /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/outvol.fslregister.nii /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/exf-in-anat.nii.gz
mri_convert /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/outvol.fslregister.nii /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/exf-in-anat.nii.gz 
niiRead(): error opening file /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/outvol.fslregister.nii
$Id: mri_convert.c,v 1.179.2.2 2011/05/16 20:53:47 greve Exp $
reading from /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp/outvol.fslregister.nii...
tkregister2_cmdl --s P121 --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat --fslreg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.fsl.mat --noedit
tkregister_tcl /usr/local/freesurfer/tktools/tkregister2.tcl
ERROR: cannot open /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.fsl.mat
cat: /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat: No such file or directory
tmp: Subscript out of range.
 
Started at Sun Jun 8 11:36:05 EDT 2014 
Ended   at Sun Jun  8 11:36:06 EDT 2014
 
fslregister Done
 
To check results, run:
tkregister2 --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat --surf orig
 
if ( $status ) exit 1 ;
if ( 0 ) exit 1

if ( $DoBBR ) then
if ( 1 ) then
cp $anat2exf_regdat $anat2exf_regdat.bbr.init
cp /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat.bbr.init
cp: cannot stat `/home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat': No such file or directory
set cmd = ( bbregister --mov $tempvol --bold --$dof --init-reg $anat2exf_regdat --reg $anat2exf_regdat )
set cmd = ( bbregister --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --bold --6 --init-reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat )
echo "" | tee -a $LF
echo 
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log

echo $cmd | tee -a $LF
echo bbregister --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --bold --6 --init-reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
bbregister --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --bold --6 --init-reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat
$cmd | tee -a $LF
bbregister --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --bold --6 --init-reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
ERROR: cannot find /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat
if ( $status ) exit 1 ;
if ( 0 ) exit 1
endif
endif
else
else

cp $anat2exf_regdat $FeatDir/reg/freesurfer/register.dat
cp /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/register.dat
cp: cannot stat `/home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat': No such file or directory

if ( $ReDoStandardReg ) then
if ( 1 ) then

set tmp = $SUBJECTS_DIR/$subject/mri/transforms/reg.mni152.2mm.dat
set tmp = /usr/local/freesurfer/subjects/P121/mri/transforms/reg.mni152.2mm.dat
if ( -e $tmp ) then
if ( -e /usr/local/freesurfer/subjects/P121/mri/transforms/reg.mni152.2mm.dat ) then

set cmd = ( fslregister --mov $stdbrain --s $subject --reg $anat2std_regdat --dof 12 )
set cmd = ( fslregister --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz --s P121 --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat --dof 12 )
endif
endif
echo $cmd | tee -a $LF
echo fslregister --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz --s P121 --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat --dof 12
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
fslregister --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz --s P121 --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat --dof 12
$cmd | tee -a $LF
fslregister --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz --s P121 --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat --dof 12
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log

Log file is /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat.fslregister.log

Sun Jun  8 11:36:06 EDT 2014
--mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz --s P121 --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat --dof 12
$Id: fslregister,v 1.34.2.1 2011/03/28 20:35:36 greve Exp $
localhost.localdomain
Linux localhost.localdomain 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux
nIters 1
--------------------------------------
/home/brain1
mri_convert /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/tmp.fslregister.8761/refvol.fslregister.nii
mri_convert /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/tmp.fslregister.8761/refvol.fslregister.nii 
$Id: mri_convert.c,v 1.179.2.2 2011/05/16 20:53:47 greve Exp $
reading from /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, -1.49012e-08, -1)
k_ras = (0, 1, 0)
writing to /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/tmp.fslregister.8761/refvol.fslregister.nii...
--------------------------------------
/home/brain1
mri_convert /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/tmp.fslregister.8761/movvol.fslregister.nii --frame 0
mri_convert /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/tmp.fslregister.8761/movvol.fslregister.nii --frame 0 
$Id: mri_convert.c,v 1.179.2.2 2011/05/16 20:53:47 greve Exp $
reading from /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz...
TR=1000.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, 1, 0)
k_ras = (0, 0, 1)
keeping frame 0
writing to /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/tmp.fslregister.8761/movvol.fslregister.nii...
Mov determinant is -8
/home/brain1
tkregister2_cmdl --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/tmp.fslregister.8761/movvol.fslregister.nii --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/tmp.fslregister.8761/reg0.8761.dat --regheader --fslregout /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat.fsl.mat0 --s P121 --noedit
tkregister_tcl /usr/local/freesurfer/tktools/tkregister2.tcl
INFO: no target volume specified, assuming FreeSurfer orig volume.
target  volume orig
movable volume /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/tmp.fslregister.8761/movvol.fslregister.nii
reg file       /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/tmp.fslregister.8761/reg0.8761.dat
LoadVol        0
ZeroCRAS       0
$Id: tkregister2.c,v 1.121.2.1 2011/03/28 20:25:16 greve Exp $
Diagnostic Level -1
INFO: loading target /usr/local/freesurfer/subjects/P121/mri/orig.mgz
Ttarg: --------------------
-1.000   0.000   0.000   128.000;
 0.000   0.000   1.000  -128.000;
 0.000  -1.000   0.000   128.000;
 0.000   0.000   0.000   1.000;
INFO: loading movable /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/tmp.fslregister.8761/movvol.fslregister.nii
Tmov: --------------------
-2.000   0.000   0.000   91.000;
 0.000   0.000   2.000  -91.000;
 0.000  -2.000   0.000   109.000;
 0.000   0.000   0.000   1.000;
mkheaderreg = 1, float2int = 0
Computing reg from header (and possibly input matrix)
---- Input registration matrix (computed) --------
 1.000   0.000   0.000  -0.672;
 0.000   0.000   1.000   25.105;
 0.000  -1.000  -0.000   6.410;
 0.000   0.000   0.000   1.000;
---------------------------------------
---- Input registration matrix --------
 1.000   0.000   0.000  -0.672;
 0.000   0.000   1.000   25.105;
 0.000  -1.000  -0.000   6.410;
 0.000   0.000   0.000   1.000;
Determinant 1
subject = P121
RegMat ---------------------------
 1.000   0.000   0.000  -0.672;
 0.000   0.000   1.000   25.105;
 0.000  -1.000  -0.000   6.410;
 0.000   0.000   0.000   1.000;
FSLOUTPUTTYPE NIFTI 
tkreg2FSL: mov det = -8, ref det = -1
Sun Jun  8 11:36:08 EDT 2014
/home/brain1
flirt.fsl -ref /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/tmp.fslregister.8761/refvol.fslregister.nii -in /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/tmp.fslregister.8761/movvol.fslregister.nii -bins 256 -cost corratio -dof 12 -searchrx -90 90 -searchry -90 90 -searchrz -90 90 -verbose 0 -omat /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/tmp.fslregister.8761/fslmat0.trans.mat -schedule /usr/local/fsl/etc/flirtsch/xyztrans.sch -init /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat.fsl.mat0
Sun Jun  8 11:36:15 EDT 2014
/home/brain1
flirt.fsl -ref /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/tmp.fslregister.8761/refvol.fslregister.nii -in /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/tmp.fslregister.8761/movvol.fslregister.nii -bins 256 -cost corratio -dof 12 -searchrx -90 90 -searchry -90 90 -searchrz -90 90 -verbose 0 -omat /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat.fsl.mat -init /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/tmp.fslregister.8761/fslmat0.trans.mat -schedule /usr/local/freesurfer/bin/flirt.newdefault.20080811.sch
tkregister2_cmdl --s P121 --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat --fslreg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat.fsl.mat --noedit
tkregister_tcl /usr/local/freesurfer/tktools/tkregister2.tcl
---- FSL registration matrix --------
 0.767  -0.013   0.000   59.247;
 0.012  -0.236  -0.697   205.879;
 0.015   0.827  -0.191   40.346;
 0.000   0.000   0.000   1.000;
---------------------------------------
INFO: no target volume specified, assuming FreeSurfer orig volume.
target  volume orig
movable volume /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz
reg file       /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat
LoadVol        0
ZeroCRAS       0
$Id: tkregister2.c,v 1.121.2.1 2011/03/28 20:25:16 greve Exp $
Diagnostic Level -1
INFO: loading target /usr/local/freesurfer/subjects/P121/mri/orig.mgz
Ttarg: --------------------
-1.000   0.000   0.000   128.000;
 0.000   0.000   1.000  -128.000;
 0.000  -1.000   0.000   128.000;
 0.000   0.000   0.000   1.000;
INFO: loading movable /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz
Tmov: --------------------
-2.000   0.000   0.000   91.000;
 0.000   0.000   2.000  -91.000;
 0.000  -2.000   0.000   109.000;
 0.000   0.000   0.000   1.000;
mkheaderreg = 0, float2int = 0
FSLOUTPUTTYPE NIFTI 
fsl2TkReg: mov det = -8, ref det = -1
---- Input registration matrix (computed) --------
 1.303  -0.019  -0.004  -0.608;
-0.028  -0.379   1.330  -18.713;
-0.017  -1.121  -0.307  -12.000;
 0.000   0.000   0.000   1.000;
---------------------------------------
---- Input registration matrix --------
 1.303  -0.019  -0.004  -0.608;
-0.028  -0.379   1.330  -18.713;
-0.017  -1.121  -0.307  -12.000;
 0.000   0.000   0.000   1.000;
Determinant 2.0944
subject = P121
RegMat ---------------------------
 1.303  -0.019  -0.004  -0.608;
-0.028  -0.379   1.330  -18.713;
-0.017  -1.121  -0.307  -12.000;
 0.000   0.000   0.000   1.000;
(standard_in) 1: illegal character: P
Cleaning up
 
Started at Sun Jun 8 11:36:06 EDT 2014 
Ended   at Sun Jun  8 11:36:31 EDT 2014
 
fslregister Done
 
To check results, run:
tkregister2 --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat --surf orig
 
if ( $status ) exit 1 ;
if ( 0 ) exit 1

set cmd = ( mri_matrix_multiply -im $anat2exf_regdat -iim $anat2std_regdat -om $exf2std_regdat )
set cmd = ( mri_matrix_multiply -im /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat -iim /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat -om /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2std.register.dat )
echo $cmd | tee -a $LF
echo mri_matrix_multiply -im /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat -iim /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat -om /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2std.register.dat
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
mri_matrix_multiply -im /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat -iim /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat -om /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2std.register.dat
$cmd | tee -a $LF
mri_matrix_multiply -im /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat -iim /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat -om /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2std.register.dat
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
mri_matrix_multiply: error opening file /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat
mri_matrix_multiply: exiting...
if ( $status ) exit 1 ;
if ( 0 ) exit 1

set cmd = ( $TKR --targ $stdbrain --mov $FeatDir/example_func.$fslext --reg $exf2std_regdat --fslregout $FeatDir/reg/freesurfer/example_func2standard.mat )
set cmd = ( tkregister2_cmdl --targ /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2std.register.dat --fslregout /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/example_func2standard.mat )
if ( ! $debug ) set cmd = ( $cmd --noedit )
if ( ! 1 ) set cmd = ( tkregister2_cmdl --targ /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2std.register.dat --fslregout /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/example_func2standard.mat --noedit )
echo $cmd | tee -a $LF
echo tkregister2_cmdl --targ /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2std.register.dat --fslregout /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/example_func2standard.mat
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
tkregister2_cmdl --targ /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2std.register.dat --fslregout /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/example_func2standard.mat
$cmd | tee -a $LF
tkregister2_cmdl --targ /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2std.register.dat --fslregout /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/example_func2standard.mat
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
regio_read_register(): No such file or directory
Could not open /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2std.register.dat
tkregister_tcl /usr/local/freesurfer/tktools/tkregister2.tcl
target  volume /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz
movable volume /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz
reg file       /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2std.register.dat
LoadVol        0
ZeroCRAS       0
$Id: tkregister2.c,v 1.121.2.1 2011/03/28 20:25:16 greve Exp $
Diagnostic Level -1
ERROR: reading /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2std.register.dat
if ( $status ) exit 1 ;
if ( 0 ) exit 1

if ( $OverwriteExf2Std ) then
if ( 0 ) then

set cmd = ( mri_matrix_multiply -im $anat2std_regdat -iim $anat2exf_regdat -om $std2exf_regdat )
set cmd = ( mri_matrix_multiply -im /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat -iim /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat -om /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/std2exf.register.dat )
echo $cmd | tee -a $LF
echo mri_matrix_multiply -im /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat -iim /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat -om /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/std2exf.register.dat
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
mri_matrix_multiply -im /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat -iim /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat -om /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/std2exf.register.dat
$cmd | tee -a $LF
mri_matrix_multiply -im /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat -iim /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat -om /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/std2exf.register.dat
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
mri_matrix_multiply: error opening file /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat
mri_matrix_multiply: exiting...
if ( $status ) exit 1 ;
if ( 0 ) exit 1
else
else


echo "-------------------------------------------------------" | tee -a $LF
echo -------------------------------------------------------
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
-------------------------------------------------------
set cmd = ( $TKR --s $subject --targ $refvolcor --mov $stdbrain --reg $anat2std_regdat --fslregout $std2anat_fslmat )
set cmd = ( tkregister2_cmdl --s P121 --targ /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat --fslregout /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/std2anat.fsl.mat )
if ( ! $debug ) set cmd = ( $cmd --noedit )
if ( ! 1 ) set cmd = ( tkregister2_cmdl --s P121 --targ /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat --fslregout /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/std2anat.fsl.mat --noedit )
echo $cmd | tee -a $LF
echo tkregister2_cmdl --s P121 --targ /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat --fslregout /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/std2anat.fsl.mat
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
tkregister2_cmdl --s P121 --targ /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat --fslregout /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/std2anat.fsl.mat
$cmd | tee -a $LF
tkregister2_cmdl --s P121 --targ /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat --fslregout /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/std2anat.fsl.mat
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
tkregister_tcl /usr/local/freesurfer/tktools/tkregister2.tcl
target  volume /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz
movable volume /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz
reg file       /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2std.register.dat
LoadVol        0
ZeroCRAS       0
$Id: tkregister2.c,v 1.121.2.1 2011/03/28 20:25:16 greve Exp $
Diagnostic Level -1
---- Input registration matrix --------
 1.303  -0.019  -0.004  -0.608;
-0.028  -0.379   1.330  -18.713;
-0.017  -1.121  -0.307  -12.000;
 0.000   0.000   0.000   1.000;
float2int = 0
---------------------------------------
INFO: loading target /usr/local/freesurfer/subjects/P121/mri/brainmask.mgz
Ttarg: --------------------
-1.000   0.000   0.000   128.000;
 0.000   0.000   1.000  -128.000;
 0.000  -1.000   0.000   128.000;
 0.000   0.000   0.000   1.000;
INFO: loading movable /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/standard.nii.gz
Tmov: --------------------
-2.000   0.000   0.000   91.000;
 0.000   0.000   2.000  -91.000;
 0.000  -2.000   0.000   109.000;
 0.000   0.000   0.000   1.000;
mkheaderreg = 0, float2int = 0
---- Input registration matrix --------
 1.303  -0.019  -0.004  -0.608;
-0.028  -0.379   1.330  -18.713;
-0.017  -1.121  -0.307  -12.000;
 0.000   0.000   0.000   1.000;
Determinant 2.0944
subject = P121
RegMat ---------------------------
 1.303  -0.019  -0.004  -0.608;
-0.028  -0.379   1.330  -18.713;
-0.017  -1.121  -0.307  -12.000;
 0.000   0.000   0.000   1.000;
FSLOUTPUTTYPE NIFTI_GZ 
tkreg2FSL: mov det = -8, ref det = -1
if ( $status ) exit 1 ;
if ( 0 ) exit 1


set cmd = ( $TKR --s $subject --mov $tempvol )
set cmd = ( tkregister2_cmdl --s P121 --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz )
set cmd = ( $cmd --reg $anat2exf_regdat )
set cmd = ( tkregister2_cmdl --s P121 --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat )
set cmd = ( $cmd --fslreg $exf2anat_fslmat )
set cmd = ( tkregister2_cmdl --s P121 --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat --fslreg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.fsl.mat )
set cmd = ( $cmd --surf orig ) ;
set cmd = ( tkregister2_cmdl --s P121 --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat --fslreg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.fsl.mat --surf orig )
echo ""
echo 

echo "To visually check your results, run:" | tee -a $LF
echo To visually check your results, run:
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
To visually check your results, run:
echo $cmd --tag | sed 's/_cmdl//g' | tee -a $LF
echo tkregister2_cmdl --s P121 --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat --fslreg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.fsl.mat --surf orig --tag
sed s/_cmdl//g
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
tkregister2 --s P121 --mov /home/brain1/fMRI/Homunculus/P121/Experiment.feat/example_func.nii.gz --reg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/anat2exf.register.dat --fslreg /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/exf2anat.fsl.mat --surf orig --tag

echo ""
echo 

echo ""
echo 



if ( $cleanup == 0 ) then
if ( 1 == 0 ) then

rm -fr $FeatDir/reg/freesurfer/tmp
rm -fr /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/tmp
endif
endif

date | tee -a $LF
date
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
Sun Jun  8 11:36:33 EDT 2014
echo "reg-feat2anat done" | tee -a $LF
echo reg-feat2anat done
tee -a /home/brain1/fMRI/Homunculus/P121/Experiment.feat/reg/freesurfer/reg-feat2anat.log
reg-feat2anat done

exit 0 ;
exit 0

