#### ARROWS/NORMALS/POINTS CONTROLS ####
-------------------------------------------
variable: $arrowscale (popup) -- arrow length
-------------------------------------------
variable: $arrowline (popup) -- arrow stem thickness
-------------------------------------------
variable: $arrowheadfracauto (popup) -- head frac stem len
-------------------------------------------
variable: $arrowheadmin (popup) -- minimum head length
-------------------------------------------
variable: $line_arrowbarbangle (popup) -- angle barbs/stem
-------------------------------------------
variable: $filled_arrowtipangle (popup) -- ang tip-edge/stem
-------------------------------------------
variable: $filled_arrowbarbangle (popup) -- ang barbs/stem
-------------------------------------------
toggle popup variable (left-click tickbox):
  $arrownormflag -- toggle gradient arrow norm
-------------------------------------------
toggle variable (popup):
  $filledarrowsflag -- toggle filled vs. line arrows
-------------------------------------------
toggle variable (popup):
  $centerarrowsflag -- toggle center arrow on vertex
-------------------------------------------
toggle variable (popup):
  $angoffrevarrflag -- toggle display polar arrows
-------------------------------------------
toggle variable (popup):
  $rmgradoutliersflag -- toggle rm grad arrows outliers
-------------------------------------------
toggle variable (ctrl-middle-click tickbox):
  $normalsflag -- toggle display vertex normals
-------------------------------------------
toggle variable (shift-right-click tickbox):
  $dipolesflag -- toggle display vertex vectors from .dipole
------------------------------------------
toggle variable (left-click MESH button):
  $edgesflag -- toggle display vertex vectors
-------------------------------------------
toggle variable (middle-click MESH button):
  $pointsflag -- toggle display vertex points
-------------------------------------------
toggle variable (shortcut: [fn]-k)
  $bigcursorflag -- toggle display bigger select cursor
-------------------------------------------
variable: $meshline -- for left-click MESH button
-------------------------------------------
variable: $pointsize -- for middle-click MESH button
-------------------------------------------
button: GRAD ARROWS -> COLOR (popup button)
  (also: shift-middle click tickbox)
  tcl funct: display gradient amplitude as color
-------------------------------------------

The unlabeled tickbox and entry at the bottom of
the middle right "phc" (phasecontours) panel
toggles the normalization of gradient arrows and
has an aditional 6 overloaded functions related
to gradient arrows and other per-vertex vectors
and points.

The best way to access these (and more above)
parameters is by a right-click on that tickbox to
pop up a control panel (along with the help
window).

Many of these parameters are duplicated on the
FIELDSIGN and GRADIENTS ARROWS popup available
from a R-click on the unlabeled tickbox to the
left of "fs:".


-------------------------------------------
variable: $arrowscale (popup) -- arrow length
-------------------------------------------

The displayed length of gradient arrows can be
globally adjusted with the entry variable,
$arrowscale (default=2.0), which is a fraction
applied to all arrows.  Alternatively, if arrow
length has been normalized (made all the same)
with $arrownormflag, $arrowscale will then be in
units of mm.

-------------------------------------------
variable: $arrowline (popup) -- arrow stem thickness
-------------------------------------------

The thickness of the line used to draw line
arrows (stem and arrowhead are lines) is
controlled with the entry variable, $arrowline.
When $filledarrowsflag is ticked, this entry
controls the thickness of the arrow stem.

-------------------------------------------
variable: $arrowheadfracauto (popup) -- head frac stem len
-------------------------------------------

This variable specifies the size of the arrowhead
as a fraction of the arrow stem length; as the
arrow length declines, the arrow barbs do too
(with a minimum cutoff, see next variable).  To
turn off this scaling, in order to get constant
size arrowheads, set this to 0.0.

-------------------------------------------
variable: $arrowheadmin (popup) -- minimum head length
-------------------------------------------

When $arrowheadfracauto (above) is non-zero, this
variable, $arrowheadmin, sets the minimum size of
the arrowhead (as a fraction of the arrow stem
length).  When arrow-length normalization is
turned off by settings $arrowheadfracauto to
zero, this variable will set the fixed size for
all arrowheads.

-------------------------------------------
variable: $line_arrowbarbangle (popup) -- ang barbs/stem
-------------------------------------------

For line arrows, this variable sets the angle of
the arrow barbs relative to the arrow stem
(default 22.5 deg).  No effect on filled arrows.

-------------------------------------------
variable: $filled_arrowtipangle (popup) -- ang tip-edge/stem
-------------------------------------------

For filled arrows, this variable sets the angle
of the tip of the arrow relative to the arrow
stem (default 15 deg).  If this angle is small
(like the default), the sides of the arrow barbs
will be concave.  Increasing it will make sides
of the arrow barbs flat, and then eventually
convex.  Set to taste.  No effect on line arrows.

-------------------------------------------
variable: $filled_arrowbarbangle (popup) -- ang barbs/stem
-------------------------------------------

For filled arrows, this variable sets the angle 
of the arrow barbs relative to the arrow stem
(default 60 deg).  Increasing it makes a fatter  
arrowhead.  No effect on filled arrows.

-------------------------------------------
toggle variable (left-click bottom "phc" tickbox):
  $arrownormflag -- toggle gradient arrow norm
-------------------------------------------

This unlabeled tick at the bottom of the
phasecontour box ("phc") (or $arrownormflag on
the popup) toggles whether gradient vector
lengths are normalized to the same length or are
proportional.  Gradient vectors are calculated
and displayed when the "F" (fieldsign) or "GR"
(calculate gradients) buttons on the "fs:" line
are used.  See the R-click help for "F" and "GR"
for details.

If the gradients were calculated on phase-encoded
data (i.e., on the phase angles), they will be
appoximately perpendicular to the iso-phase
contours (hence placement of these controls
here).

The unmarked entry immediately to the right of
the tickbox scales the gradient vectors (whether
normalized or not).  When $arrownormflag
(constant length gradient arrows) is enabled,
that field will be autoset to a sane value of 0.5
mm (which can be adjusted afterward).

-------------------------------------------
$filledarrowsflag (popup) -- toggle filled vs. line arrows
-------------------------------------------

This toggles between line arrows and filled
arrowheads.  The filled arrowheads are made of
four adjustable triangles: two for the arrow
barbs, and two forming a diamond for the point.

Depending on the data gradients, other arrow
parameters may need adjusting when this is
toggled.  There is a DEFAULT LINE/FILL ARROWS
button to set defaults for each type.

Currently filled arrows only working for 2D/flat
gradient arrows (no effect of ticking this on 3D
surface arrows).

-------------------------------------------
$centerarrowsflag (popup) -- toggle center arrow on vertex
-------------------------------------------

The default state (ON) centers the stem of the
arrow on the vertex to which it belongs (else,
the arrow stem starts from the vertex).

The only time this is forced off is when two
arrows are drawn at each vertex to illustrate the
polar and and eccentricity gradients at the same
time.

-------------------------------------------
toggle variable (middle-click tickbox):
  $angoffrevarrflag -- toggle display polar arrows
-------------------------------------------

A non-default middle-click toggles the value of
$angoffrevarrflag, which causes polar angle data
in the val/val2 fields to be displayed as arrows.
For more details see the end of the R-click help
for the check box just to the left of "fs:".

-------------------------------------------
toggle variable (popup):
  $rmgradoutliersflag -- toggle rm grad arrows outliers
-------------------------------------------

This toggles whether to remove of overly large
gradient arrow outliers (based on the standard
deviation of the other arrow amplitudes), as well
as overly tiny arrows (based on tiny vertex
area).  The limits themselves can be adjusted on
the popup available from a R-click on the
unmarked tickbox just to the left of "fs:" or on
the "GR" button.

-------------------------------------------
toggle variable (ctrl-middle-click tickbox):
  $normalsflag -- toggle display vertex normals
-------------------------------------------

A third non-default control-middle-click toggles
display of vertex normals as yellow lines with a
ball end.  The length of the lines can be
controlled by the adjoining entry ($arrowscale,
default=2.0) and the line thickness can be
controlled from a tcl script ($arrowline,
default=1.0).

A Shift-Return (instead of a default Return) in
the adjoining entry sets both $arrowscale and
$arrowline to the current entry value.

-------------------------------------------
toggle variable (shift-right-click tickbox):
  $dipolesflag -- toggle display vertex vectors
-------------------------------------------

A fourth non-default shift-right-click toggles
display of vertex vectors (e.g., DTi
eigenvectors) as cyan lines with a ball end.  The
length of the lines can be controlled by the
adjoining entry ($arrowscale, default=2.0) and
the line thickness can be controlled from a tcl
script ($arrowline, default=1.0).

A Shift-Return (instead of a default Return) in
the adjoining arrowscale entry sets both
$arrowscale and $arrowline to the current entry
value.

------------------------------------------
toggle variable (left-click MESH button):
  $edgesflag -- toggle display vertex vectors
-------------------------------------------

This toggles the display of the surface mesh on
and off (equivalent to left-clicking on the MESH
button).

-------------------------------------------
toggle variable (middle-click MESH button):
  $pointsflag -- toggle display vertex points
-------------------------------------------

This toggles the display of the vertex points on
and off (equivalent to middle-clicking on the
MESH button).

-------------------------------------------
toggle variable (shortcut: cmd/alt-k)
  $bigcursorflag -- toggle display bigger select cursor
-------------------------------------------

For high resolution surfaces with large number of
vertices (e.g., post-mortem cerebellum scan), it
can be difficult to see which vertex is selected.
When $bigcursorflag is on, an additional ring of
mesh edges are highlighted (normally, only the
edges extending from the selected vertex are
highlighted).

When $bigcursorflag is ON, only the central
vertex will be selected by a left-click (i.e.,
the same single-vertex selection as when
$bigcursorflag is OFF) - except in the following
special case:

If $bigcursorflag is ON when the C/tcl command
write_val_selected_list_to_label is executed, the
the neighbors of selected vertices will be
included in the output label.  This is useful
when you want to outline where a cut should be
made using one surface, convert those outlines to
a label, and then display that label on a
different surface - for example, to outline the
cerebellar vermis on the highly folded smoothwm
surface where it is easier to see, save that
outline as a label, then display it on the
inflated surface, where the cuts are much easier
to make.

-------------------------------------------
variable: $meshline -- for left-click MESH button
-------------------------------------------

Sets the width of the lines in the surface mesh
toggles by the MESH button.  The default is 1.0
pixel (fractional pixels accepted).

-------------------------------------------
variable: $pointsize -- for middle-click MESH button
-------------------------------------------

Sets the point size of vertex points (toggle on
with a middle-click on MESH).  This is mainly
useful for displaying sparse labels that don't
have enough vertices to be displayed as faces (at
re-cut time).  An example is when a uniq vtx
label is re-cut by a ctrl-left-click "C" on the
"label:" line.

-------------------------------------------
button: GRAD ARROWS -> COLOR (popup button)
  (also: shift-middle click tickbox)
  tcl funct: display gradient amplitude as color
-------------------------------------------

Clicking GRAD ARROWS -> COLOR button on the popup
(or a non-default shift-middle-click on the
unlabeled tickbox at the bottom of the "phc"
subpanel) converts a displayed-as-arrows gradient
data set to a real-valued color gradient
amplitude overlay.  This can only be done once
after calculating a gradient.  To redo, first
reload data, and recalc the gradient on it.  Here
are the tcl commands executed on
shift-middle-click:

  swap_valval2_valbakval2bak
  compute_angles_vals_to_baks
  swap_valval2_valbakval2bak
  swap_val_val2
  set gradvecbakflag 0
  set complexvalflag 0
  set overlayflag 1
  set colscale 6
  set fthresh 0.0
  set fmid 0.08
  set fslope 10.0
  redraw

For more explanatory details, see the R-click
help for the "GR" (gradient) button.

