-------------------------------------------
 Cuts and Fills HOWTO
-------------------------------------------
Surface cuts followed by region growing fills are
done for two primary reasons: (1) selecting
region to flatten, and (2) defining a label for
marking the surface or extracting overlaid
data.

Linear cuts are made between selected vertices in
the order in which the vertices have been
selected.  To clear any previously selected
vertices, do a right-click anywhere in the
surface display window.

Generating Patches for Flattening

For example, to flatten the entire cortex, here
is a typical sequence of operations:

  -- MGHTools -> Make Occip Surf Cuts (init outname)
  -- relaxation cuts -- LEFT-CLICK sequence, LINE
  -- remove midline -- LEFT-CLICK sequence, AREA
  -- fill region to keep -- one LEFT-CLICK, FILL
  -- save patch file -- WRITE (?h.full.patch.3d)
  -- select 3d patch in csurf ("patch:" combobox)
  -- SubjectTools or MGHTools -> Flatten Surface

To flatten just the occipital lobe:

  -- MGHTools -> Make Full Surface Cuts (init outname)
  -- rotate to medial view
  -- calcarine cut -- LEFT-CLICK sequence, LINE
  -- cut off occip -- 3 clicks to define plane,
            and 4th to pick side to save, PLANE
  -- save patch file -- WRITE (?h.occip.patch.3d)
  -- select 3d patch in csurf ("patch:" combobox)
  -- SubjectTools or MGHTools -> Flatten Surface

To make new cuts guided by previous set, define
label (see next) by FILL'ing previous "viewcuts"
surface, then read label into uncut inflated
(easier to see cuts with curvature off).

Defining Labels ("label:" line)

There are three main ways of selecting a region
that can be used as a label to mark a set of
vertices, or to extract data currently overlaid
on the surface to an ASCII file:

  (1) make LINE (open), AREA (closed) cuts, FILL
  (2) fill to statistical criterion with ROI
  (3) fill vertices nearest a point with N, A, or R

Region-growing operations done by FILL or ROI
respect any label that has been displayed as a
transparent overlay (that is, using the "D"
button).  ROI respects cuts like FILL does.  Note
that labels whose *data* has been read onto the
surface with the "R" button are treated like any
other overlay data, and will be included in a
FILL or ROI operation.

The FILL and ROI operations can generate
disconnected regions if two or more vertices are
first selected.  It you don't want this, use
right-click to clear all vertices before
starting.

The third method of selecting a region is based
on the 3D Euclidean distance from the
last-selected point.  The size of the region can
controlled by entering either a vertex count (N),
an area in sq mm (A), or a radius in mm (R).

On a folded surface, this will select vertices
that lie within a spherical volumes around the
selected point (this may select disconnected
surface patches).  To select a spherical region
around a point in a sulcus, select the point on
the inflated surface, then change to a folded
surface before clicking N, A, or R.

By contrast, using Euclidian distance selection
method on an inflated surface give a close
approximation to geodesic (shortest path)
distances from the selected point on the folded
surface.

Saving and Using Labels ("label:" line)

To save a label generated by any method, use
label "W" button (tcl: write_val_visible_vertices).
All visible vertices are saved as an ASCII file.
To restore invisible vertices after a cut/FILL,
ROI, or nearest vertices N/A/R operation, use
"UNDO" (last) or "INIT" (back to initially
read-in state).  To clear displayed labels, use
the "CLR".

To use a previously defined label to extract data
from a different surface overlay data set, read
in the surface overlay, use shift-middle-click
"R" (read label data and re-cut label, was "RC"
button) to re-cut the previously defined label,
and then "W" (after choosing a new label name) to
write out the new overlay data for that label.

A short-cut to do the above is: display data to
be extracted, "D" a label, type in new output
label name, then shift-middle-click on the the
"W" button (tcl: write_val_annoted_vertices).

See R-click help for "label:" entry, and R-click
help for each label button for details.
