#### save/restore surface view ####
-------------------------------------------
funct (left-click): save/goto view (surfer.mat)
  write_view_matrix
  read_view_matrix
-------------------------------------------
funct (middle-click): interactively add suffix
  set viewmatrix surfer.matSUFFIX
  [write or read]
  set viewmatrix surfer.mat
-------------------------------------------
[left click "View" to get current saved list]
-------------------------------------------


Detailed Description of Label "Save/Goto" Buttons

-------------------------------------------
funct (left-click): save/goto view (surfer.mat)
  write_view_matrix
  read_view_matrix
-------------------------------------------

The "Save" and "Goto" buttons (inside lower
middle left TRANSLATE subpanel) read and write
the current OpenGL viewing matrix.

The buttons can be used to save and restore any
current view (arbitrary rotation, translation,
and scaling) of the current surface.  If the same
subject is opened in a 2nd csurf/tksurfer, the
buttons can be used to align the two ("Save" in
one, "Goto" in both).

The C/tcl read_view_matrix and write_view_matrix
functions called by these buttons read and write
an ASCII file (also written to log on "Save"):

  surfer.mat

in the standard per-subject tmp dir:

  $SUBJECT_DIR/<subject>/tmp

This directory path is stored in the tcl
variable, $subjtmpdir, and can be reset to any
(writable) directory in a tcl script.

N.B.: since the SEND and GOTO vertex buttons
(C/tcl functions: find_orig_vertex_coordinates
and select_orig_vertex_coordinates) also read and
write a file (edit.dat) in $subjtmpdir (as does
tkmedit SEND/GOTO), if you change $subjtmpdir,
restore it to default when you are done using it.

-------------------------------------------
funct (middle-click): interactively add suffix
  set viewmatrix surfer.matSUFFIX
  [write or read]
  set viewmatrix surfer.mat
-------------------------------------------

A non-default middle-click on the "Save" and
"Goto" buttons brings up a pop-up to allow adding
an arbitrary suffix to the default view matrix
filename (surfer.mat) before writing or reading
it, for example:

  surfer.mat-GOODPOSE

To find the available view matrices already saved
for a subject, left-click the "View" label above
the buttons.

To restore this previously saved view in a
rendering tcl script, use:

  set viewmatrix surfer.mat-GOODPOSE
  read_view_matrix

