Csurf "surface:" entry/dropdown (left)

This entry contains the name of the current
surface for the current subject.  The hemisphere
prefix will be stripped from standard freesurfer
surfaces filename.  For example, the surface file
"rh.orig" will appear as "orig".

The surface files are loaded from this directory:

  $SUBJECTS_DIR/<subject>/surf

For a standard recon-all run, the dropdown will
contain the following surfaces:

  orig
  smoothwm
  white
  pial
  inflated
  sphere
  sphere.reg

Selecting a surface from this dropdown auto-sets
the "Hemisphere Surf:" radio (bottom line of
panel) to the corresponding surface type and and
clicking the "Hemisphere Surf:" radio buttons
will pick the corresponding type of surface file.

For a surface in $SUBJECTS_DIR/<subj>/surf/* to
appear in the dropdown, the filename must begin
with the hemisphere and a freesurfer surface
infix, for example:

 lh.orig
 rh.orig

or it must match the GIFTI surface pattern:

 *.{L,R}.*.surf.gii

or it must match the OBJ or SRF surface patterns:

 *.obj
 *.srf

The freesurfer surface infixes are sorted into
the following order in the dropdown ("?" matches
one character and "*" matches anything):

  orig
  orig?
  orig*
  smoothwm
  inflated
  inflated????   -> e.g., inflation steps
  inflated_avg
  inflated*
  white
  graymid
  pial
  pial?
  sphere
  sphere????
  sphere.reg
  sphere.reg????

Importing a non-freesurfer surface

To make a bare *.vtk surface file appear in the
"surface:" dropdown, first create a new empty
subject with:

  File -> New Subject (Manual Recon)

Then copy the *.vtk file into file into
$SUBJECTS_DIR/<newsubj>/surf.  Finally, prefix
the filename with the hemisphere and freesurfer
surface type.  For example, rename:

  BB2T130527_S4_mp2rage_0_profiles.vtk

to:

  lh.orig.BB2T130527_S4_mp2rage_0_profiles.vtk

Even though *.obj and *.srf surfaces will appear
in the dropdown without a hemisphere prefix, add
one for consistency (if there, it will be
stripped off in the dropdown).

This dropdown is reloaded every time a new
subject is selected.  To update the dropdown if
something has been added after selecting the
subject, reselect the subject (<Return> in the
"subject:" entry).

Input surface file formats

Currently, the tksurfer tcl/C function,
read_binary_surface, auto-detects and reads the
following surface file types:

  FreeSurfer quad file (e.g., $hemi.orig)
  FreeSurfer triangle file (e.g., $hemi.orig)
  FreeSurfer ico ASCII file (e.g., ic7.tri)
  ASCII triangle file ($hemi.ascii)
  ASCII VTK ASCII file (*.vtk)
  ASCII OFF/COFF ASCII file (*.off)
  GIFTI base64 file (*.gii)
  AliasWavefront ASCII file (*.obj)
  Brain Voyager binary file (*.srf)

The surface file type is auto-detected using a
combination of file magic number (first 3 bytes)
and filename suffix.

Since *.srf surfaces have left-handed coordinates
(PIL vs. freesurfer RAS coordinates), they will
appear mirror-imaged in tksurfer (a right hemi
will look like a left hemi, and vice versa, and
you will get a warning panel the first two times
you open the surface).  The surface coordinates
can be mirror-imaged (e.g., in order to save the
surface as a native freesurfer surface) with
"FlipHemi" at the upper right of the larger F3
interface (this flips the sign of the
x-coordinate).

For output surface formats, see the R-click help
for the "outsurf:" entry near the top of the
larger F3 interface.

See Help -> Csurf for details of each surface
file format.

