From: Romulo Pinho Date: Thu, 21 Jul 2011 09:18:15 +0000 (+0200) Subject: small changes in scripts X-Git-Tag: v1.3.0~274^2~4 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=453c499dccbd72a988d5f36d499fb1d4a23dc439;p=clitk.git small changes in scripts --- diff --git a/scripts/common.sh b/scripts/common.sh new file mode 100755 index 0000000..e06bf25 --- /dev/null +++ b/scripts/common.sh @@ -0,0 +1,14 @@ +#! /bin/sh + + +MAX_THREADS=2 + +check_threads() +{ + while [[ $(jobs -p | wc -l) -ge $1 ]]; do + jobs + sleep 10 + done +} + + diff --git a/scripts/create_midP_masks.sh b/scripts/create_midP_masks.sh index bb153c8..9c85177 100755 --- a/scripts/create_midP_masks.sh +++ b/scripts/create_midP_masks.sh @@ -1,14 +1,6 @@ #! /bin/bash -x -MAX_THREADS=2 - -check_threads() -{ - while [[ $(jobs -p | wc -l) -ge $1 ]]; do - jobs - sleep 10 - done -} +. common.sh extract_patient() { @@ -132,6 +124,9 @@ motion_mask() dir=`dirname $1` cd $dir + # import variables specific to each patient + source variables + resample_spacing=$2 resample_algo=$3 @@ -253,9 +248,6 @@ fi # reg_out_list: list of registration image files (outside lungs) # -# import variables specific to each patient -source variables - if [ $1 != "using-as-lib" ]; then motion_mask $1 $2 $3 fi