#! /bin/tcsh -ef

#
# deface_subject
#
# REPLACE_WITH_ONE_LINE_SHORT_DESCRIPTION
#
# Original Author: REPLACE_WITH_FULL_NAME_OF_CREATING_AUTHOR
# CVS Revision Info:
#    $Author: nicks $
#    $Date: 2011/03/02 20:16:39 $
#    $Revision: 1.3 $
#
# Copyright © 2011 The General Hospital Corporation (Boston, MA) "MGH"
#
# Terms and conditions for use, reproduction, distribution and contribution
# are found in the 'FreeSurfer Software License Agreement' contained
# in the file 'LICENSE' found in the FreeSurfer distribution, and here:
#
# https://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferSoftwareLicense
#
# Reporting: freesurfer@nmr.mgh.harvard.edu
#
#


set s=$1
set fdir=$FREESURFER_HOME
set adir=$fdir/average
set mdir=$SUBJECTS_DIR/$s/mri
if (-e $mdir/orig/COR-001 == 0) then
	 set ORIG=orig.mgz
else
	 set ORIG=orig
endif
mri_deface $mdir/$ORIG $fdir/average/talairach_mixed_with_skull.gca $adir/face.gca $mdir/orig_defaced.mgz
