#! /bin/csh

# doesn't work with newdefs (area format changed into curv format)
# would have to run area2curv first
                                                                                
###### interactively (as opposed to script in this file)
### in a csh/tcsh
# > alphadefs
# > tksurfer -adult-paulr rh smoothwm
# > [wait for tcl prompt: %]
### type following at the tcl prompt
# % set area rh.spherearea
# % write_binary_areas
# % set curv rh.spherearea
# % read_binary_curv
# % redraw
# [other useful commands: info commands *some_string*] => tcl commands matching
                                                                                
setenv SUBJECTS /cervino/data/subjects
alphadefs
#newdefs
                                                                                
set subject = adult-paulr
set hemi = rh
                                                                                
foreach surf (sphere sphere.reg)
  set tclscript = /tmp/TmpTksurferScript.tcl
  cat << ZZZ > $tclscript
read_binary_curv
set area /tmp/$hemi.${surf}area
redraw
write_binary_areas
exit
ZZZ
  tksurfer -${subject} $hemi $surf -tcl $tclscript
end

