#### restore, zero position, recalc/move to center ####
-------------------------------------------
funct: "Restore original brain pose (left-click-RESTORE)"
  restore
  [keyboard equiv: <Cmd/Alt-Shift-R>]
-------------------------------------------
funct: "Restore zero pos before rot->lat (shift-L-clk-RESTORE)"
  restore_zero_position
-------------------------------------------
funct: "Recalc Disp Center, coords unchanged (mid-clk-RES.)"
  recalc_surface_center
  restore
-------------------------------------------
funct: "ReCent Coords (misaligns surf/3D) (shift-mid-clk-RES.)"
  really_center_brain
  restore
-------------------------------------------


Detailed Description of "RESTORE" Button Actions

-------------------------------------------
funct: "Restore original brain pose (left-click-RESTORE)"
  restore (tksurfer.tcl)
  [keyboard equiv: <Cmd/Alt-Shift-R>]
-------------------------------------------

Resets transformation matrix (rotation,
translation, scale) to a lateral view for a full
hemisphere and to a perpendicular view for a
flattened patch.

Tcl commands for a hemisphere surface:

  make_lateral_view
  redraw

The make_lateral_view function loads the identity
matrix (surface will be oriented so viewer is
looking at the frontal pole), translates the
brain to the average x,y,z coord to center it,
and then rotates the brain to the left or right
depending on which hemisphere for a lateral view.

Tcl commands for a flat patch:

  restore_zero_position
  rotate_brain_x -90
  redraw

If tcl vars $flatzrot, $flatxtrans, $flatytrans,
or $flatscale are defined, these will then be
applied to a flat patch in that order.

-------------------------------------------
funct: "Restore zero pos before rot->lat (shift-L-clk-RESTORE)"
  restore_zero_position
-------------------------------------------

This function resets viewing transformation
matrix (rotate, translation, scale) to the
identity matrix.

This will be equivalent to the CORONAL view of
the 3D data tkmedit (without the default
translation that puts the average vertex of the
hemisphere at the center of window).  For default
reconstructed smoothwm/inflated surfaces, the
surface will be oriented so viewer is looking at
the frontal pole.

For flat patches, this original view is rotated
(see above) so that the brain/patch is viewed
from the top (tkmedit HORIZONTAL view).  This was
an early decision; it would have been more
intuitive for this to have been a side view
(tkmedit SAGITTAL view).

-------------------------------------------
funct: "Recalc Disp Center, coords unchanged (mid-clk-RES.)"
  recalc_surface_center
  restore
-------------------------------------------

Same as RESTORE but first recalculate surface
center (tcl funct: recalc_surface_center).  This
is useful for re-centering a surface that has
been read in over a centered startup surface
(e.g., when changing between folded and inflated
with the "surf:" dropdown).

-------------------------------------------
funct: "ReCent Coords (misaligns surf/3D) (shift-mid-clk-RES.)"
  really_center_brain
  restore
-------------------------------------------

In contrast to the functions above, which only
affect the display of the surface, this function
actually moves all surface vertices after
recalculating the surface center (tcl funct:
really_center_brain).

Note that this will probably misalign the surface
with any 3D data sets.  Useful for already-cut,
inflated, or flattened surfaces.

Since a patch (surface subset) -- including a 3d
patch -- inherits from a full surface, the
initial centering will come from the full
surface.
