; HLPTVHLD
;---------------------------------------------------------------
;! Interactive image display with histogram equalization - run-time help
;# TASK TV ANALYSIS INTERACTIVE
;-----------------------------------------------------------------------
;;  Copyright (C) 2014, 2016
;;  Associated Universities, Inc. Washington DC, USA.
;;
;;  This program is free software; you can redistribute it and/or
;;  modify it under the terms of the GNU General Public License as
;;  published by the Free Software Foundation; either version 2 of
;;  the License, or (at your option) any later version.
;;
;;  This program is distributed in the hope that it will be useful,
;;  but WITHOUT ANY WARRANTY; without even the implied warranty of
;;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;  GNU General Public License for more details.
;;
;;  You should have received a copy of the GNU General Public
;;  License along with this program; if not, write to the Free
;;  Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
;;  MA 02139, USA.
;;
;;  Correspondence concerning AIPS should be addressed as follows:
;;         Internet email: aipsmail@nrao.edu.
;;         Postal address: AIPS Project Office
;;                         National Radio Astronomy Observatory
;;                         520 Edgemont Road
;;                         Charlottesville, VA 22903-2475 USA
;-----------------------------------------------------------------------
C-----------------------------------------------------------------------
OFF ZOOM
This option resets any TVZOOM (pixel replication) factors and zoom
center.  The image is actually shown in zoom only during operations
(where zoom may help you point more accurately), during the setting of
the zoom and of the black-and-white or color enhancements.
C-----------------------------------------------------------------------
OFF TRANS
This option turns off any black-and-white done in TVTRANSF.  The color
enhancements from TVPSEUDO or TVPHLAME, if any, will remain.
C-----------------------------------------------------------------------
OFF COLOR
This option turns off color enhancements from TVPSEUDO or TVPHLAME.
Any black-and-white done in TVTRANSF will remain.
C-----------------------------------------------------------------------
TVZOOM
This option lets you set the TV zoom magnification factor and to set the
point about which the zoom takes place.  The cursor points at the zoom
center which will be shifted to the center of the screen.  A hit on
buttons A or B increments the magnification factor and on button C
decrements the magnification factor in a circular fashion.  Hit button D
to exit.  Instructions appear on the message screen.
C-----------------------------------------------------------------------
TVTRANSF
This option allows you to set the black-and-white transfer function
using the TV cursor to control intercept and slope.  Buttons A and B
turn a plot of the LUT on and off, button C reverses the sign of the
slope, and button D ends the enhancement and returns to the menu.
Instructions appear on the message screen.  Note that both the color
and the black and white enhancements apply at the same time.
C-----------------------------------------------------------------------
TVPSEUDO
This option allows you to set the color transfer function using the TV
cursor.  Button A loops through all possible RGB triangles, button B
selects a circle in hue (which is very useful for phase displays),
button C selects several color contours, and button D ends the
enhancement and returns to the menu.  As in AIPS, the TV cursor is used
to adjust the colors within the selected function.  Instructions appear
on the message screen.  Note that both the color and the black and
white enhancements apply at the same time.
C-----------------------------------------------------------------------
TVPHLAME
This option allows you to set the color transfer function using the TV
cursor and a flame-like color scheme.  Buttons A and B cycle through the
sequence of all possible color combinations, while buttons C and D end
the enhancement and return to the menu.  The TV cursor X position
adjusts the image intensity at which the color turns more white, while
the Y position adjusts the way colors add (the gamma).  Instructions
appear on the message screen.  Note that both the color and the black
and white enhancements apply at the same time.
C-----------------------------------------------------------------------
LOAD LIN
This option cause the histogram-equalized image to be loaded to the TV
with a linear transfer function.  The menu is changed to show LOAD LOG
as the next choice.
C-----------------------------------------------------------------------
LOAD LOG
This option cause the histogram-equalized image to be loaded to the TV
with a logarithmic transfer function.  The menu is changed to show
LOAD SQRT as the next choice.
C-----------------------------------------------------------------------
LOAD SQRT
This option cause the histogram-equalized image to be loaded to the TV
with a square-root transfer function.  The menu is changed to show
LOAD LOG2 as the next choice.
C-----------------------------------------------------------------------
LOAD LOG2
This option cause the histogram-equalized image to be loaded to the TV
with a more extreme logarithmic transfer function.  The menu is changed
to show LOAD LIN as the next choice.
C-----------------------------------------------------------------------
ADJUST LOW
This option causes the lower limit of the pixel range used in the
computation of the histogram-equalized image to be adjusted based on the
horizontal position of the TV cursor.  The pixel range in use will be
displayed at the top of the TV screen.  The cursor position translates
into the lower limit using a quadratic form centered on 0.0 to enable
more sensitive adjustments near 0.0.  Hit any button to exit this
function, which will probably be the most important one you use.
C-----------------------------------------------------------------------
ADJUST HIGH
This option causes the upper limit of the pixel range used in the
computation of the histogram-equalized image to be adjusted based on the
horizontal position of the TV cursor.  The pixel range in use will be
displayed at the top of the TV screen.  The cursor position translates
into the upper limit using a quadratic form centered on 0.0 to enable
more sensitive adjustments near 0.0.  Hit any button to exit this
function, which will probably not be as important as ADJUST LOW.
C-----------------------------------------------------------------------
HISTO LIN
This option changes how the normal histogram is treated before it is
used to compute the histogram equalization of the image intensities.
This function causes the histogram values to be used directly which
usually means that intensity values near zero dominate the equalization
and the image tends to lack contrast.  The image is recomputed and
loaded to the TV and the menu is changed to show HISTO LOG as the next
choice.
C-----------------------------------------------------------------------
HISTO LOG
This option changes how the normal histogram is treated before it is
used to compute the histogram equalization of the image intensities.
This function causes the histogram values to be changed to the natural
logarithm of the histogram count + 1 before they are used to equalize
the image intensities.  This usually means that upper intensities are
shown as well as those near zero and the image will have good contrast.
The image is recomputed and loaded to the TV and the menu is changed
to show HISTO 1/4 as the next choice.
C-----------------------------------------------------------------------
HISTO 1/4
This option changes how the normal histogram is treated before it is
used to compute the histogram equalization of the image intensities.
This function causes the histogram values to be changed to the fourth
root of the histogram count before they are used to equalize the
image intensities.  This usually means that upper intensities are shown
as well as those near zero and the image will have good contrast.
The image is recomputed and loaded to the TV and the menu is changed
to show HISTO SQR as the next choice.
C-----------------------------------------------------------------------
HISTO SQR
This option changes how the normal histogram is treated before it is
used to compute the histogram equalization of the image intensities.
This function causes the histogram values to be changed to the square
root of the histogram count before they are used to equalize the
image intensities.  This usually means that upper intensities are shown
as well as those near zero and the image will have less contrast than
the LOG and 1/4 methods but more than the 3/4 and LIN methods.  The
image is recomputed and loaded to the TV and the menu is changed to
show HISTO 3/4 as the next choice.
C-----------------------------------------------------------------------
HISTO 3/4
This option changes how the normal histogram is treated before it is
used to compute the histogram equalization of the image intensities.
This function causes the histogram values to be changed to the 0.75
power of the histogram count before they are used to equalize the
image intensities.  This usually means that upper intensities are shown
a bit more than in LINear, but less than in the LOG, 1/4, and SQR
methods.  The image is recomputed and loaded to the TV and the menu is
changed to show HISTO LIN as the next choice.
C-----------------------------------------------------------------------
EXIT
This option causes the task to exit after writing out the image with
the current intensity range and HISTO method.
C-----------------------------------------------------------------------
ABORT
This option causes the task to exit with an abnormal completion code
and without creating or writing an output image.
C-----------------------------------------------------------------------
