#! /bin/csh -f
# use tkmedit to mark critical whitematter points

# set the source directory...
set src_dir = ../mri

# set the target directory and file_name
set targ_dir = ../mri
set src_vol = wm.mgz
#set brain = brain.mgz
set targ_vol = filled.mgz
set controlpoints = ../tmp/control.dat
set cur_dir  = `pwd`

cd ..
set tmp_subj = 0?????*
cd ${cur_dir}

# ATTENTION please specify the cutting planes for the pons and the corpus callosum
#mri_fill -CV 127 128 128 -PV 127 154 128 ${src_dir}/${src_vol} ${targ_dir}/${targ_vol}

# fill needs the aseg.mgz, which we do not have, evade... or use newer dev release...
#recon-all -autorecon2-wm -cc-xyz 127 128 128 -pons-xyz 127 128 154 -subjid ${tmp_subj} -mgz -disable-autoseg -nofill
# 20051005
#recon-all -autorecon2-wm -subjid ${tmp_subj} -mgz -disable-autoseg -nofill -disable-autoseg
# 20060224
recon-all 	-autorecon2-wm \
		-subjid ${tmp_subj} \
		-cc-crs 126 123 96 \
		-pons-crs 126 157 122 \
		-noaseg \
		-xopts-use

#tkmedit -f ${targ_dir}/wm.mgz -aux ${targ_dir}/${src_vol}

#csurf

# does a register file already exist?
#if !(-e ${targ_dir}/${reg}) then
#    cp ./${reg} ${targ_dir}/${reg}
#endif
