Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gamorosino committed Oct 7, 2022
1 parent 49b53fc commit 307053e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
reference=${SCRIPT_DIR}'/data/IMAGE_0426.nii.gz'

t1_hm=${proc_dir}'/t1_hm.nii.gz'
if [ ${no_hm} == 0 ]; then
echo "perfroms histogram matching on reference image"
if [ ${no_hm} -eq 0 ]; then
singularity exec -e docker://brainlife/ants:2.2.0-1bc ImageMath 3 ${t1_hm} HistogramMatch ${t1} ${reference}
else
singularity exec -e docker://brainlife/ants:2.2.0-1bc ImageMath 3 ${t1_hm} Normalize ${t1} ${mask} && ImageMath 3 ${t1_hm} m ${t1_hm} 100
Expand Down
4 changes: 2 additions & 2 deletions main_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
echo "mask: "${mask}
input_dir=$( dirname ${t1} )
[ -z ${outputdir} ] && { outputdir=${input_dir}"/segmentation" ; }
[ -z ${no_hm} ] && { no_hm=0 ; }
echo "outputdir: "${outputdir}

mkdir -p ${outputdir}
Expand All @@ -38,8 +39,7 @@

t1_hm=${proc_dir}'/t1_hm.nii.gz'

if [ ${no_hm} == 0 ]; then
echo "perfroms histogram matching on reference image"
if [ ${no_hm} -eq 0 ]; then
ImageMath 3 ${t1_hm} HistogramMatch ${t1} ${reference}
else
ImageMath 3 ${t1_hm} Normalize ${t1} ${mask} && ImageMath 3 ${t1_hm} m ${t1_hm} 100
Expand Down

0 comments on commit 307053e

Please sign in to comment.