-------------------------------------------
tcl function: sampclustctrls
-------------------------------------------
keyboard equivalent: none

Do a default left-click on this text label
("label:") to obtain a popup for setting
parameters that control the process of sampling
3D data to the surface (the PAINT process), for
example, during the extraction of 3D timecourses,
stats, or a voxels-intersected mask.

The sampling process works as follows.  Starting
at each surface vertex x,y,z position, one or
more samples of an aligned 3D data set (rawdata
timecourse, statistic, anatomical dataset) is
sampled.

The single 4x4 matrix in register.dat multiplies
the x,y,z,1 surface vertex vector (linear
transformation) to obtain the x,y,z,1 coordinates
of the 3D data pixel that the surface point lies
within.

The process may be repeated at multiple vertical
offsets (positive or negative) along the surface
normal (vertical sample spacing controlled by
$normddstep), and there may be an operation
afterward on the samples (e.g., max), or all the
depths may be reported.

Since the surface mesh is typically smaller than
the data voxel grid, a given 3D data voxel will
typically by sampled by more than one surface
point (more than one surface point will lie
within it), even if only one sample is taken per
vertex.  There will be even more redundant (i.e.,
weighted) sampling if a depth search is used.

To generate output files that contain uniq 3D
data voxels, use $normdsampuniqvoxflag.  This
will only report the first surface vtx that has
"claimed" a 3D data voxel.  If, in addition,
$normdsampuniqvtxflag is ticked, the *vertex*
that "claims" a voxel will be the one closest to
the average of all vertices sampling the same
voxel.

If $normdsampallflag is also set,
$normdsampuniqvoxflag will be overriden.

The controllable parameters are:

 normdsampsearchflag -- do depth search along norm
 normdsampuniqvoxflag -- only report uniq 3D vox
 normdsampuniqvtxflag -- represent. vtx for uniq 3Dvox
 normdsamplallflag -- report at every search depth

 normdfracflag -- ON=depthfraction, OFF=mm
 bokflag -- experimental Bok sampledepth correction

 normdsamp -- single or minimum sample depth (mm)
 normdmax -- maximum sample depth (mm)

 normdfracsamp -- single or min sampledepth fraction
 normdfracmax -- maximum sampledepth fraction

 normddstep -- mm or fraction to move each new sample
 normdop -- operation on samples (0=max,1=avg,2=min)
   N.B.: only affect tksurfer "PAINT" button

 preclustfthr -- hard stat threshold before surfclust
 clustarea -- min cluster size for cluster filter mm^2

 sulfrac -- Bok parm
 gyrfrac -- Bok parm

For more details on each variable, R-click the
variable tickbox or entry on the popup.
