Skip to content

Commit c3c3800

Browse files
author
Antonios Makropoulos
committed
full path of scripts
1 parent 30f7878 commit c3c3800

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

dhcp-pipeline.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ threads=1
6060
minimal=1
6161
noreorient=0
6262
cleanup=1
63-
codedir=$(dirname "$BASH_SOURCE")
64-
scriptdir=$codedir/scripts
6563

6664
shift; shift; shift;
6765
while [ $# -gt 0 ]; do
@@ -85,8 +83,11 @@ done
8583
[ "$T2" != "-" -a "$T2" != "" ] || { echo "T2 image not provided!" >&2; exit 1; }
8684

8785
# check whether the different tools are set and load parameters
86+
codedir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
8887
. $codedir/parameters/configuration.sh
8988

89+
scriptdir=$codedir/scripts
90+
9091
roundedAge=`printf "%.*f\n" 0 $age` #round
9192
[ $roundedAge -lt $template_max_age ] || { roundedAge=$template_max_age; }
9293
[ $roundedAge -gt $template_min_age ] || { roundedAge=$template_min_age; }

parameters/configuration.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# local directories
4-
export parameters_dir=$(dirname "$BASH_SOURCE")
4+
export parameters_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
55
export code_dir=$parameters_dir/..
66

77
# setup path from installation

scripts/misc/pipeline.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ age=$2
5151

5252
datadir=`pwd`
5353
threads=1
54-
scriptdir=$(dirname "$BASH_SOURCE")
54+
55+
# check whether the different tools are set and load parameters
56+
codedir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
57+
. $codedir/parameters/configuration.sh
5558

5659
shift; shift
5760
while [ $# -gt 0 ]; do

scripts/segmentation/pipeline.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ age=$3
2828

2929
datadir=`pwd`
3030
threads=1
31-
scriptdir=$(dirname "$BASH_SOURCE")
31+
32+
# check whether the different tools are set and load parameters
33+
codedir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
34+
. $codedir/parameters/configuration.sh
3235

3336
shift; shift; shift
3437
while [ $# -gt 0 ]; do

scripts/surface/pipeline.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ subj=$1
3838

3939
datadir=`pwd`
4040
threads=1
41-
scriptdir=$(dirname "$BASH_SOURCE")
41+
42+
# check whether the different tools are set and load parameters
43+
codedir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
44+
. $codedir/parameters/configuration.sh
4245

4346
shift
4447
while [ $# -gt 0 ]; do
@@ -97,7 +100,7 @@ fi
97100
# create files of each hemisphere
98101
for hi in {0..1}; do
99102
h=${Hemi[$hi]}
100-
runhemisphere $scriptdir/process-surfaces-hemisphere.sh $subj $h $segdir $outvtk $outwb $outtmp &
103+
runhemisphere $codedir/process-surfaces-hemisphere.sh $subj $h $segdir $outvtk $outwb $outtmp &
101104
if [ $threads -eq 1 ];then wait;fi
102105
done
103106
if [ $threads -gt 1 ];then wait;fi
@@ -140,7 +143,7 @@ fi
140143

141144
# create myelin map etc.
142145
if [ -f restore/T1/$subj.nii.gz ];then
143-
run $scriptdir/create-myelin-map.sh $subj
146+
run $codedir/create-myelin-map.sh $subj
144147

145148
for STRINGII in MyelinMap@func SmoothedMyelinMap@func; do
146149
Map=`echo $STRINGII | cut -d "@" -f 1`

0 commit comments

Comments
 (0)