-------------------------------------------
tcl function: sphimctrls
-------------------------------------------
keyboard equivalent: none

A default left-click on this text label ("im:")
(or a R-click on the "REG" button) in the larger
F3 interface produces a popup for sampling
surface data to a spherical shell and then
optionally saving the result as a *.mgz file in
SUBJECTS_DIR (for debugging):

  ~/mri/sphim.$hemi.mgz

The multiple spherical shells (one for each data
type) are used as possibly simultaneous morph
targets.  They and can contain the following data
types:

  .curv
  .stat
  .val
  .val2
  .valbak
  .val2bak

An optional tick "write_mgh_for_debug_flag"
enables writing out the currently sampled shell
to an *.mgz volume for debugging purposes.  This
can be displayed in tkmedit by selecting it from
the "im:" dropdown and clicking "R".

Since internal sphim data shells are in float
format, and since the optional mgz output is a
byte volume, use the $minsphdata and $maxsphdata
entries to control the floating point numbers
that will be mapped to 0 and 255 (sphim data
values beyond are clamped to these limits).

For example, to view standard curvature data
($sphvoltype=0), use -0.5 and 0.5

On the smaller F2 tksurfer interface panel, a
R-click on "W" on the "val:" line makes a
buttonbar with all the functions on the popup
(including a button to get this popup for
debugging write to .mgz).
