The SURFACE button starts up tksurfer for the
currently select subject, and loads the currently
selected hemisphere (RIGHT/LEFT "hemi:" buttons)
and currently selected surface ("surface:
dropdown entry and/or radio buttons to the
right).

If "hemi:" BOTH is selected, each hemisphere is
loaded in turn.

The "surface:" entries have had their hemisphere
prefixes stripped (except GIFTI), so selecting
RIGHT and "inflated" loads this surface:

  $SUBJECTS_DIR/<subj>/surf/rh.inflated

Clicking the SURFACE button when it is purple
kills tksurfer (without asking to save anything).

Any text output generated by tksurfer is put into
the bottom log panel (use Cmd-L or Preferences ->
View/Hide Logs to toggle the visibility of the
log panels visible).

When csurf is closed, the entire contents of all
the logs since csurf was first opened are saved
into csurf.log in the current scripts dir (full
path reported on csurf quit), overwriting the
previous logfile (if any).

===================================
Startup Details
===================================

Here is the command line that is typically used
to start tksurfer:

cd $SUBJECTS_DIR/<subj>/scripts
env \
  doublebufferflag=1 \
  dividequadsflag=1 \
  undividequadsflag=0 \
  newquadoutputflag=0 \
  writefloatpatchflag=1 \
  smallscreenflag=0 \
  tiffoutflag=1 \
  black2transparentflag=0 \
  tksurferinterface=mini \
  patchname=full.patch.3d \
  /full/path/to/tksurfer martys09 rh inflated \
  -tcl /tmp/TmpTclSurf.64187

On Ubuntu, doublebufferflag=0 will be used.

The tmp tcl script referenced above,
/tmp/TmpTclSurf.64187, looks like this:


 setfile patch ~/surf/rh.full.patch.3d      ;# glob patchname
 open_window
 read_binary_curv
 make_lateral_view
 set cslope 3.0		;# red/green curvature contrast
 set offset 0.30		;# brightness gray bg (no curv)
 set cvfact 1.30		;# light/dark gray contrast (overlay)
 set light2 0.8		;# upper right light
 redraw
