X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2Fscripts%2Fcreate_mhd_4D.sh;h=2ef421b5869a29cd79159e61bc5d4f1ae86c323c;hb=f840f99dfeed47be09b02c8552732c7eb6f02a2f;hp=6b27212af6ac4c066c4384aa8dc12c469afd8ccf;hpb=adfe4c8eebadaa36edadf386710b78b86e871956;p=clitk.git diff --git a/vv/scripts/create_mhd_4D.sh b/vv/scripts/create_mhd_4D.sh index 6b27212..2ef421b 100755 --- a/vv/scripts/create_mhd_4D.sh +++ b/vv/scripts/create_mhd_4D.sh @@ -1,16 +1,22 @@ #!/bin/sh + ##################################################################### # create_mhd_4D argument : repertoire nom_fichier_de_sortie # ##################################################################### if [ $# -lt 1 ] then - echo "Usage: create_mhd_4D directory output_file_name" + echo "Usage: create_mhd_4D.sh directory output_file_name" exit 1 fi cd $1 -nbph=`ls -l *0.mhd | wc -l` +nbph=`find . -iname "*0.mhd" | wc -l` +if [ $nbph = 0 ] +then + echo "Error: no phase found" + exit 1 +fi orig=`ls -1 *0.mhd | head -n 1` cat $orig | sed "s/NDims = .*/NDims = 4/