]> Creatis software - clitk.git/blobdiff - scripts/create_midP_masks.sh
small changes in scripts
[clitk.git] / scripts / create_midP_masks.sh
index bb153c88db3a99a458d4485e46b74fcb8e300dc6..9c851770f931e7a28d83d120611bafbae0ba7a1b 100755 (executable)
@@ -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