-------------------------------------------
tickbox variable (left-click):
  $im2lutoverlayflag -- toggle visibility labels
-------------------------------------------
tickbox variable (middle-click):
  $im2boundsflag -- toggle use im2 (vs. im)
-------------------------------------------

The tickbox at the lower right labeled "la" has
two different functions.


-------------------------------------------
Left-click (toggle $im2lutoverlayflag)
-------------------------------------------

A default left click on the "la" tickbox to the
right of the "im2:" entry toggle visibility of a
transparent overlay of an MGH 3D segmentation
label file.

First read an MGH 3D segmentation label file
(e.g., aparc+aseg.mgz) into "im2:" using the
dropdown to select a file followed by the
adjoining "R" button.  These files may contain
bytes or ints (this will auto-tick "la").

The numbers in the 3D label file (bytes or ints)
are translated into transparent overlay colors by
using the tkmedit tcl/C function,
read_sort_mghval2rgblut, to read the file:

  $CSURF_DIR/lib/lut/FreeSurferColorLUT.txt

which is a 6-column file that looks like this:

#No.	Label Name:		R	G	B	A
#-------------------------------------------------------------------
12	Left-Putamen		236	13	17	0
13	Left-Pallidum		12	48	255	0
 [etc]
#-------------------------------------------------------------------

To use a different MGH-format (6 column) color
lookup table, enter it into the color lookup
table entry (just above "interpolLUT" at the far
right of the F2 tkmedit interface), and click the
"R" there.  This entry can also read 4-column
csurf color lookup tables (for stats overlays).

A double-middle-click on a displayed overlay
region will generate a pop-up with the region
name, idnum, rgb value, and the (0-255) pixel
value of the underlying data set.

The csurf log reports the (byte or int) MGH
segmentation label number (if loaded) when a
pixel is selected:

  tkmedit: val=110 (segid=2022) pixcoords: ...

The transparency of the overlay colors is
controlled by $overlayalpha (default=127), which
can be adjusted using the "tran:" entry at the
lower right of the large F4 tkmedit interface.

The "randlut256" tickbox under "tran:" will
generate a new 256-entry color lookup table (for
byte values 0-255) each time it is clicked to on
(only useful for segmentation overlay containing
bytes, not ints).

To block double-clicks from generating pop-ups
(e.g., for fast editing), use the "no double-clk"
tickbox on the F4 tkmedit interface
($blockdoubleclickflag).

-------------------------------------------
Mid-click (toggle $im2boundsflag)
-------------------------------------------

An alternate middle-click on the "la" tickbox
toggles $im2boundsflag, which causes
bounds-dependent editing (shift-left-click
editing in the image window) to use the second
image (instead of the editable image).  The
bounds are set by the two entries to the right of
the TRUNC button and the target value by the
entry to the right of PF button.


