]> Creatis software - clitk.git/commitdiff
*** empty log message ***
authorbouilhol <bouilhol>
Tue, 12 Apr 2011 13:42:44 +0000 (13:42 +0000)
committerbouilhol <bouilhol>
Tue, 12 Apr 2011 13:42:44 +0000 (13:42 +0000)
vv/scripts/create_mhd_4D.sh

index 662c5a3b63be5cfcc4adc747c2fb8aa8a12ebf4e..b0503c96a31eef862de7f238bfad335710f5ec90 100755 (executable)
@@ -28,7 +28,6 @@ then
   exit 1
 fi
 
-#nb_phase_file=`find $1 -iname "*[0-99].[0-9].mhd" -o -iname "*[0-99]*\]*.mhd" | wc -l`
 nb_phase_file=`find $1 -iname "*[0-9].mhd" -o -iname "*[0-9]*\]*.mhd" | wc -l`
 if [ $nb_phase_file = 0 ]
 then
@@ -39,7 +38,6 @@ fi
 ########## CT #########
 
 list_pattern=""
-#list_phase_file=`find $1 -iname "*[0-99].[0-9].mhd"`
 list_phase_file=`find $1 -iname "*[0-9].mhd"`
 for phase_file in $list_phase_file
 do
@@ -65,18 +63,6 @@ do
     pattern=""
   fi
 
-  #nbph0=`find $1 -iname "${pattern}[0-9].[0-9].mhd" | wc -l`
-  #orig0=`find $1 -iname "${pattern}[0-9].[0-9].mhd" | sort | head -n 1`
-  #listph0=`find $1 -iname "${pattern}[0-9].[0-9].raw" | sort`
-
-  #nbph1=`find $1 -iname "${pattern}[0-9][0-9].[0-9].mhd" | wc -l`
-  #orig1=`find $1 -iname "${pattern}[0-9][0-9].[0-9].mhd" | sort | head -n 1`
-  #listph1=`find $1 -iname "${pattern}[0-9][0-9].[0-9].raw" | sort`
-
-  #nbph=$(( nbph0+nbph1 ))
-  #orig=`echo -e "$orig0\n$orig1" | head -n 1`
-  #listph="$listph0 $listph1"
-
   nbph=`find $1 -iname "${pattern}*[0-9].mhd" | wc -l`
   orig=`find $1 -iname "${pattern}*[0-9].mhd" | sort | head -n 1`
   listph=`find $1 -iname "${pattern}*[0-9].raw" | sort`
@@ -91,15 +77,12 @@ done
 ############ PET ###########
 
 list_pattern=""
-#list_phase_file=`find $1 -iname "*[0-99]*\]*.mhd"`
 list_phase_file=`find $1 -iname "*[0-9]*\]*.mhd"`
 for phase_file in $list_phase_file
 do
   phase_file_name=`basename $phase_file`
-  #if [[ ! -z `echo "$phase_file_name" | grep "[0-99]-.*\]"` ]]
   if [[ ! -z `echo "$phase_file_name" | grep "[0-9]-.*\]"` ]]
   then
-    #prefix=`echo $phase_file_name | sed "s/.*[0-99]-/-/;s/\]_.*//"`
     prefix=`echo $phase_file_name | sed "s/.*[0-9]-/-/;s/\]_.*//"`
   else
     prefix="NONE"
@@ -119,15 +102,10 @@ do
     pattern=""
   fi
 
-  #nbph=`find $1 -iname "*[0-99]${pattern}\]*.mhd" | wc -l`
-  #orig=`find $1 -iname "*[0-99]${pattern}\]*.mhd" | sort | head -n 1`
-  #listph=`find $1 -iname "*[0-99]${pattern}\]*.raw" | sort`
-
   nbph=`find $1 -iname "*[0-9]${pattern}\]*.mhd" | wc -l`
   orig=`find $1 -iname "*[0-9]${pattern}\]*.mhd" | sort | head -n 1`
   listph=`find $1 -iname "*[0-9]${pattern}\]*.raw" | sort`
   
-  #file_name_4D=`basename "$orig" | sed "s/[0-99]${pattern}\]/${pattern}\]/;s/_.mhd/_4D.mhd/"`
   file_name_4D=`basename "$orig" | sed "s/[0-9]${pattern}\]/${pattern}\]/;s/_.mhd/_4D.mhd/"`
 
   write_mhd_4D $1