diff --git a/01.anat_preproc/01.anat_correct.sh b/01.anat_preproc/01.anat_correct.sh index ce75eaa..e5c3b2e 100755 --- a/01.anat_preproc/01.anat_correct.sh +++ b/01.anat_preproc/01.anat_correct.sh @@ -65,15 +65,10 @@ cd ${adir} || exit 1 anat=$( basename ${anat_in%.nii.gz} ) if_missing_do mkdir ${tmp} -# 01. Deoblique & resample -echo "Resample ${anat}" -3drefit -deoblique ${anat_in}.nii.gz -3dresample -orient RPI -inset ${anat_in}.nii.gz -prefix ${tmp}/${anat}_RPI.nii.gz -overwrite - ## 02. Bias Field Correction with ANTs # 02.1. Truncate (0.01) for Bias Correction echo "Performing BFC on ${anat}" -ImageMath 3 ${tmp}/${anat}_trunc.nii.gz TruncateImageIntensity ${tmp}/${anat}_RPI.nii.gz 0.02 0.98 256 +ImageMath 3 ${tmp}/${anat}_trunc.nii.gz TruncateImageIntensity ${anat_in}.nii.gz 0.02 0.98 256 # 02.2. Bias Correction N4BiasFieldCorrection -d 3 -i ${tmp}/${anat}_trunc.nii.gz -o ${tmp}/${anat}_bfc.nii.gz diff --git a/02.func_preproc/01.func_correct.sh b/02.func_preproc/01.func_correct.sh index b276bb0..4dc1ee8 100755 --- a/02.func_preproc/01.func_correct.sh +++ b/02.func_preproc/01.func_correct.sh @@ -78,12 +78,7 @@ then fslroi ${funcsource} ${tmp}/${func}_dsd.nii.gz ${voldiscard} -1 funcsource=${tmp}/${func}_dsd fi -# 01.2. Deoblique & resample -echo "Deoblique and RPI orient ${func}" -3drefit -deoblique ${funcsource}.nii.gz -3dresample -orient RPI -inset ${funcsource}.nii.gz -prefix ${tmp}/${func}_RPI.nii.gz -overwrite -# set name of source for 3dNwarpApply -funcsource=${tmp}/${func}_RPI + # 01.3. Compute outlier fraction if there's more than one TR if [[ "${nTR}" -gt "1" ]] then