-------------------------------------------
functions,var: (left-click): change to CORONAL view
  raise_window
  set plane 0
  pixvaltitle 0 0 0
  redraw
  unzoomcoords
-------------------------------------------
function: (middle-click): flip 3D data
  flip_corview_xyz <[-]{x,y,z}> <[-]{x,y,z}> <[-]{x,y,z}>
-------------------------------------------


Detailed Description CORONAL button

If the view is not CORONAL, a default left-click
of the CORONAL button changes to the CORONAL
slice that goes through the current cursor in
SAGITTAL or HORIZONTAL view.

The "un" tickbox toggles enabling undo-ing of up
to 4 previous sequential edits.  Edits slightly
faster with this off.

-------------------------------------------
Alt funct (middle-click): flip 3D data
-------------------------------------------

An alternate middle-click on the CORONAL button
brings us a pop-up to allow flipping the 3D data
set (after first forcing the image into the
CORONAL view if it wasn't there).  This is useful
for fixing data that had incorrect headers.

N.B.: this can mirror-image the data set
(sometimes necessary).  Also, since there are a
large number of possible flips of a 3D data set
(48), it is easy to get confused.  The data cube
can be viewed from 6 different faces times 4
rotations of each face times 2 enantiomers
(non-mirror-image and mirror-image) = 48.  The
flips are done in the order:

  flip_curr_x_to
  flip_curr_y_to
  flip_curr_z_to

Since the coordinates on the pop-up refer only to
the CORONAL view, this view is forced before
flipping.

The three x,y,z directions are defined in CORONAL
view as:

  x   => left -> right
  y   => bottom -> top
  z   => near -> far

Determine which direction you would like the
current x (left-right) to be flipped to.  You can
use a negative sign.  For example, to left-right
mirror-image a data set, set the entries to:

  flip_curr_x_to   => -x
  flip_curr_y_to   => y
  flip_curr_z_to   => z

and hit READY.  To rotate the data set, you have
to swap coordinates.  The following example
rotates the data 90 deg in the CORONAL plane:

  flip_curr_x_to   => y
  flip_curr_y_to   => x
  flip_curr_z_to   => z

Note that this will make the SAGITTAL button view
appear to be a rotated horizontal slice, and the
HORIZONTAL button view will appear to be a
rotated sagittal slice (this makes sense when you
consider what a taking a sagittal or horizontal
slice through the rotated CORONAL data set would
give you).

When satisfied (be sure to check all 3 views!),
the data can be saved/overwritten with SAVE IMGS,
or "Saved As..." with "W" on the "im:" line.

Volumes and surfaces

To flip and exactly align a surface previously
made from an unflipped volume to a flipped
volume, use the following tcl commands (L/R flip
example) for a 256^3/1mm data set:

  really_flip_brain_x
  really_translate_brain 1 0 0
  setfile outsurf ~/mri/$hemi.orig
  write_binary_surface

or like the following commands for a 512^3/0.5mm
data set:

  really_flip_brain_x
  really_translate_brain 0.5 0.0 0.0
  setfile outsurf ~/mri/$hemi.orig
  write_binary_surface
