#### toggle statmask, statANDhypot mask ####
-------------------------------------------
toggle variable (left-click):
  $statmaskampflag -- toggle use of stat mask
-------------------------------------------
toggle variable (middle-click):
  $statANDhypotflag -- ROI uses stat AND complex amp
-------------------------------------------
toggle variable (ctrl-middle-click):
  $statANDrealflag -- ROI uses stat AND real amp
-------------------------------------------


The "mask" tickbox (just right of center) toggles
the application of a statistic mask to real- or
complex-valued amplitude data.

N.B.: the two overloads only control how and ROI
fill is done.

-------------------------------------------
Left-click (toggle $statANDhypotflag)
-------------------------------------------

When ticked ($statmaskampflag is 1), the fthresh,
fmid, and fslope entries are each doubled (and
the labels are abbreviated to "fthr:", "fmid",
and "fslo:").

The first entry in each pair controls the
threshold and contrast of the real or complex
amplitude itself.  For example, if a value (or
complex amplitude) is below current $fthresh, it
will not be visible in the overlay.

The second set of entries in each pair controls
whether the amplitude values are masked further
based on what is found in the currently loaded
stat mask.  For example, if the value of of the
invisible .stat field for this pixel is below the
current $sfthresh, the *value* will be masked.

If unticked, the interface goes back to one set
of "fthresh", "fmid", and "fslope" entries for
controlling the amplitude overlay threshold and
contrast.

HOWTO Load Stat Mask

The stat mask is loaded with:

  setfile val <statwfile>
  read_binary_values
  swap_stat_val

Note that this overwrites the .val field, so
.stat should be loaded before val.  Before
loading, stat is initialized to 0.

There is also a direct load function:

  setfile stat <statwfile>
  read_binary_stats

-------------------------------------------
Middle-click (toggle $statANDhypotflag)
-------------------------------------------

A non-default middle-click on this checkbutton
toggles $statANDhypotflag.  This only affects the
lower middle right ROI button "FILL" operation.
This will only fill connected vertices that have
.stat greater than $sfthresh AND complex
amplitude (hypot(.val,val2) greater than
$fthresh.

Setting this turns incompatible $statANDrealflag
OFF.

-------------------------------------------
Control-Middle-click (toggle $statANDrealflag)
-------------------------------------------

A non-default control-middle-click on this
checkbutton toggles $statANDrealflag.  This only
affects the lower middle right ROI button "FILL"
operation.  This will only fill connected
vertices that have .stat greater than $sfthresh
AND real amplitude (.val) greater than $fthresh.

Setting this turns incompatible $statANDhypotflag
OFF.

