From 4f4d79533d2bdd0c13d90cde6bbb67e5f313b638 Mon Sep 17 00:00:00 2001 From: Romulo Pinho Date: Fri, 4 Nov 2011 09:32:30 +0100 Subject: [PATCH] corrections in mid-P scripts - when checking clitk tools' return values --- scripts/create_midP-2.0.sh | 3 ++- scripts/create_midP_masks-2.0.sh | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/create_midP-2.0.sh b/scripts/create_midP-2.0.sh index 0b3947b..239745f 100755 --- a/scripts/create_midP-2.0.sh +++ b/scripts/create_midP-2.0.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -x ############################################################################### # @@ -85,6 +85,7 @@ registration() clitkZeroVF -i $vf_in -o vf_zero.mhd abort_on_error registration $? clean_up_registration + patient_mask=$mask_dir/patient_mask_$phase_nb.mhd clitkCombineImage -i $vf_result -j vf_zero.mhd -m $patient_mask -o $vf_result abort_on_error registration $? clean_up_registration diff --git a/scripts/create_midP_masks-2.0.sh b/scripts/create_midP_masks-2.0.sh index 6fadeec..bbf44f0 100755 --- a/scripts/create_midP_masks-2.0.sh +++ b/scripts/create_midP_masks-2.0.sh @@ -42,10 +42,12 @@ extract_bones() extract_lungs() { - echo "$phase_file -> Extracting lungs..." - clitkExtractLung -i $phase_file -o $mask_dir_tmp/lungs_$phase_nb.mhd -a $afdb_file --noAutoCrop + echo "$phase_file -> Extracting lungs..." + clitkExtractLung -i $phase_file -o $mask_dir_tmp/lungs_$phase_nb.mhd -a $afdb_file --noAutoCrop --doNotSeparateLungs } + + resample() { echo "$phase_file -> Resampling..." @@ -62,7 +64,7 @@ compute_motion_mask() FillingLevel=94 fi - clitkMotionMask -i $mask_dir_tmp/patient_$phase_nb.mh -o $mask_dir_tmp/mm_$phase_nb.mhd --featureLungs $mask_dir_tmp/lungs_$phase_nb.mhd --upperThresholdLungs -400 --fillingLevel $FillingLevel --offsetDetect $MotionMaskOffsetDetect --pad --writeFeature=$mask_dir_tmp/feature_$phase_nb.mhd $MotionMaskExtra + clitkMotionMask -i $mask_dir_tmp/patient_$phase_nb.mhd -o $mask_dir_tmp/mm_$phase_nb.mhd --featureLungs $mask_dir_tmp/lungs_$phase_nb.mhd --upperThresholdLungs -400 --fillingLevel $FillingLevel --offsetDetect $MotionMaskOffsetDetect --pad --writeFeature=$mask_dir_tmp/feature_$phase_nb.mhd $MotionMaskExtra #--monitor=$mask_dir_tmp/monitor_$phase_nb.mhd } -- 2.47.1