###############################################################################
#
# FILE: create_midP-2.0.sh
###############################################################################
#
# FILE: create_midP-2.0.sh
{
echo "$phase_file -> Extracting patient..."
clitkExtractPatient -i $phase_file -o $mask_dir_tmp/patient_mask_$phase_nb.mhd --noAutoCrop -a $afdb_file $ExtractPatientExtra
{
echo "$phase_file -> Extracting patient..."
clitkExtractPatient -i $phase_file -o $mask_dir_tmp/patient_mask_$phase_nb.mhd --noAutoCrop -a $afdb_file $ExtractPatientExtra
- 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 --type 1
resample()
{
echo "$phase_file -> Resampling..."
clitkResampleImage -i $mask_dir_tmp/patient_$phase_nb.mhd -o $mask_dir_tmp/patient_$phase_nb.mhd --spacing $resample_spacing --interp $resample_algo
resample()
{
echo "$phase_file -> Resampling..."
clitkResampleImage -i $mask_dir_tmp/patient_$phase_nb.mhd -o $mask_dir_tmp/patient_$phase_nb.mhd --spacing $resample_spacing --interp $resample_algo
- 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 0,-5,0 --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
for i in $( seq 0 $((${#phase_nbs[@]} - 1))); do
phase_nb=${phase_nbs[$i]}
phase_file=${phase_files[$i]}
for i in $( seq 0 $((${#phase_nbs[@]} - 1))); do
phase_nb=${phase_nbs[$i]}
phase_file=${phase_files[$i]}
check_threads 1
echo "$phase_file -> Computing motion mask..."
compute_motion_mask > $mask_log_dir/motion_mask_$phase_file.log
check_threads 1
echo "$phase_file -> Computing motion mask..."
compute_motion_mask > $mask_log_dir/motion_mask_$phase_file.log
for i in $( seq 0 $((${#phase_nbs[@]} - 1))); do
phase_nb=${phase_nbs[$i]}
phase_file=${phase_files[$i]}
check_threads $MAX_THREADS
mm_postprocessing &
for i in $( seq 0 $((${#phase_nbs[@]} - 1))); do
phase_nb=${phase_nbs[$i]}
phase_file=${phase_files[$i]}
check_threads $MAX_THREADS
mm_postprocessing &