#! /bin/tcsh -f

#
# renormalize_subject_keep_editting
#
# 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:40 $
#    $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
#
#


pushd $SUBJECTS_DIR/$1/scripts
if (-e ../tmp/control.dat == 0) then
		mri_normalize ../mri/orig ../mri/T1
else
		mri_normalize -f ../tmp/control.dat ../mri/orig ../mri/T1
endif
#mri_strip_skull $1 1
mri_watershed $SUBJECTS_DIR/$1/mri/T1 $SUBJECTS_DIR/$1/mri/brain
mri_segment -keep ../mri/brain ../mri/wm
inflate_subject $1
