Skip to content
Snippets Groups Projects
Commit 6e96bd21 authored by Mark Jenkinson's avatar Mark Jenkinson
Browse files

Lots of gzip script compatibility updates

parent 37174b03
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# Stephen Smith, FMRIB Image Analysis Group # Stephen Smith, FMRIB Image Analysis Group
# #
# Copyright (C) 1999-2002 University of Oxford # Copyright (C) 1999-2004 University of Oxford
# #
# SHCOPYRIGHT # SHCOPYRIGHT
...@@ -23,12 +23,17 @@ Usage() { ...@@ -23,12 +23,17 @@ Usage() {
exit exit
} }
if [ _$FSLDIR = _ ] ; then
FSLDIR=/usr/local/fsl
export FSLDIR
fi
[ "$1" = "" ] && Usage [ "$1" = "" ] && Usage
[ "$2" = "" ] && Usage [ "$2" = "" ] && Usage
[ ! -f $1.hdr ] && Usage [ `${FSLDIR}/bin/imtest $1` = 0 ] && Usage
[ ! -f $2.hdr ] && Usage [ `${FSLDIR}/bin/imtest $2` = 0 ] && Usage
A=$1 A=`${FSLDIR}/bin/remove_ext $1`
B=$2 B=`${FSLDIR}/bin/remove_ext $2`
echo "-----------------------------------------------------------------------" > ${A}_to_${B}.siena echo "-----------------------------------------------------------------------" > ${A}_to_${B}.siena
echo "" >> ${A}_to_${B}.siena echo "" >> ${A}_to_${B}.siena
...@@ -40,10 +45,6 @@ echo "" > ...@@ -40,10 +45,6 @@ echo "" >
shift 2 shift 2
if [ _$FSLDIR = _ ] ; then
FSLDIR=/usr/local/fsl
export FSLDIR
fi
debug=0 debug=0
betf=0.5 betf=0.5
...@@ -182,22 +183,22 @@ ${FSLDIR}/bin/avwmaths ${A}_to_${B}_flow -mul -1 ${A}_to_${B}_flowneg ...@@ -182,22 +183,22 @@ ${FSLDIR}/bin/avwmaths ${A}_to_${B}_flow -mul -1 ${A}_to_${B}_flowneg
${FSLDIR}/bin/overlay 0 0 ${A}_halfwayto_${B} -a ${A}_to_${B}_flow 0.01 1 ${A}_to_${B}_flowneg 0.01 1 ${A}_halfwayto_${B}_render ${FSLDIR}/bin/overlay 0 0 ${A}_halfwayto_${B} -a ${A}_to_${B}_flow 0.01 1 ${A}_to_${B}_flowneg 0.01 1 ${A}_halfwayto_${B}_render
if [ $debug = 0 ] ; then if [ $debug = 0 ] ; then
/bin/rm -f ${A}_brain.hdr ${A}_brain.img ${A}_brain_mask.hdr ${A}_brain_mask.img ${A}_brain_skull.hdr ${A}_brain_skull.img \ /bin/rm -f ${A}_brain.hdr* ${A}_brain.img* ${A}_brain_mask.hdr* ${A}_brain_mask.img* ${A}_brain_skull.hdr* ${A}_brain_skull.img* \
${B}_brain.hdr ${B}_brain.img ${B}_brain_mask.hdr ${B}_brain_mask.img ${B}_brain_skull.hdr ${B}_brain_skull.img \ ${B}_brain.hdr* ${B}_brain.img* ${B}_brain_mask.hdr* ${B}_brain_mask.img* ${B}_brain_skull.hdr* ${B}_brain_skull.img* \
${A}_halfwayto_${B}.hdr ${A}_halfwayto_${B}.img ${A}_halfwayto_${B}_mask.hdr ${A}_halfwayto_${B}_mask.img \ ${A}_halfwayto_${B}.hdr* ${A}_halfwayto_${B}.img* ${A}_halfwayto_${B}_mask.hdr* ${A}_halfwayto_${B}_mask.img* \
${B}_halfwayto_${A}.hdr ${B}_halfwayto_${A}.img ${B}_halfwayto_${A}_mask.hdr ${B}_halfwayto_${A}_mask.img \ ${B}_halfwayto_${A}.hdr* ${B}_halfwayto_${A}.img* ${B}_halfwayto_${A}_mask.hdr* ${B}_halfwayto_${A}_mask.img* \
${A}_halfwayto_${B}_talmask.hdr ${A}_halfwayto_${B}_talmask.img \ ${A}_halfwayto_${B}_talmask.hdr* ${A}_halfwayto_${B}_talmask.img* \
${B}_halfwayto_${A}_talmask.hdr ${B}_halfwayto_${A}_talmask.img \ ${B}_halfwayto_${A}_talmask.hdr* ${B}_halfwayto_${A}_talmask.img* \
${A}_halfwayto_${B}_brain.hdr ${A}_halfwayto_${B}_brain.img \ ${A}_halfwayto_${B}_brain.hdr* ${A}_halfwayto_${B}_brain.img* \
${A}_halfwayto_${B}_brain_seg.hdr ${A}_halfwayto_${B}_brain_seg.img \ ${A}_halfwayto_${B}_brain_seg.hdr* ${A}_halfwayto_${B}_brain_seg.img* \
${A}_to_${B}_flowneg.hdr ${A}_to_${B}_flowneg.img \ ${A}_to_${B}_flowneg.hdr* ${A}_to_${B}_flowneg.img* \
${B}_halfwayto_${A}_brain.hdr ${B}_halfwayto_${A}_brain.img \ ${B}_halfwayto_${A}_brain.hdr* ${B}_halfwayto_${A}_brain.img* \
${B}_halfwayto_${A}_brain_seg.hdr ${B}_halfwayto_${A}_brain_seg.img \ ${B}_halfwayto_${A}_brain_seg.hdr* ${B}_halfwayto_${A}_brain_seg.img* \
${B}_to_${A}_flowneg.hdr ${B}_to_${A}_flowneg.img \ ${B}_to_${A}_flowneg.hdr* ${B}_to_${A}_flowneg.img* \
${B}_to_${A}.mat_avscale \ ${B}_to_${A}.mat_avscale \
${A}_halfwayto_${B}_brain.vol ${B}_halfwayto_${A}_brain.vol \ ${A}_halfwayto_${B}_brain.vol ${B}_halfwayto_${A}_brain.vol \
${A}_talmask.hdr ${A}_talmask.img ${B}_talmask.hdr ${B}_talmask.img \ ${A}_talmask.hdr* ${A}_talmask.img* ${B}_talmask.hdr* ${B}_talmask.img* \
${A}_and_${B}_talmask.hdr ${A}_and_${B}_talmask.img \ ${A}_and_${B}_talmask.hdr* ${A}_and_${B}_talmask.img* \
${A}_to_tal_inv.mat ${B}_to_tal_inv.mat ${A}_to_${B}_tmp.mat \ ${A}_to_tal_inv.mat ${B}_to_tal_inv.mat ${A}_to_${B}_tmp.mat \
${A}_valid_mask.??? ${B}_valid_mask.??? ${A}_valid_mask_to_${B}.??? ${B}_valid_mask_to_${A}.??? ${A}_valid_mask_with_$B.??? ${B}_valid_mask_with_$A.??? ${A}_halfwayto_${B}_valid_mask.??? ${B}_halfwayto_${A}_valid_mask.??? ${A}_valid_mask.??? ${B}_valid_mask.??? ${A}_valid_mask_to_${B}.??? ${B}_valid_mask_to_${A}.??? ${A}_valid_mask_with_$B.??? ${B}_valid_mask_with_$A.??? ${A}_halfwayto_${B}_valid_mask.??? ${B}_halfwayto_${A}_valid_mask.???
fi fi
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# Stephen Smith, FMRIB Image Analysis Group # Stephen Smith, FMRIB Image Analysis Group
# #
# Copyright (C) 1999-2001 University of Oxford # Copyright (C) 1999-2004 University of Oxford
# #
# SHCOPYRIGHT # SHCOPYRIGHT
...@@ -13,17 +13,18 @@ Usage() { ...@@ -13,17 +13,18 @@ Usage() {
exit 1 exit 1
} }
[ "$1" = "" ] && Usage
[ "$2" = "" ] && Usage
[ ! -f $1.hdr ] && Usage
if [ _$FSLDIR = _ ] ; then if [ _$FSLDIR = _ ] ; then
FSLDIR=/usr/local/fsl FSLDIR=/usr/local/fsl
export FSLDIR export FSLDIR
fi fi
input=$1 [ "$1" = "" ] && Usage
inputB=$2 [ "$2" = "" ] && Usage
[ `${FSLDIR}/bin/imtest $1` = 0 ] && Usage
input=`${FSLDIR}/bin/remove_ext $1`
inputB=`${FSLDIR}/bin/remove_ext $2`
m=$3 m=$3
M=`echo "5 k 1.0 $m / p" | dc -` M=`echo "5 k 1.0 $m / p" | dc -`
shift 3 shift 3
...@@ -54,12 +55,13 @@ echo "0.0 $M 0.0 $t2" >> sc${input}_halfwayto_${input}.mat ...@@ -54,12 +55,13 @@ echo "0.0 $M 0.0 $t2" >> sc${input}_halfwayto_${input}.mat
echo "0.0 0.0 $M $t3" >> sc${input}_halfwayto_${input}.mat echo "0.0 0.0 $M $t3" >> sc${input}_halfwayto_${input}.mat
echo "0.0 0.0 0.0 1.0" >> sc${input}_halfwayto_${input}.mat echo "0.0 0.0 0.0 1.0" >> sc${input}_halfwayto_${input}.mat
/bin/cp -f ${input}.hdr sc${input}.hdr ftmp=`echo ${input}.hdr*`; /bin/cp -f $ftmp sc${ftmp}
/bin/cp -f ${input}.img sc${input}.img ftmp=`echo ${input}.img*`; /bin/cp -f $ftmp sc${ftmp}
/bin/cp -f ${input}_brain_mask.hdr sc${input}_brain_mask.hdr ftmp=`echo ${input}_brain_mask.hdr*`; /bin/cp -f $ftmp sc${ftmp}
/bin/cp -f ${input}_brain_mask.img sc${input}_brain_mask.img ftmp=`echo ${input}_brain_mask.img*`; /bin/cp -f $ftmp sc${ftmp}
/bin/cp -f ${input}_valid_mask_with_${inputB}.hdr ${input}_valid_mask_with_sc${input}.hdr # the following works but is dodge (copying .hdr.gz to .hdr potentially)
/bin/cp -f ${input}_valid_mask_with_${inputB}.img ${input}_valid_mask_with_sc${input}.img /bin/cp -f ${input}_valid_mask_with_${inputB}.hdr* ${input}_valid_mask_with_sc${input}.hdr
/bin/cp -f ${input}_valid_mask_with_${inputB}.img* ${input}_valid_mask_with_sc${input}.img
${FSLDIR}/bin/siena_diff ${input} sc${input} $@ > ${input}_to_sc${input}.siena ${FSLDIR}/bin/siena_diff ${input} sc${input} $@ > ${input}_to_sc${input}.siena
...@@ -70,16 +72,16 @@ corr=`echo "10 k $vm $cal / p" | dc -` ...@@ -70,16 +72,16 @@ corr=`echo "10 k $vm $cal / p" | dc -`
#echo "$m $vm $cal $corr" #echo "$m $vm $cal $corr"
echo $corr echo $corr
/bin/rm -f sc${input}.hdr sc${input}.img sc${input}_brain_mask.hdr sc${input}_brain_mask.img \ /bin/rm -f sc${input}.hdr* sc${input}.img* sc${input}_brain_mask.hdr* sc${input}_brain_mask.img* \
${input}_halfwayto_sc${input}.hdr ${input}_halfwayto_sc${input}.img \ ${input}_halfwayto_sc${input}.hdr* ${input}_halfwayto_sc${input}.img* \
${input}_halfwayto_sc${input}_brain.hdr ${input}_halfwayto_sc${input}_brain.img \ ${input}_halfwayto_sc${input}_brain.hdr* ${input}_halfwayto_sc${input}_brain.img* \
${input}_halfwayto_sc${input}_brain_seg.hdr ${input}_halfwayto_sc${input}_brain_seg.img \ ${input}_halfwayto_sc${input}_brain_seg.hdr* ${input}_halfwayto_sc${input}_brain_seg.img* \
${input}_halfwayto_sc${input}_mask.hdr ${input}_halfwayto_sc${input}_mask.img \ ${input}_halfwayto_sc${input}_mask.hdr* ${input}_halfwayto_sc${input}_mask.img* \
${input}_halfwayto_sc${input}_talmask.hdr ${input}_halfwayto_sc${input}_talmask.img \ ${input}_halfwayto_sc${input}_talmask.hdr* ${input}_halfwayto_sc${input}_talmask.img* \
sc${input}_halfwayto_${input}.hdr sc${input}_halfwayto_${input}.img \ sc${input}_halfwayto_${input}.hdr* sc${input}_halfwayto_${input}.img* \
sc${input}_halfwayto_${input}_mask.hdr sc${input}_halfwayto_${input}_mask.img \ sc${input}_halfwayto_${input}_mask.hdr* sc${input}_halfwayto_${input}_mask.img* \
${input}_halfwayto_sc${input}.mat sc${input}_halfwayto_${input}.mat \ ${input}_halfwayto_sc${input}.mat sc${input}_halfwayto_${input}.mat \
${input}_to_sc${input}_flow.hdr ${input}_to_sc${input}_flow.img \ ${input}_to_sc${input}_flow.hdr* ${input}_to_sc${input}_flow.img* \
${input}_to_sc${input}.siena ${input}_halfwayto_sc${input}_brain.vol \ ${input}_to_sc${input}.siena ${input}_halfwayto_sc${input}_brain.vol \
${input}_valid_mask_with_sc${input}.hdr ${input}_valid_mask_with_sc${input}.img \ ${input}_valid_mask_with_sc${input}.hdr* ${input}_valid_mask_with_sc${input}.img* \
${input}_halfwayto_sc${input}_valid_mask.hdr ${input}_halfwayto_sc${input}_valid_mask.img ${input}_halfwayto_sc${input}_valid_mask.hdr* ${input}_halfwayto_sc${input}_valid_mask.img*
...@@ -4,47 +4,52 @@ ...@@ -4,47 +4,52 @@
# #
# Stephen Smith, FMRIB Image Analysis Group # Stephen Smith, FMRIB Image Analysis Group
# #
# Copyright (C) 1999-2001 University of Oxford # Copyright (C) 1999-2004 University of Oxford
# #
# SHCOPYRIGHT # SHCOPYRIGHT
Usage() { Usage() {
echo "Usage: siena_flirt <input1_fileroot> <input2_fileroot>" echo "Usage: siena_flirt <input1_fileroot> <input2_fileroot>"
exit 1 exit 1
} }
[ "$1" = "" ] && Usage
[ "$2" = "" ] && Usage
[ ! -f $1.hdr ] && Usage
[ ! -f $2.hdr ] && Usage
if [ _$FSLDIR = _ ] ; then if [ _$FSLDIR = _ ] ; then
FSLDIR=/usr/local/fsl FSLDIR=/usr/local/fsl
export FSLDIR export FSLDIR
fi fi
[ "$1" = "" ] && Usage
[ "$2" = "" ] && Usage
[ `${FSLDIR}/bin/imtest $1` = 0 ] && Usage
[ `${FSLDIR}/bin/imtest $2` = 0 ] && Usage
A1=`${FSLDIR}/bin/remove_ext $1`;
A2=`${FSLDIR}/bin/remove_ext $2`;
# register using brains and skulls # register using brains and skulls
${FSLDIR}/bin/pairreg $1_brain $2_brain $1_brain_skull $2_brain_skull $2_to_$1.mat ${FSLDIR}/bin/pairreg ${A1}_brain ${A2}_brain ${A1}_brain_skull ${A2}_brain_skull ${A2}_to_${A1}.mat
${FSLDIR}/bin/pairreg $2_brain $1_brain $2_brain_skull $1_brain_skull $1_to_$2.mat ${FSLDIR}/bin/pairreg ${A2}_brain ${A1}_brain ${A2}_brain_skull ${A1}_brain_skull ${A1}_to_${A2}.mat
# replace both transforms with "average" (reduces error level AND makes system symmetric) # replace both transforms with "average" (reduces error level AND makes system symmetric)
F=$1_to_$2.mat F=${A1}_to_${A2}.mat
B=$2_to_$1.mat B=${A2}_to_${A1}.mat
${FSLDIR}/bin/convert_xfm -matonly -concat $B -omat tmp_${F}_then_${B} $F ${FSLDIR}/bin/convert_xfm -matonly -concat $B -omat tmp_${F}_then_${B} $F
${FSLDIR}/bin/avscale tmp_${F}_then_${B} $1 > tmp_${F}_then_${B}.avscale ${FSLDIR}/bin/avscale tmp_${F}_then_${B} ${A1} > tmp_${F}_then_${B}.avscale
${FSLDIR}/bin/extracttxt Backward tmp_${F}_then_${B}.avscale 4 1 > tmp_${F}_then_${B}_halfback ${FSLDIR}/bin/extracttxt Backward tmp_${F}_then_${B}.avscale 4 1 > tmp_${F}_then_${B}_halfback
${FSLDIR}/bin/convert_xfm -matonly -concat tmp_${F}_then_${B}_halfback -omat $F $F ${FSLDIR}/bin/convert_xfm -matonly -concat tmp_${F}_then_${B}_halfback -omat $F $F
${FSLDIR}/bin/convert_xfm -inverse -matonly -omat $B $F ${FSLDIR}/bin/convert_xfm -inverse -matonly -omat $B $F
/bin/rm tmp_${F}_then_${B} tmp_${F}_then_${B}.avscale tmp_${F}_then_${B}_halfback /bin/rm tmp_${F}_then_${B} tmp_${F}_then_${B}.avscale tmp_${F}_then_${B}_halfback
# replace the .mat matrix that takes 2->1 with one that takes 2->halfway and one that takes 1->halfway # replace the .mat matrix that takes 2->1 with one that takes 2->halfway and one that takes 1->halfway
${FSLDIR}/bin/avscale $2_to_$1.mat $1_brain > $2_to_$1.mat_avscale ${FSLDIR}/bin/avscale ${A2}_to_${A1}.mat ${A1}_brain > ${A2}_to_${A1}.mat_avscale
${FSLDIR}/bin/extracttxt Forward $2_to_$1.mat_avscale 4 1 > $2_halfwayto_$1.mat ${FSLDIR}/bin/extracttxt Forward ${A2}_to_${A1}.mat_avscale 4 1 > ${A2}_halfwayto_${A1}.mat
${FSLDIR}/bin/extracttxt Backward $2_to_$1.mat_avscale 4 1 > $1_halfwayto_$2.mat ${FSLDIR}/bin/extracttxt Backward ${A2}_to_${A1}.mat_avscale 4 1 > ${A1}_halfwayto_${A2}.mat
# produce picture for registration evaluation # produce picture for registration evaluation
${FSLDIR}/bin/flirt -out $1_halfwayto_$2 -applyxfm -init $1_halfwayto_$2.mat -ref $1 -in $1_brain ${FSLDIR}/bin/flirt -out ${A1}_halfwayto_${A2} -applyxfm -init ${A1}_halfwayto_${A2}.mat -ref ${A1} -in ${A1}_brain
${FSLDIR}/bin/flirt -out $2_halfwayto_$1 -applyxfm -init $2_halfwayto_$1.mat -ref $1 -in $2_brain ${FSLDIR}/bin/flirt -out ${A2}_halfwayto_${A1} -applyxfm -init ${A2}_halfwayto_${A1}.mat -ref ${A1} -in ${A2}_brain
${FSLDIR}/bin/slicer $2_halfwayto_$1 $1_halfwayto_$2 -s 1 -x 0.4 gr$1$2a -x 0.5 gr$1$2b -x 0.6 gr$1$2c -y 0.4 gr$1$2d -y 0.5 gr$1$2e -y 0.6 gr$1$2f -z 0.4 gr$1$2g -z 0.5 gr$1$2h -z 0.6 gr$1$2i ${FSLDIR}/bin/slicer ${A2}_halfwayto_${A1} ${A1}_halfwayto_${A2} -s 1 -x 0.4 gr${A1}${A2}a -x 0.5 gr${A1}${A2}b -x 0.6 gr${A1}${A2}c -y 0.4 gr${A1}${A2}d -y 0.5 gr${A1}${A2}e -y 0.6 gr${A1}${A2}f -z 0.4 gr${A1}${A2}g -z 0.5 gr${A1}${A2}h -z 0.6 gr${A1}${A2}i
${FSLDIR}/bin/convert -colors 100 +append gr$1$2a gr$1$2b gr$1$2c gr$1$2d gr$1$2e gr$1$2f gr$1$2g gr$1$2h gr$1$2i $2_regto_$1.gif ${FSLDIR}/bin/convert -colors 100 +append gr${A1}${A2}a gr${A1}${A2}b gr${A1}${A2}c gr${A1}${A2}d gr${A1}${A2}e gr${A1}${A2}f gr${A1}${A2}g gr${A1}${A2}h gr${A1}${A2}i ${A2}_regto_${A1}.gif
/bin/rm gr$1$2a gr$1$2b gr$1$2c gr$1$2d gr$1$2e gr$1$2f gr$1$2g gr$1$2h gr$1$2i $2_halfwayto_$1.img $2_halfwayto_$1.hdr $1_halfwayto_$2.img $1_halfwayto_$2.hdr /bin/rm gr${A1}${A2}a gr${A1}${A2}b gr${A1}${A2}c gr${A1}${A2}d gr${A1}${A2}e gr${A1}${A2}f gr${A1}${A2}g gr${A1}${A2}h gr${A1}${A2}i ${A2}_halfwayto_${A1}.img* ${A2}_halfwayto_${A1}.hdr* ${A1}_halfwayto_${A2}.img* ${A1}_halfwayto_${A2}.hdr*
...@@ -4,29 +4,30 @@ ...@@ -4,29 +4,30 @@
# #
# Stephen Smith, FMRIB Image Analysis Group # Stephen Smith, FMRIB Image Analysis Group
# #
# Copyright (C) 2002-2003 University of Oxford # Copyright (C) 2002-2004 University of Oxford
# #
# SHCOPYRIGHT # SHCOPYRIGHT
Usage() { Usage() {
echo "Usage: sienal <fileroot2> <fileroot2> [-d]" echo "Usage: sienal <fileroot2> <fileroot2> [-d]"
echo "-d : debug (don't delete intermediate files)" echo "-d : debug (don't delete intermediate files)"
exit exit
} }
[ "$1" = "" ] && Usage
[ "$2" = "" ] && Usage
[ ! -f $1.hdr ] && Usage
[ ! -f $2.hdr ] && Usage
A=$1
B=$2
shift 2
if [ _$FSLDIR = _ ] ; then if [ _$FSLDIR = _ ] ; then
FSLDIR=/usr/local/fsl FSLDIR=/usr/local/fsl
export FSLDIR export FSLDIR
fi fi
[ "$1" = "" ] && Usage
[ "$2" = "" ] && Usage
[ `${FSLDIR}/bin/imtest $1` = 0 ] && Usage
[ `${FSLDIR}/bin/imtest $2` = 0 ] && Usage
A=`${FSLDIR}/bin/remove_ext $1`;
B=`${FSLDIR}/bin/remove_ext $2`;
shift 2
debug=0 debug=0
for opts in $@ ; do for opts in $@ ; do
...@@ -39,7 +40,7 @@ done ...@@ -39,7 +40,7 @@ done
# register to MNI152 if not already done, and create halfway2tal transform # register to MNI152 if not already done, and create halfway2tal transform
if [ ! -f ${A}_to_tal.mat ] ; then if [ ! -f ${A}_to_tal.mat ] ; then
if [ ! -f ${A}_brain.hdr ] ; then if [ `${FSLDIR}/bin/imtest ${A}_brain` = 0 ] ; then
${FSLDIR}/bin/bet $A ${A}_brain ${FSLDIR}/bin/bet $A ${A}_brain
fi fi
${FSLDIR}/bin/flirt -ref ${FSLDIR}/etc/standard/avg152T1_brain -in ${A}_brain -omat ${A}_to_tal.mat ${FSLDIR}/bin/flirt -ref ${FSLDIR}/etc/standard/avg152T1_brain -in ${A}_brain -omat ${A}_to_tal.mat
...@@ -56,6 +57,6 @@ ${FSLDIR}/bin/avwmaths ${A}_to_${B}_flow_to_tal -mas ${FSLDIR}/etc/standard/avg1 ...@@ -56,6 +57,6 @@ ${FSLDIR}/bin/avwmaths ${A}_to_${B}_flow_to_tal -mas ${FSLDIR}/etc/standard/avg1
# cleanup # cleanup
if [ $debug = 0 ] ; then if [ $debug = 0 ] ; then
/bin/rm -f ${A}_halfwayto_${B}_inv.mat ${A}_brain.hdr ${A}_brain.img ${A}_to_${B}_flow_dil.hdr ${A}_to_${B}_flow_dil.img /bin/rm -f ${A}_halfwayto_${B}_inv.mat ${A}_brain.hdr* ${A}_brain.img ${A}_to_${B}_flow_dil.hdr* ${A}_to_${B}_flow_dil.img
fi fi
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# Stephen Smith, FMRIB Image Analysis Group # Stephen Smith, FMRIB Image Analysis Group
# #
# Copyright (C) 1999-2002 University of Oxford # Copyright (C) 1999-2004 University of Oxford
# #
# SHCOPYRIGHT # SHCOPYRIGHT
...@@ -24,9 +24,14 @@ Usage() { ...@@ -24,9 +24,14 @@ Usage() {
exit exit
} }
if [ _$FSLDIR = _ ] ; then
FSLDIR=/usr/local/fsl
export FSLDIR
fi
[ _$1 = _ ] && Usage [ _$1 = _ ] && Usage
[ ! -f $1.hdr ] && Usage I=`${FSLDIR}/bin/remove_ext $1`;
I=$1 [ `${FSLDIR}/bin/imtest $I` = 0 ] && Usage
echo "-----------------------------------------------------------------------" > ${I}.sienax echo "-----------------------------------------------------------------------" > ${I}.sienax
echo "" >> ${I}.sienax echo "" >> ${I}.sienax
...@@ -38,11 +43,6 @@ echo "" > ...@@ -38,11 +43,6 @@ echo "" >
shift shift
if [ _$FSLDIR = _ ] ; then
FSLDIR=/usr/local/fsl
export FSLDIR
fi
debug=0 debug=0
regional=0 regional=0
betf=0.5 betf=0.5
...@@ -201,7 +201,7 @@ if [ $regional = 1 ] ; then ...@@ -201,7 +201,7 @@ if [ $regional = 1 ] ; then
fi fi
if [ $debug = 0 ] ; then if [ $debug = 0 ] ; then
/bin/rm -f ${I}_brain.hdr ${I}_brain.img ${I}_brain_skull.hdr ${I}_brain_skull.img \ /bin/rm -f ${I}_brain.hdr* ${I}_brain.img* ${I}_brain_skull.hdr* ${I}_brain_skull.img* \
${I}_talmask* ${I}2tal.avscale ${I}2tal_inv.mat ${I}_talmask* ${I}2tal.avscale ${I}2tal_inv.mat
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment