-------------------------------------------
entry variable: $im2abbrev -- comparison image set
-------------------------------------------
keyboard equiv: [none]

Second/Comparison Image Set (also MGH Seg Overlay)

On startup, the "im2:" entry will contain "T1"
but no second/comparison data set will have been
loaded.  Enter either:

(1) a COR dir (containing 256 256x256x1byte
    or 512 512x512x1byte COR-??? images in
    coronal orientation, and COR-.info file)
    (orig freesurfer format, now rare)

       *or*

(2) an .mgh/.mgh format file (with similar
    orientation, datasize, and imagesize,
    (also typically 256x256x256 byte image)

(3) an .mgh/.mgh format file containing
    a 3D parcellation (int idnum's)

and click the "R" to the right of the entry to
read in a second/comparison data set.  See the
help for the "im:" entry for more details on the
acceptable image format details.

The file name can be entered as a relative,
abbreviated, or absolute path.  Assuming
SUBJECTS_DIR equals /fmri/subjects, the following
3 names refer to the same COR dir data set:

  T1
  ~/mri/T1
  /fmri/subjects/martys/mri/T1

and the following 3 names refer to the same .mgz
data set:

  T1.mgz
  ~/mri/T1.mgz
  /fmri/subjects/martys/mri/T1.mgz

A <Return> is same as "R".  N.B.: edits are
*always* applied to the first/editable image set,
not this second image set, even when the second
image is being viewed.  This is useful, for
example, for editing the wm.mgz data set while
viewing the orig.mgz data set.

Only the first image set can be edited and saved.
However, the "editable" and "second" image can be
swapped.  Also, previous edits made to an image
that is then read into the "second" image can be
copied to the current first/editable image (see
R-click help for the COMPARE button).

MGH Segmentation/ROIs Overlay

This "im2:" entry can also be used to read a 3D
MGH segementation ROI volume as a transparent
overlay.  This is done by the tkmedit.tcl
function, detectshowlabel (after the segmentation
volume has been read into the second buffer).  If
the *.mgz filename stem is one of:

  aseg
  aseg.auto
  aseg.auto_noCCseg
  aparc+aseg
  aparc.a2005s+aseg
  aparc.a2009s+aseg
  wmparc
  wm.asegedit
  wm.seg
  ribbon
  lh.ribbon
  rh.ribbon
  CsurfMaps1
  MY_ANNOT
  HCP-MMP1

the file (containing either byte or int region id
numbers), will be also used to generate a
transparent label overlay onto the image in the
primary (editable) buffer, in most cases using
the region number -> color lookup table in the
text file:

  $CSURF_DIR/lib/lut/FreeSurferColorLUT.txt

If the image filename starts with "Csurf" or
"MY_ANNOT", the overlay colors will instead be
read from:

  $CSURF_DIR/lib/lut/CsurfColorLUT-both.txt

If the image filename start with "HCP-MMP1", the
overlay colors will instead be read from:

  $CSURF_DIR/lib/lut/HCP-MMP1ColorLUT-both.txt

The last two color tables were generated using
the standalone tcl script:

  $CSURF_DIR/bin/noarch/mkbothlut

from single hemisphere Csurf and HCP color tables
(see usage). For more information, do a R-click
to get help on the popup from running the
tksurfer annot2roi.tcl script (also: csurf ->
Help -> All Help Contents -> TkSurfer ->
TclScript -> annot2ROIs.

To add to the list of allowed overlays, update
$mghseglabstemlist at the top of tkmedit.tcl.

Double-middle-click a region to get a popup with
the region name, idnum, and color for an overlay
region.

The byte or integer values in the 3D segmentation
volume will also be loaded as gray-scale bytes
(0-255) into the second single-byte comparison
buffer.  These will only be visible if you untick
"la" (overlay) and click "COMPARE". N.B.: if the
segmentation file contains ints, the single-byte
gray-scale colors in the comparison buffer may be
truncated.

Color Conjunction Overlay and Mask

To mark regions that fall within an elliptical
region of the 2D (im,im2) 'color' (brightness)
space, or to use this as a mask, see R-click help
for the bold "im2" label.  A default left-click
on the bold "im2:" label brings up a color
conjuction popup.

This is a way of examining whether a second image
with a different contrast may be helpful for
segmentation in conjunction with a first image.
