Skip to content

Commit

Permalink
disabled defacing by default
Browse files Browse the repository at this point in the history
  • Loading branch information
akhanf committed Feb 9, 2019
1 parent 50bbf2e commit 78ede93
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tar2bids
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function usage {
echo " -w <tempdir> (--tempdir in heudiconv)"
echo " -O \"<additional heudiconv options>\" : default=$heudi_opts"
echo " -C : copy tarfiles to BIDS sourcedata folder"
echo " -D : enable defacing of T1w images : default will not deface"
echo ""
echo " Available heuristic files:"
for h in `ls ${heuristic_dir}/*.py`
Expand All @@ -41,11 +42,14 @@ tarfile_search=
ncores=0
tempdir=
copytar=0
do_deface=0

while getopts "N:o:h:O:P:T:w:C" options; do
while getopts "N:o:h:O:P:T:w:CD" options; do
case $options in
N ) echo " Overriding number of cores: $OPTARG" >&2
ncores=$OPTARG;;
D ) echo " Enabling deface of T1w images" >&2
do_deface=1;;
o ) echo " Overriding output dir as: $OPTARG" >&2
output_dir=`realpath $OPTARG`;;
h ) echo " Overriding heuristic file as: $OPTARG" >&2
Expand Down Expand Up @@ -296,14 +300,18 @@ fi
fi


echo " Defacing images with pydeface..."
if [ "$do_deface" = "1" ]
then

echo " Defacing T1w images with pydeface... (if successful, will back-up non-defaced to sourcedata)"
if [ -n "$sessid" ]
then
parallel -a $heudiconv_subjlist -a $heudiconv_sesslist $popts "$execpath/etc/defaceImages $output_dir {1} {2} | tee -a $tuneup_log.{1}.{2}"
else
parallel -a $heudiconv_subjlist $popts "$execpath/etc/defaceImages $output_dir {1} | tee -a $tuneup_log.{1}"
fi

fi

echo " Cleaning participants file (sorting, removing extra columns)..."
$execpath/etc/cleanParticipantsFile $output_dir
Expand Down

0 comments on commit 78ede93

Please sign in to comment.