aboutsummaryrefslogtreecommitdiff
path: root/pkg/images/tv/iis/doc
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/images/tv/iis/doc')
-rw-r--r--pkg/images/tv/iis/doc/Cv.spc.hlp286
-rw-r--r--pkg/images/tv/iis/doc/blink.hlp46
-rw-r--r--pkg/images/tv/iis/doc/cv.doc332
-rw-r--r--pkg/images/tv/iis/doc/cv.hlp341
-rw-r--r--pkg/images/tv/iis/doc/cv.ms332
-rw-r--r--pkg/images/tv/iis/doc/cvl.hlp287
-rw-r--r--pkg/images/tv/iis/doc/erase.hlp26
-rw-r--r--pkg/images/tv/iis/doc/frame.hlp24
-rw-r--r--pkg/images/tv/iis/doc/lumatch.hlp28
-rw-r--r--pkg/images/tv/iis/doc/monochrome.hlp18
-rw-r--r--pkg/images/tv/iis/doc/pseudocolor.hlp41
-rw-r--r--pkg/images/tv/iis/doc/rgb.hlp33
-rw-r--r--pkg/images/tv/iis/doc/window.hlp38
-rw-r--r--pkg/images/tv/iis/doc/zoom.hlp31
14 files changed, 1863 insertions, 0 deletions
diff --git a/pkg/images/tv/iis/doc/Cv.spc.hlp b/pkg/images/tv/iis/doc/Cv.spc.hlp
new file mode 100644
index 00000000..0b30ae1c
--- /dev/null
+++ b/pkg/images/tv/iis/doc/Cv.spc.hlp
@@ -0,0 +1,286 @@
+.help cv Jan86 tv.cv
+The \fIcv\fR program is used to control the image display from within
+\fIIRAF\fR. It differs from most \fIIRAF\fR programs since it has its
+own prompt and its own internal "language". Each of the available commands
+is described in the following paragraphs, but first a few comments on the
+command structure seem in order. Commands are distinguished by their
+first letter, except for a few instances where the second letter is needed.
+The rest of the command name can be typed if you wish. Commands often
+require specification of frames numbers, colors, quadrants, or numeric
+values. In most cases, the order is unimportant, but, zoom, for instance,
+does require the zoom power right after the command name. The order given
+in the \fIhelp\fR command will always work.
+
+A frame list is indicated in the \fIhelp\fR listing with an \fBF\fR. This
+is to be replaced in the typed command by an \fBf\fR followed (no spaces)
+with a list of the pertinent image planes. Thus, \fBf1\fR means
+\fIframe 1\fR while \fBf42\fR means \fIframes 4\fR
+and \fI2\fR. In most cases, the leading \fBf\fR can be omitted.
+The specification \fBfa\fR means \fIall frames\fR. In those
+cases in the \fIhelp\fR menu where the frame specification is optional,
+omitting the frame list is the same as typing \fBfa\fR; that is, operate
+on \fIall\fR frames.
+
+A color specification is a \fBc\fR followed by a set of letters.
+The letter \fBa\fR means \fIall\fR, just as in the frame specification.
+The letters \fBr, b,\fR and \fBg\fR are the other possibilities for all
+commands other than \fIdg\fR and \fIsnap\fR. For displaying graphics
+planes (\fBdg\fR), the other possibilities are \fBy, p, m, w\fR which
+stand for \fIyellow, purple, mauve,\fR and \fIwhite\fR. (\fIMauve\fR is
+the wrong name and will get changed.) The \fIsnap\fR command accepts, in
+addition to the standard three colors, \fBm, bw,\fR and \fBrgb\fR, which
+stand for \fImonochrome, black and white,\fR and \fIfull color\fR. (See
+the discussion under \fIsnap\fR for further explanation.)
+An omitted color specification is the same as \fIall colors\fR.
+
+Quadrants are given by a \fBq\fR followed by numbers from the set one through
+four, or the letter \fBa\fR as in the frame and color cases. Quadrants are
+numbered in the standard way, with the upper right being \fI1\fR, the upper
+left \fI2\fR, etc. Adjacent quadrants may be referenced by \fBt, b, l,\fR
+and \fBr\fR, standing for \fItop, bottom, left,\fR and \fIright\fR. An
+omitted quadrant specification is the same as \fIall quadrants\fR. Quadrants
+are effective only if the split screen command has set the split point to
+something other than the "origin".
+
+.ls \fBblink\fR N F (C Q) (F C Q)
+The blink rate is given by \fBN\fR, which is in tenths of a second. Although
+current timing routines in \fIIRAF\fR do not recognize partial seconds,
+for the NOAO 4.2BSD UNIX implementation, a non-portable timing routine is
+used so that tenth seconds are usable.
+Erratic timing is pretty much the rule when the system load is large.
+One frame must be given,
+followed by any color or quadrant specification, and then
+optionally followed by any number of similar triads. A specification of
+\fI10 f12 f3 f3 f4\fR would display frames one and two for one second, then
+frame three for two one second intervals, then frame 4, and then recycle.
+The first blink cycle may appear somewhat odd as the code "settles in",
+but the sequence should become regular after that (except for timing
+problems due to system load). In split screen mode, it is necessary to
+specify all the frames together with quadrants, which leads to a lot of
+typing: The reason is that blink simply cycles through a series of
+\fBdi\fR commands, and hence it requires the same information as that
+command.
+.le
+.ls \fBcursor\fR [on off F]
+This command is used to turn the cursor on or off, and to read coordinates
+and pixel values from a frame. Pixel coordinates for a feature are those
+of the image as loaded into the display, and do not change as the image
+is panned or zoomed. Fractional pixel positions are given for zoomed
+images, with a minimum number of decimal places printed (but the same number
+for both the \fIx\fR and \fIy\fR coordinates).
+For an unpanned, unzoomed image plane, the lower left corner
+of the \fIscreen\fR is (1,1)
+even if the image you loaded is smaller than 512x512, occupies only
+a portion of the display screen, and does not extend to the lower left
+corner of the screen. This defect will likely be remedied
+when the \fIcv\fR package is properly integrated into \fIIRAF\fR.
+Pixel information can be read from a frame that is not being displayed.
+.le
+.ls \fBdi\fR F (C Q) [on off]
+The \fId\fRisplay \fIi\fRmage command turns specified frames on (or off).
+Turning a frame off does not erase it. A frame need not have all colors
+turned on, nor appear in all quadrants of a split screen display.
+.le
+.ls \fBdg\fR C (F Q) [on off]
+The \fId\fRisplay \fIg\fRraphics command turns specific graphics planes
+on or off. For the IIS display, neither the frame nor the quadrant
+parameters are relevant. A side-effect of this command is that it
+resets the graphics hardware to the \fIcv\fR standard: red cursor and
+seven graphics planes, each colored differently. If the display is in
+a "weird" state that is not cured with the \fIreset r/t\fR commands,
+and a \fIreset i\fR would destroy images of interest, try a \fIdg ca on\fR
+command followed by \fIdg ca off\fR.
+.le
+.ls \fBerase\fR [F all graphics]
+This command erases the specified frame, or all the graphics planes, or
+all data planes. The command \fBclear\fR is a synonym.
+.le
+.ls \fBmatch\fR (o) (F) (C) (to) (F) (C)
+This command allows the user to copy a look-up table to a specified set
+of tables, and hence, to match the mapping function of frames (and/or
+colors) to a reference table. If the \fBo\fR parameter is omitted, the
+match is among the look-up tables associated with particular frames;
+otherwise, the \fIouput\fR tables are used (hence, the \fBo\fR). In the
+latter case, only colors are important; the frame information should
+be omitted. For the individual frame tables, colors can be omitted, in
+which case a match of frame one to two means to copy the three tables
+of frame two (red, green, and blue) to those of frame one. Only one
+reference frame or color should be given, but \fImatch f23 cgb f1 cr\fR
+is legal and means to match the green and blue color tables of both
+frames two and three to the red table of frame one.
+.le
+.ls \fBoffset\fR C N
+The value N, which can range from -4095 to +4095 is added to the data
+pipeline for color \fBC\fR, thus offsetting the data. This is useful
+if one needs to change the data range that is mapped into the useful part
+of the output tables.
+.le
+.ls \fBpan\fR (F)
+When invoked, this command connects the trackball to the specified frames
+and allows the user to move (pan/roam/scroll) the image about the screen.
+This function is automatically invoked whenever the zoom factor is changed.
+.le
+.ls \fBpseudo\fR (o) (F C) (rn sn)
+Look-up tables are changed with the \fIwindow\fR and the \fIpseudocolor\fR
+commands. Windowing provides linear functions and is discussed under that
+command; \fIpseudo\fR provides pseudo-coloring capabilities. Pseudo-color
+maps are usually best done in the output tables, rather than in the
+look-up tables associated with particular frames; hence, \fBps o\fR is
+the more likely invocation of the start of the command line. A color
+(or colors) can be specified for "output" pseudocolor, in which case, only
+those colors will be affected. For frame look-up tables,
+the frame must be specified.
+
+Two mappings are provided. One uses a set of randomly selected colors
+mapped to a specified number of pixel value ranges. The other uses
+triangle color mappings. The former is invoked with the \fI(rn sn)\fR
+options. In this case, the number following \fBr\fR gives the number of
+ranges/levels into which the input data range is to be divided; to
+each such range, a randomly selected color is assigned. The number
+following \fBs\fR is a seed for the random number generator; changing
+this while using the same number of levels gives different color mappings.
+The default seed is the number of levels. If only the seed is given (\fBr\fR
+omitted), the default number of levels is 8. This mapping is used when
+a contour type display is desired: each color represents an intensity range
+whose width is inversely proportional to the number of levels.
+
+The triangle mapping uses a different triangle in each of the three look-up
+tables (either the sets associated with the specified frames, or the output
+tables). The initial tables map low intensity to blue, middle values to
+green, and high values to red, as shown in the diagram. (The red and blue
+triangles are truncated as their centers are on a table boundary.)
+
+Once invoked, the program then allows the user to adjust the triangle
+mapping. In
+response to the prompt line, select the color to be changed and move the
+trackball: the center of the triangle is given by the \fIx\fR cursor
+coordinate and the width by the \fIy\fR coordinate. Narrow functions
+(small \fIy\fR) allow one to map colors to a limited range of intensity.
+When the mapping is satisfactory, a press of any button "fixes" the
+mapping and the user may then either select another color or exit.
+Before selecting a color, place the cursor at approximately the default
+position for the mapping (or where it was for the last mapping of that
+color under the current command); otherwise, the color map will change
+suddenly when the color is selected via the trackball buttons.
+.le
+.ls \fBrange\fR N (C) (N C ...)
+This command changes the range function in the specified color pipeline
+so that the data is scaled by (divided by) the value \fBN\fR. For the
+IIS, useful range values are 1,2,4 and 8; anything else will be changed
+to the next lowest legal value.
+.le
+.ls \fBreset\fR [r i t a]
+Various registers and tables are reset with this command. If the \fBr\fR
+option is used, the registers are reset. This means that zoom is set to
+one, all images are centered, split screen is removed, the range values are
+set to one and the offset values are set to zero. Also, the cursor is
+turned on and its shape is set. Option \fBi\fR causes all the image and
+graphics planes to be erased and turned off. Option \fBt\fR resets all
+the look-up tables to their default linear, positive slope, form, and
+removes any color mappings by making all the output tables the same, and
+all the frame specific tables the same. Option \fBa\fR does \fIall\fR
+the above.
+.le
+.ls \fBsnap\fR (C)
+This command creates an \fIIRAF\fR image file whose contents are a
+512x512 digital snapshot of the image display screen. If no color
+is specified,
+or if \fIcm\fR (color monochromatic) is given,
+the snapshot is of the \fIblue\fR image, which, if you
+have a black and white image, is the same as the red or the green
+image. Specifying \fBcg\fR for instance will take a snapshot of the
+image that you would get had you specified \fIcg\fR for each frame
+turned on by the \fIdi\fR command. Color is of interest only when
+the window or pseudo color commands have made the three colors distinguishable.
+If the "snapped" image is intended to be fed to the Dicomed film
+recorder, a black and white image is all that is usually provided and so
+a color snap is probably not appropriate.
+In the case of the "no color/monochromatic" snap, the graphics planes are
+all added together, while, if a real color is given, only the graphics
+planes that have some of that color are included in the image.
+The color \fBrgb\fR can be
+given, in which case the red, green, and blue images are weighted equally
+to produce a single image file. This image does not represent well what
+you see, partly because of the equal weight given all colors: some
+mapping of eye sensitivity is probably what is required, but it is not
+implemented.
+
+The program operates by first determining zoom, pan, offset, tables, etc,
+and, for each quadrant of the split screen, which images planes are active.
+Then, for each line of the display, those images are read out from the display's
+memory and the transformations done in hardware are duplicated pixel by pixel
+in software. The word "active" needs a bit of explanation. Any image plane
+whose pixels are contributing to the image is active. No image is active if
+it has been turned off (by the \fIdi\fR) command (or if all images were
+turned off and the one of interest not subsequently turned back on). If the
+image is all zeroes, or if it is not but split screen is active and the
+part of the image being displayed is all zeroes, it is not contributing to
+the output. However, the snap program cannot tell that an active image is
+not contributing anything useful,
+and so it dutifully reads out each pixel and adds zeroes to the output.
+The moral of this is that frames of no interest should be (turned) off before
+snap is called (unless you don't have anything better to do than wait for
+computer prompts). When split screen is active, frames are read only for
+the quadrants in which they are active.
+
+The fastest snaps are for single images that are zoomed but not panned
+and which are displayed (and snapped) in black and white, or snapped
+in a single color.
+.le
+.ls \fBsplit\fR [c o px,y nx,y]
+This command sets the split screen point. Option \fBc\fR is shorthand for
+\fIcenter\fR, which is the normal selection. Option \fBo\fR stands for
+\fIorigin\fR, and is the split position that corresponds to no split screen.
+If you wish to specify the split point in pixels, use the \fBpx,y\fR form, in
+which the coordinates are given as integers. If you prefer to specify
+the point in NDC (which range from 0 though 1.0), use the \fBnx,y\fR form
+in which the coordinates are decimal fractions.
+
+A peculiarity of the IIS hardware is that if no split screen is desired,
+the split point must be moved to the upper left corner of the display, rather
+than to the lower left (the \fIIRAF\fR 1,1 position). This means that no
+split screen (the \fBo\fR option, or what you get after \fBre r\fR) is really
+split screen with only quadrant \fBfour\fR displayed: if you use the \fIdi\fR
+command with quadrant specification, only quadrant 4 data will be seen.
+.le
+.ls \fBtell\fR
+This command displays what little it knows about the display status. At
+present, all it can say is whether any image plane is being displayed, and
+if any are, what is the number of one of them. This rather weak performance
+is the result of various design decisions both within \fIcv\fR and the
+\fIIRAF\fR display code, and may be improved.
+.le
+.ls \fBwindow\fR (o) (F C)
+This command operates just as the \fIpseudo\fR command, except that it
+applies a linear mapping to the output look-up tables (if option \fBo\fR
+is used) or to the frame specific tables. The mapping is controlled by
+the trackball, with the \fIy\fR cursor coordinate supplying the slope
+of the map, and \fIx\fR the offset. If different mappings are given to
+each color, a form of pseudo-color is generated.
+.le
+.ls \fBwrite\fR [F C] text
+This command writes the given text into either an image plane (or planes)
+or into the specified color graphics bit plane(s). The user is prompted
+to place the cursor at the (lower left) corner of the text, which is
+then written to the right in roman font. The user is also asked for
+a text size (default 1.0). If the text is written into a graphics
+plane, and a \fBsnap\fR is requested with no color specification, then
+text in any graphics plane will be included in the image. A color snap,
+on the other hand, will include graphics text to the extent that the
+text is displayed in that color.
+Text written into an image plane
+will have the same appearance as any "full on" pixel; that is, text
+in an image plane is written at maximum intensity,
+overwrites the image data,
+and is affected by look-up tables, offsets,
+and so forth, like any other image pixels.
+.le
+.ls \fBzoom\fR N (F)
+This command zooms the display to the power given by \fBN\fR. For the
+IIS, the power must be 1,2,4, or 8; anything else is changed to the next
+lower legal value. The model 70 zooms all planes together. The center
+of the zoom is determined by the cursor position relative to the first
+frame specified (if none, the lowest numbered active one). Once the zoom
+has taken place, the \fIpan\fR routine is called for the specified frames.
+.le
+.endhelp
diff --git a/pkg/images/tv/iis/doc/blink.hlp b/pkg/images/tv/iis/doc/blink.hlp
new file mode 100644
index 00000000..f1440ebf
--- /dev/null
+++ b/pkg/images/tv/iis/doc/blink.hlp
@@ -0,0 +1,46 @@
+.help blink Jan86 images.tv.iis
+.ih
+NAME
+blink -- Blink frames in the image display
+.ih
+USAGE
+blink frame1 frame2 [frame3 [frame4]]
+.ih
+PARAMETERS
+.ls frame1
+First frame in blink sequence.
+.le
+.ls frame2
+Second frame in blink sequence.
+.le
+.ls frame3
+Third frame in blink sequence.
+.le
+.ls frame4
+Fourth frame in blink sequence.
+.le
+.ls rate = 1.
+Blink rate in seconds per frame. May be any fraction of a second.
+.le
+.ih
+DESCRIPTION
+Two or more frames are alternately displayed on the image display monitor
+("stdimage") at a specified rate per frame.
+.ih
+EXAMPLES
+To blink two frames:
+
+ cl> blink 1 2
+
+To blink three frames at a rate of 2 seconds per frame:
+
+ cl> blink 3 1 2 rate=2
+.ih
+BUGS
+The blink rate is measured in
+software and, therefore, will not be exactly even in a time sharing
+environment.
+.ih
+SEE ALSO
+cv
+.endhelp
diff --git a/pkg/images/tv/iis/doc/cv.doc b/pkg/images/tv/iis/doc/cv.doc
new file mode 100644
index 00000000..d34ccaa0
--- /dev/null
+++ b/pkg/images/tv/iis/doc/cv.doc
@@ -0,0 +1,332 @@
+.TL
+The "cv" Display Package
+.AU
+Richard Wolff
+.DA
+.PP
+The \fIcv\fR program is used to control the image display from within
+\fIIRAF\fR. It differs from most \fIIRAF\fR programs since it has its
+own prompt and its own internal "language". Each of the available commands
+is described in the following paragraphs, but first a few comments on the
+command structure seem in order. Commands are distinguished by their
+first letter, except for a few instances where the second letter is needed.
+The rest of the command name can be typed if you wish. Commands often
+require specification of frames numbers, colors, quadrants, or numeric
+values. In most cases, the order is unimportant, but, zoom, for instance,
+does require the zoom power right after the command name. The order given
+in the \fIhelp\fR command will always work.
+.PP
+A frame list is indicated in the \fIhelp\fR listing with an \fBF\fR. This
+is to be replaced in the typed command by an \fBf\fR followed (no spaces)
+with a list of the pertinent image planes. Thus, \fBf1\fR means
+.I "frame 1"
+while \fBf42\fR means
+.I "frames 4"
+and \fI2\fR. In most cases, the leading \fBf\fR can be omitted.
+The specification \fBfa\fR means \fIall frames\fR. In those
+cases in the \fIhelp\fR menu where the frame specification is optional,
+omitting the frame list is the same as typing \fBfa\fR; that is, operate
+on \fIall\fR frames.
+.PP
+A color specification is a \fBc\fR followed by a set of letters.
+The letter \fBa\fR means \fIall\fR, just as in the frame specification.
+The letters \fBr, b,\fR and \fBg\fR are the other possibilities for all
+commands other than \fIdg\fR and \fIsnap\fR. For displaying graphics
+planes (\fBdg\fR), the other possibilities are \fBy, p, m, w\fR which
+stand for \fIyellow, purple, mauve,\fR and \fIwhite\fR. (\fIMauve\fR is
+the wrong name and will get changed.) The \fIsnap\fR command accepts, in
+addition to the standard three colors, \fBm, bw,\fR and \fBrgb\fR, which
+stand for \fImonochrome, black and white,\fR and \fIfull color\fR. (See
+the discussion under \fIsnap\fR for further explanation.)
+An omitted color specification is the same as \fIall colors\fR.
+.PP
+Quadrants are given by a \fBq\fR followed by numbers from the set one through
+four, or the letter \fBa\fR as in the frame and color cases. Quadrants are
+numbered in the standard way, with the upper right being \fI1\fR, the upper
+left \fI2\fR, etc. Adjacent quadrants may be referenced by \fBt, b, l,\fR
+and \fBr\fR, standing for \fItop, bottom, left,\fR and \fIright\fR. An
+omitted quadrant specification is the same as \fIall quadrants\fR. Quadrants
+are effective only if the split screen command has set the split point to
+something other than the "origin".
+.sp
+.SH
+\fBblink\fR N F (C Q) (F C Q)
+.IP
+The blink rate is given by \fBN\fR, which is in tenths of a second. Although
+current timing routines in \fIIRAF\fR do not recognize partial seconds,
+for the NOAO 4.2BSD UNIX implementation, a non-portable timing routine is
+used so that tenth seconds are usable.
+Erratic timing is pretty much the rule when the system load is large.
+One frame must be given,
+followed by any color or quadrant specification, and then
+optionally followed by any number of similar triads. A specification of
+\fI10 f12 f3 f3 f4\fR would display frames one and two for one second, then
+frame three for two one second intervals, then frame 4, and then recycle.
+The first blink cycle may appear somewhat odd as the code "settles in",
+but the sequence should become regular after that (except for timing
+problems due to system load). In split screen mode, it is necessary to
+specify all the frames together with quadrants, which leads to a lot of
+typing: The reason is that blink simply cycles through a series of
+\fBdi\fR commands, and hence it requires the same information as that
+command.
+.SH
+\fBcursor\fR [on off F]
+.IP
+This command is used to turn the cursor on or off, and to read coordinates
+and pixel values from a frame. Pixel coordinates for a feature are those
+of the image as loaded into the display, and do not change as the image
+is panned or zoomed. Fractional pixel positions are given for zoomed
+images, with a minimum number of decimal places printed (but the same number
+for both the \fIx\fR and \fIy\fR coordinates).
+For an unpanned, unzoomed image plane, the lower left corner
+of the \fIscreen\fR is (1,1)
+even if the image you loaded is smaller than 512x512, occupies only
+a portion of the display screen, and does not extend to the lower left
+corner of the screen. This defect will likely be remedied
+when the \fIcv\fR package is properly integrated into \fIIRAF\fR.
+Pixel information can be read from a frame that is not being displayed.
+.SH
+\fBdi\fR F (C Q) [on off]
+.IP
+The \fId\fRisplay \fIi\fRmage command turns specified frames on (or off).
+Turning a frame off does not erase it. A frame need not have all colors
+turned on, nor appear in all quadrants of a split screen display.
+.SH
+\fBdg\fR C (F Q) [on off]
+.IP
+The \fId\fRisplay \fIg\fRraphics command turns specific graphics planes
+on or off. For the IIS display, neither the frame nor the quadrant
+parameters are relevant. A side-effect of this command is that it
+resets the graphics hardware to the \fIcv\fR standard: red cursor and
+seven graphics planes, each colored differently. If the display is in
+a "weird" state that is not cured with the \fIreset r/t\fR commands,
+and a \fIreset i\fR would destroy images of interest, try a \fIdg ca on\fR
+command followed by \fIdg ca off\fR.
+.SH
+\fBerase\fR [F all graphics]
+.IP
+This command erases the specified frame, or all the graphics planes, or
+all data planes. The command \fBclear\fR is a synonym.
+.SH
+\fBmatch\fR (o) (F) (C) (to) (F) (C)
+.IP
+This command allows the user to copy a look-up table to a specified set
+of tables, and hence, to match the mapping function of frames (and/or
+colors) to a reference table. If the \fBo\fR parameter is omitted, the
+match is among the look-up tables associated with particular frames;
+otherwise, the \fIouput\fR tables are used (hence, the \fBo\fR). In the
+latter case, only colors are important; the frame information should
+be omitted. For the individual frame tables, colors can be omitted, in
+which case a match of frame one to two means to copy the three tables
+of frame two (red, green, and blue) to those of frame one. Only one
+reference frame or color should be given, but \fImatch f23 cgb f1 cr\fR
+is legal and means to match the green and blue color tables of both
+frames two and three to the red table of frame one.
+.SH
+\fBoffset\fR C N
+.IP
+The value N, which can range from -4095 to +4095 is added to the data
+pipeline for color \fBC\fR, thus offsetting the data. This is useful
+if one needs to change the data range that is mapped into the useful part
+of the output tables.
+.SH
+\fBpan\fR (F)
+.IP
+When invoked, this command connects the trackball to the specified frames
+and allows the user to move (pan/roam/scroll) the image about the screen.
+This function is automatically invoked whenever the zoom factor is changed.
+.SH
+\fBpseudo\fR (o) (F C) (rn sn)
+.IP
+Look-up tables are changed with the \fIwindow\fR and the \fIpseudocolor\fR
+commands. Windowing provides linear functions and is discussed under that
+command; \fIpseudo\fR provides pseudo-coloring capabilities. Pseudo-color
+maps are usually best done in the output tables, rather than in the
+look-up tables associated with particular frames; hence, \fBps o\fR is
+the more likely invocation of the start of the command line. A color
+(or colors) can be specified for "output" pseudocolor, in which case, only
+those colors will be affected. For frame look-up tables,
+the frame must be specified.
+.IP
+Two mappings are provided. One uses a set of randomly selected colors
+mapped to a specified number of pixel value ranges. The other uses
+triangle color mappings. The former is invoked with the \fI(rn sn)\fR
+options. In this case, the number following \fBr\fR gives the number of
+ranges/levels into which the input data range is to be divided; to
+each such range, a randomly selected color is assigned. The number
+following \fBs\fR is a seed for the random number generator; changing
+this while using the same number of levels gives different color mappings.
+The default seed is the number of levels. If only the seed is given (\fBr\fR
+omitted), the default number of levels is 8. This mapping is used when
+a contour type display is desired: each color represents an intensity range
+whose width is inversely proportional to the number of levels.
+.IP
+The triangle mapping uses a different triangle in each of the three look-up
+tables (either the sets associated with the specified frames, or the output
+tables). The initial tables map low intensity to blue, middle values to
+green, and high values to red, as shown in the diagram. (The red and blue
+triangles are truncated as their centers are on a table boundary.)
+.sp
+.KS
+.PS
+B: box
+move
+G: box
+move
+R: box
+move to B.sw left 0.375
+line dotted to B.nw
+line dashed to B.s
+move to G.sw
+line dashed to G.n
+line dashed to G.se
+move to R.s
+line dashed to R.ne
+line dotted to R.se right 0.375
+"blue" at B.s below
+"green" at G.s below
+"red" at R.s below
+.PE
+.sp
+.KE
+.IP
+Once invoked, the program then allows the user to adjust the triangle
+mapping. In
+response to the prompt line, select the color to be changed and move the
+trackball: the center of the triangle is given by the \fIx\fR cursor
+coordinate and the width by the \fIy\fR coordinate. Narrow functions
+(small \fIy\fR) allow one to map colors to a limited range of intensity.
+When the mapping is satisfactory, a press of any button "fixes" the
+mapping and the user may then either select another color or exit.
+Before selecting a color, place the cursor at approximately the default
+position for the mapping (or where it was for the last mapping of that
+color under the current command); otherwise, the color map will change
+suddenly when the color is selected via the trackball buttons.
+.SH
+\fBrange\fR N (C) (N C ...)
+.IP
+This command changes the range function in the specified color pipeline
+so that the data is scaled by (divided by) the value \fBN\fR. For the
+IIS, useful range values are 1,2,4 and 8; anything else will be changed
+to the next lowest legal value.
+.SH
+\fBreset\fR [r i t a]
+.IP
+Various registers and tables are reset with this command. If the \fBr\fR
+option is used, the registers are reset. This means that zoom is set to
+one, all images are centered, split screen is removed, the range values are
+set to one and the offset values are set to zero. Also, the cursor is
+turned on and its shape is set. Option \fBi\fR causes all the image and
+graphics planes to be erased and turned off. Option \fBt\fR resets all
+the look-up tables to their default linear, positive slope, form, and
+removes any color mappings by making all the output tables the same, and
+all the frame specific tables the same. Option \fBa\fR does \fIall\fR
+the above.
+.SH
+\fBsnap\fR (C)
+.IP
+This command creates an \fIIRAF\fR image file whose contents are a
+512x512 digital snapshot of the image display screen. If no color
+is specified,
+or if \fIcm\fR (color monochromatic) is given,
+the snapshot is of the \fIblue\fR image, which, if you
+have a black and white image, is the same as the red or the green
+image. Specifying \fBcg\fR for instance will take a snapshot of the
+image that you would get had you specified \fIcg\fR for each frame
+turned on by the \fIdi\fR command. Color is of interest only when
+the window or pseudo color commands have made the three colors distinguishable.
+If the "snapped" image is intended to be fed to the Dicomed film
+recorder, a black and white image is all that is usually provided and so
+a color snap is probably not appropriate.
+In the case of the "no color/monochromatic" snap, the graphics planes are
+all added together, while, if a real color is given, only the graphics
+planes that have some of that color are included in the image.
+The color \fBrgb\fR can be
+given, in which case the red, green, and blue images are weighted equally
+to produce a single image file. This image does not represent well what
+you see, partly because of the equal weight given all colors: some
+mapping of eye sensitivity is probably what is required, but it is not
+implemented.
+.IP
+The program operates by first determining zoom, pan, offset, tables, etc,
+and, for each quadrant of the split screen, which images planes are active.
+Then, for each line of the display, those images are read out from the display's
+memory and the transformations done in hardware are duplicated pixel by pixel
+in software. The word "active" needs a bit of explanation. Any image plane
+whose pixels are contributing to the image is active. No image is active if
+it has been turned off (by the \fIdi\fR) command (or if all images were
+turned off and the one of interest not subsequently turned back on). If the
+image is all zeroes, or if it is not but split screen is active and the
+part of the image being displayed is all zeroes, it is not contributing to
+the output. However, the snap program cannot tell that an active image is
+not contributing anything useful,
+and so it dutifully reads out each pixel and adds zeroes to the output.
+The moral of this is that frames of no interest should be (turned) off before
+snap is called (unless you don't have anything better to do than wait for
+computer prompts). When split screen is active, frames are read only for
+the quadrants in which they are active.
+.IP
+The fastest snaps are for single images that are zoomed but not panned
+and which are displayed (and snapped) in black and white, or snapped
+in a single color.
+.SH
+\fBsplit\fR [c o px,y nx,y]
+.IP
+This command sets the split screen point. Option \fBc\fR is shorthand for
+\fIcenter\fR, which is the normal selection. Option \fBo\fR stands for
+\fIorigin\fR, and is the split position that corresponds to no split screen.
+If you wish to specify the split point in pixels, use the \fBpx,y\fR form, in
+which the coordinates are given as integers. If you prefer to specify
+the point in NDC (which range from 0 though 1.0), use the \fBnx,y\fR form
+in which the coordinates are decimal fractions.
+.IP
+A peculiarity of the IIS hardware is that if no split screen is desired,
+the split point must be moved to the upper left corner of the display, rather
+than to the lower left (the \fIIRAF\fR 1,1 position). This means that no
+split screen (the \fBo\fR option, or what you get after \fBre r\fR) is really
+split screen with only quadrant \fBfour\fR displayed: if you use the \fIdi\fR
+command with quadrant specification, only quadrant 4 data will be seen.
+.SH
+\fBtell\fR
+.IP
+This command displays what little it knows about the display status. At
+present, all it can say is whether any image plane is being displayed, and
+if any are, what is the number of one of them. This rather weak performance
+is the result of various design decisions both within \fIcv\fR and the
+\fIIRAF\fR display code, and may be improved.
+.SH
+\fBwindow\fR (o) (F C)
+.IP
+This command operates just as the \fIpseudo\fR command, except that it
+applies a linear mapping to the output look-up tables (if option \fBo\fR
+is used) or to the frame specific tables. The mapping is controlled by
+the trackball, with the \fIy\fR cursor coordinate supplying the slope
+of the map, and \fIx\fR the offset. If different mappings are given to
+each color, a form of pseudo-color is generated.
+.SH
+\fBwrite\fR [F C] text
+.IP
+This command writes the given text into either an image plane (or planes)
+or into the specified color graphics bit plane(s). The user is prompted
+to place the cursor at the (lower left) corner of the text, which is
+then written to the right in roman font. The user is also asked for
+a text size (default 1.0). If the text is written into a graphics
+plane, and a \fBsnap\fR is requested with no color specification, then
+text in any graphics plane will be included in the image. A color snap,
+on the other hand, will include graphics text to the extent that the
+text is displayed in that color.
+Text written into an image plane
+will have the same appearance as any "full on" pixel; that is, text
+in an image plane is written at maximum intensity,
+overwrites the image data,
+and is affected by look-up tables, offsets,
+and so forth, like any other image pixels.
+.SH
+\fBzoom\fR N (F)
+.IP
+This command zooms the display to the power given by \fBN\fR. For the
+IIS, the power must be 1,2,4, or 8; anything else is changed to the next
+lower legal value. The model 70 zooms all planes together. The center
+of the zoom is determined by the cursor position relative to the first
+frame specified (if none, the lowest numbered active one). Once the zoom
+has taken place, the \fIpan\fR routine is called for the specified frames.
diff --git a/pkg/images/tv/iis/doc/cv.hlp b/pkg/images/tv/iis/doc/cv.hlp
new file mode 100644
index 00000000..6f90d74d
--- /dev/null
+++ b/pkg/images/tv/iis/doc/cv.hlp
@@ -0,0 +1,341 @@
+.help cv Jan86 images.tv.iis
+.ih
+NAME
+cv -- Control image device and take snapshots
+.ih
+USAGE
+cv
+.ih
+PARAMETERS
+.ls snap_file
+Output file for snap image.
+.le
+.ls textsize
+Character size for added text strings.
+.le
+.ih
+COMMANDS
+The following commands are available. This list is also available when
+running the task with the commands h(elp) or ?.
+
+.nf
+--- () : optional; [] : select one; N : number; C/F/Q : see below
+b(link) N F (C Q) (F (C Q)..) blink (N = 10 is one second)
+c(ursor) [on off F] cursor
+di F (C Q) [on off] display image
+dg C (F Q) [on off] display graphics
+e(rase) [N a(ll) g(raphics) F] erase (clear)
+m(atch) (o) F (C) (to) (F) (C) match (output) lookup table
+o(ffset) C N offset color (N: 0 to +- 4095)
+p(an) (F) pan images
+ps(eudo) (o) (F C) (rn sn) pseudo color mapping
+ rn/sn: random n/seed n
+r(ange) N (C) (N C ...) scale image (N: 1-8)
+re(set) [r i t a] reset display
+ registers/image/tables/all
+sn(ap) (C) snap a picture
+s(plit) [c o px,y nx,y] split picture
+t(ell) tell display state
+w(indow) (o) (F C) window (output) frames
+wr(ite) [F C] text write text to frame/graphics
+z(oom) N (F) zoom frames (N: 1-8)
+x or q exit/quit
+--- C: letter c followed by r/g/b/a or, for snap r,g,b,m,bw,rgb,
+--- or for dg r/g/b/y/p/m/w, as 'cr', 'ca', or 'cgb'
+--- F: f followed by a frame number or 'a' for all
+--- Q: q followed by quadrant number or t,b,l,r for top, bottom,...
+.fi
+.ih
+DESCRIPTION
+The \fIcv\fR program is used to control the image display from within
+\fIIRAF\fR. It differs from most \fIIRAF\fR programs since it has its
+own prompt and its own internal "language". Each of the available commands
+is described in the following paragraphs, but first a few comments on the
+command structure seem in order. Commands are distinguished by their
+first letter, except for a few instances where the second letter is needed.
+The rest of the command name can be typed if you wish. Commands often
+require specification of frames numbers, colors, quadrants, or numeric
+values. In most cases, the order is unimportant, but, zoom, for instance,
+does require the zoom power right after the command name. The order given
+in the \fIhelp\fR command will always work.
+
+A frame list is indicated in the \fIhelp\fR listing with an \fBF\fR. This
+is to be replaced in the typed command by an \fBf\fR followed (no spaces)
+with a list of the pertinent image planes. Thus, \fBf1\fR means
+\fIframe 1\fR while \fBf42\fR means \fIframes 4\fR
+and \fI2\fR. In most cases, the leading \fBf\fR can be omitted.
+The specification \fBfa\fR means \fIall frames\fR. In those
+cases in the \fIhelp\fR menu where the frame specification is optional,
+omitting the frame list is the same as typing \fBfa\fR; that is, operate
+on \fIall\fR frames.
+
+A color specification is a \fBc\fR followed by a set of letters.
+The letter \fBa\fR means \fIall\fR, just as in the frame specification.
+The letters \fBr, b,\fR and \fBg\fR are the other possibilities for all
+commands other than \fIdg\fR and \fIsnap\fR. For displaying graphics
+planes (\fBdg\fR), the other possibilities are \fBy, p, m, w\fR which
+stand for \fIyellow, purple, mauve,\fR and \fIwhite\fR. (\fIMauve\fR is
+the wrong name and will get changed.) The \fIsnap\fR command accepts, in
+addition to the standard three colors, \fBm, bw,\fR and \fBrgb\fR, which
+stand for \fImonochrome, black and white,\fR and \fIfull color\fR. (See
+the discussion under \fIsnap\fR for further explanation.)
+An omitted color specification is the same as \fIall colors\fR.
+
+Quadrants are given by a \fBq\fR followed by numbers from the set one through
+four, or the letter \fBa\fR as in the frame and color cases. Quadrants are
+numbered in the standard way, with the upper right being \fI1\fR, the upper
+left \fI2\fR, etc. Adjacent quadrants may be referenced by \fBt, b, l,\fR
+and \fBr\fR, standing for \fItop, bottom, left,\fR and \fIright\fR. An
+omitted quadrant specification is the same as \fIall quadrants\fR. Quadrants
+are effective only if the split screen command has set the split point to
+something other than the "origin".
+
+.ls \fBblink\fR N F (C Q) (F C Q)
+The blink rate is given by \fBN\fR, which is in tenths of a second. Although
+current timing routines in \fIIRAF\fR do not recognize partial seconds,
+for the NOAO 4.2BSD UNIX implementation, a non-portable timing routine is
+used so that tenth seconds are usable.
+Erratic timing is pretty much the rule when the system load is large.
+One frame must be given,
+followed by any color or quadrant specification, and then
+optionally followed by any number of similar triads. A specification of
+\fI10 f12 f3 f3 f4\fR would display frames one and two for one second, then
+frame three for two one second intervals, then frame 4, and then recycle.
+The first blink cycle may appear somewhat odd as the code "settles in",
+but the sequence should become regular after that (except for timing
+problems due to system load). In split screen mode, it is necessary to
+specify all the frames together with quadrants, which leads to a lot of
+typing: The reason is that blink simply cycles through a series of
+\fBdi\fR commands, and hence it requires the same information as that
+command.
+.le
+.ls \fBcursor\fR [on off F]
+This command is used to turn the cursor on or off, and to read coordinates
+and pixel values from a frame. Pixel coordinates for a feature are those
+of the image as loaded into the display, and do not change as the image
+is panned or zoomed. Fractional pixel positions are given for zoomed
+images, with a minimum number of decimal places printed (but the same number
+for both the \fIx\fR and \fIy\fR coordinates).
+For an unpanned, unzoomed image plane, the lower left corner
+of the \fIscreen\fR is (1,1)
+even if the image you loaded is smaller than 512x512, occupies only
+a portion of the display screen, and does not extend to the lower left
+corner of the screen. This defect will likely be remedied
+when the \fIcv\fR package is properly integrated into \fIIRAF\fR.
+Pixel information can be read from a frame that is not being displayed.
+.le
+.ls \fBdi\fR F (C Q) [on off]
+The \fId\fRisplay \fIi\fRmage command selects frames to be displayed on the
+monitor. If neither \fIon\fR or \fIoff\fR is given, the specified frames
+are turned on and all others are turned off. Turning a frame on with
+the \fIon\fR specification displays the frames along with whatever else
+is present; that is the new frame is added to the display. Note that
+turning a frame off does not erase it. A frame need not have all colors
+turned on, nor appear in all quadrants of a split screen display.
+.le
+.ls \fBdg\fR C (F Q) [on off]
+The \fId\fRisplay \fIg\fRraphics command turns specific graphics planes
+on or off. For the IIS display, neither the frame nor the quadrant
+parameters are relevant. A side-effect of this command is that it
+resets the graphics hardware to the \fIcv\fR standard: red cursor and
+seven graphics planes, each colored differently. If the display is in
+a "weird" state that is not cured with the \fIreset r/t\fR commands,
+and a \fIreset i\fR would destroy images of interest, try a \fIdg ca on\fR
+command followed by \fIdg ca off\fR.
+.le
+.ls \fBerase\fR [F all graphics]
+This command erases the specified frame, or all the graphics planes, or
+all data planes. The command \fBclear\fR is a synonym.
+.le
+.ls \fBmatch\fR (o) (F) (C) (to) (F) (C)
+This command allows the user to copy a look-up table to a specified set
+of tables, and hence, to match the mapping function of frames (and/or
+colors) to a reference table. If the \fBo\fR parameter is omitted, the
+match is among the look-up tables associated with particular frames;
+otherwise, the \fIouput\fR tables are used (hence, the \fBo\fR). In the
+latter case, only colors are important; the frame information should
+be omitted. For the individual frame tables, colors can be omitted, in
+which case a match of frame one to two means to copy the three tables
+of frame two (red, green, and blue) to those of frame one. Only one
+reference frame or color should be given, but \fImatch f23 cgb f1 cr\fR
+is legal and means to match the green and blue color tables of both
+frames two and three to the red table of frame one.
+.le
+.ls \fBoffset\fR C N
+The value N, which can range from -4095 to +4095 is added to the data
+pipeline for color \fBC\fR, thus offsetting the data. This is useful
+if one needs to change the data range that is mapped into the useful part
+of the output tables.
+.le
+.ls \fBpan\fR (F)
+When invoked, this command connects the trackball to the specified frames
+and allows the user to move (pan/roam/scroll) the image about the screen.
+This function is automatically invoked whenever the zoom factor is changed.
+.le
+.ls \fBpseudo\fR (o) (F C) (rn sn)
+Look-up tables are changed with the \fIwindow\fR and the \fIpseudocolor\fR
+commands. Windowing provides linear functions and is discussed under that
+command; \fIpseudo\fR provides pseudo-coloring capabilities. Pseudo-color
+maps are usually best done in the output tables, rather than in the
+look-up tables associated with particular frames; hence, \fBps o\fR is
+the more likely invocation of the start of the command line. A color
+(or colors) can be specified for "output" pseudocolor, in which case, only
+those colors will be affected. For frame look-up tables,
+the frame must be specified.
+
+Two mappings are provided. One uses a set of randomly selected colors
+mapped to a specified number of pixel value ranges. The other uses
+triangle color mappings. The former is invoked with the \fI(rn sn)\fR
+options. In this case, the number following \fBr\fR gives the number of
+ranges/levels into which the input data range is to be divided; to
+each such range, a randomly selected color is assigned. The number
+following \fBs\fR is a seed for the random number generator; changing
+this while using the same number of levels gives different color mappings.
+The default seed is the number of levels. If only the seed is given (\fBr\fR
+omitted), the default number of levels is 8. This mapping is used when
+a contour type display is desired: each color represents an intensity range
+whose width is inversely proportional to the number of levels.
+
+The triangle mapping uses a different triangle in each of the three look-up
+tables (either the sets associated with the specified frames, or the output
+tables). The initial tables map low intensity to blue, middle values to
+green, and high values to red, as shown in the diagram. (The red and blue
+triangles are truncated as their centers are on a table boundary.)
+
+Once invoked, the program then allows the user to adjust the triangle
+mapping. In
+response to the prompt line, select the color to be changed and move the
+trackball: the center of the triangle is given by the \fIx\fR cursor
+coordinate and the width by the \fIy\fR coordinate. Narrow functions
+(small \fIy\fR) allow one to map colors to a limited range of intensity.
+When the mapping is satisfactory, a press of any button "fixes" the
+mapping and the user may then either select another color or exit.
+Before selecting a color, place the cursor at approximately the default
+position for the mapping (or where it was for the last mapping of that
+color under the current command); otherwise, the color map will change
+suddenly when the color is selected via the trackball buttons.
+.le
+.ls \fBrange\fR N (C) (N C ...)
+This command changes the range function in the specified color pipeline
+so that the data is scaled by (divided by) the value \fBN\fR. For the
+IIS, useful range values are 1,2,4 and 8; anything else will be changed
+to the next lowest legal value.
+.le
+.ls \fBreset\fR [r i t a]
+Various registers and tables are reset with this command. If the \fBr\fR
+option is used, the registers are reset. This means that zoom is set to
+one, all images are centered, split screen is removed, the range values are
+set to one and the offset values are set to zero. Also, the cursor is
+turned on and its shape is set. Option \fBi\fR causes all the image and
+graphics planes to be erased and turned off. Option \fBt\fR resets all
+the look-up tables to their default linear, positive slope, form, and
+removes any color mappings by making all the output tables the same, and
+all the frame specific tables the same. Option \fBa\fR does \fIall\fR
+the above.
+.le
+.ls \fBsnap\fR (C)
+This command creates an \fIIRAF\fR image file whose contents are a
+512x512 digital snapshot of the image display screen. If no color
+is specified,
+or if \fIcm\fR (color monochromatic) is given,
+the snapshot is of the \fIblue\fR image, which, if you
+have a black and white image, is the same as the red or the green
+image. Specifying \fBcg\fR for instance will take a snapshot of the
+image that you would get had you specified \fIcg\fR for each frame
+turned on by the \fIdi\fR command. Color is of interest only when
+the window or pseudo color commands have made the three colors distinguishable.
+If the "snapped" image is intended to be fed to the Dicomed film
+recorder, a black and white image is all that is usually provided and so
+a color snap is probably not appropriate.
+In the case of the "no color/monochromatic" snap, the graphics planes are
+all added together, while, if a real color is given, only the graphics
+planes that have some of that color are included in the image.
+The color \fBrgb\fR can be
+given, in which case the red, green, and blue images are weighted equally
+to produce a single image file. This image does not represent well what
+you see, partly because of the equal weight given all colors: some
+mapping of eye sensitivity is probably what is required, but it is not
+implemented.
+
+The program operates by first determining zoom, pan, offset, tables, etc,
+and, for each quadrant of the split screen, which images planes are active.
+Then, for each line of the display, those images are read out from the display's
+memory and the transformations done in hardware are duplicated pixel by pixel
+in software. The word "active" needs a bit of explanation. Any image plane
+whose pixels are contributing to the image is active. No image is active if
+it has been turned off (by the \fIdi\fR) command (or if all images were
+turned off and the one of interest not subsequently turned back on). If the
+image is all zeroes, or if it is not but split screen is active and the
+part of the image being displayed is all zeroes, it is not contributing to
+the output. However, the snap program cannot tell that an active image is
+not contributing anything useful,
+and so it dutifully reads out each pixel and adds zeroes to the output.
+The moral of this is that frames of no interest should be (turned) off before
+snap is called (unless you don't have anything better to do than wait for
+computer prompts). When split screen is active, frames are read only for
+the quadrants in which they are active.
+
+The fastest snaps are for single images that are zoomed but not panned
+and which are displayed (and snapped) in black and white, or snapped
+in a single color.
+.le
+.ls \fBsplit\fR [c o px,y nx,y]
+This command sets the split screen point. Option \fBc\fR is shorthand for
+\fIcenter\fR, which is the normal selection. Option \fBo\fR stands for
+\fIorigin\fR, and is the split position that corresponds to no split screen.
+If you wish to specify the split point in pixels, use the \fBpx,y\fR form, in
+which the coordinates are given as integers. If you prefer to specify
+the point in NDC (which range from 0 though 1.0), use the \fBnx,y\fR form
+in which the coordinates are decimal fractions.
+
+A peculiarity of the IIS hardware is that if no split screen is desired,
+the split point must be moved to the upper left corner of the display, rather
+than to the lower left (the \fIIRAF\fR 1,1 position). This means that no
+split screen (the \fBo\fR option, or what you get after \fBre r\fR) is really
+split screen with only quadrant \fBfour\fR displayed: if you use the \fIdi\fR
+command with quadrant specification, only quadrant 4 data will be seen.
+.le
+.ls \fBtell\fR
+This command displays what little it knows about the display status. At
+present, all it can say is whether any image plane is being displayed, and
+if any are, what is the number of one of them. This rather weak performance
+is the result of various design decisions both within \fIcv\fR and the
+\fIIRAF\fR display code, and may be improved.
+.le
+.ls \fBwindow\fR (o) (F C)
+This command operates just as the \fIpseudo\fR command, except that it
+applies a linear mapping to the output look-up tables (if option \fBo\fR
+is used) or to the frame specific tables. The mapping is controlled by
+the trackball, with the \fIy\fR cursor coordinate supplying the slope
+of the map, and \fIx\fR the offset. If different mappings are given to
+each color, a form of pseudo-color is generated.
+.le
+.ls \fBwrite\fR [F C] text
+This command writes the given text into either an image plane (or planes)
+or into the specified color graphics bit plane(s). The user is prompted
+to place the cursor at the (lower left) corner of the text, which is
+then written to the right in roman font. The user is also asked for
+a text size (default 1.0). If the text is written into a graphics
+plane, and a \fBsnap\fR is requested with no color specification, then
+text in any graphics plane will be included in the image. A color snap,
+on the other hand, will include graphics text to the extent that the
+text is displayed in that color.
+Text written into an image plane
+will have the same appearance as any "full on" pixel; that is, text
+in an image plane is written at maximum intensity,
+overwrites the image data,
+and is affected by look-up tables, offsets,
+and so forth, like any other image pixels.
+.le
+.ls \fBzoom\fR N (F)
+This command zooms the display to the power given by \fBN\fR. For the
+IIS, the power must be 1,2,4, or 8; anything else is changed to the next
+lower legal value. The model 70 zooms all planes together. The center
+of the zoom is determined by the cursor position relative to the first
+frame specified (if none, the lowest numbered active one). Once the zoom
+has taken place, the \fIpan\fR routine is called for the specified frames.
+.le
+.ih
+SEE ALSO
+cvl
+.endhelp
diff --git a/pkg/images/tv/iis/doc/cv.ms b/pkg/images/tv/iis/doc/cv.ms
new file mode 100644
index 00000000..d34ccaa0
--- /dev/null
+++ b/pkg/images/tv/iis/doc/cv.ms
@@ -0,0 +1,332 @@
+.TL
+The "cv" Display Package
+.AU
+Richard Wolff
+.DA
+.PP
+The \fIcv\fR program is used to control the image display from within
+\fIIRAF\fR. It differs from most \fIIRAF\fR programs since it has its
+own prompt and its own internal "language". Each of the available commands
+is described in the following paragraphs, but first a few comments on the
+command structure seem in order. Commands are distinguished by their
+first letter, except for a few instances where the second letter is needed.
+The rest of the command name can be typed if you wish. Commands often
+require specification of frames numbers, colors, quadrants, or numeric
+values. In most cases, the order is unimportant, but, zoom, for instance,
+does require the zoom power right after the command name. The order given
+in the \fIhelp\fR command will always work.
+.PP
+A frame list is indicated in the \fIhelp\fR listing with an \fBF\fR. This
+is to be replaced in the typed command by an \fBf\fR followed (no spaces)
+with a list of the pertinent image planes. Thus, \fBf1\fR means
+.I "frame 1"
+while \fBf42\fR means
+.I "frames 4"
+and \fI2\fR. In most cases, the leading \fBf\fR can be omitted.
+The specification \fBfa\fR means \fIall frames\fR. In those
+cases in the \fIhelp\fR menu where the frame specification is optional,
+omitting the frame list is the same as typing \fBfa\fR; that is, operate
+on \fIall\fR frames.
+.PP
+A color specification is a \fBc\fR followed by a set of letters.
+The letter \fBa\fR means \fIall\fR, just as in the frame specification.
+The letters \fBr, b,\fR and \fBg\fR are the other possibilities for all
+commands other than \fIdg\fR and \fIsnap\fR. For displaying graphics
+planes (\fBdg\fR), the other possibilities are \fBy, p, m, w\fR which
+stand for \fIyellow, purple, mauve,\fR and \fIwhite\fR. (\fIMauve\fR is
+the wrong name and will get changed.) The \fIsnap\fR command accepts, in
+addition to the standard three colors, \fBm, bw,\fR and \fBrgb\fR, which
+stand for \fImonochrome, black and white,\fR and \fIfull color\fR. (See
+the discussion under \fIsnap\fR for further explanation.)
+An omitted color specification is the same as \fIall colors\fR.
+.PP
+Quadrants are given by a \fBq\fR followed by numbers from the set one through
+four, or the letter \fBa\fR as in the frame and color cases. Quadrants are
+numbered in the standard way, with the upper right being \fI1\fR, the upper
+left \fI2\fR, etc. Adjacent quadrants may be referenced by \fBt, b, l,\fR
+and \fBr\fR, standing for \fItop, bottom, left,\fR and \fIright\fR. An
+omitted quadrant specification is the same as \fIall quadrants\fR. Quadrants
+are effective only if the split screen command has set the split point to
+something other than the "origin".
+.sp
+.SH
+\fBblink\fR N F (C Q) (F C Q)
+.IP
+The blink rate is given by \fBN\fR, which is in tenths of a second. Although
+current timing routines in \fIIRAF\fR do not recognize partial seconds,
+for the NOAO 4.2BSD UNIX implementation, a non-portable timing routine is
+used so that tenth seconds are usable.
+Erratic timing is pretty much the rule when the system load is large.
+One frame must be given,
+followed by any color or quadrant specification, and then
+optionally followed by any number of similar triads. A specification of
+\fI10 f12 f3 f3 f4\fR would display frames one and two for one second, then
+frame three for two one second intervals, then frame 4, and then recycle.
+The first blink cycle may appear somewhat odd as the code "settles in",
+but the sequence should become regular after that (except for timing
+problems due to system load). In split screen mode, it is necessary to
+specify all the frames together with quadrants, which leads to a lot of
+typing: The reason is that blink simply cycles through a series of
+\fBdi\fR commands, and hence it requires the same information as that
+command.
+.SH
+\fBcursor\fR [on off F]
+.IP
+This command is used to turn the cursor on or off, and to read coordinates
+and pixel values from a frame. Pixel coordinates for a feature are those
+of the image as loaded into the display, and do not change as the image
+is panned or zoomed. Fractional pixel positions are given for zoomed
+images, with a minimum number of decimal places printed (but the same number
+for both the \fIx\fR and \fIy\fR coordinates).
+For an unpanned, unzoomed image plane, the lower left corner
+of the \fIscreen\fR is (1,1)
+even if the image you loaded is smaller than 512x512, occupies only
+a portion of the display screen, and does not extend to the lower left
+corner of the screen. This defect will likely be remedied
+when the \fIcv\fR package is properly integrated into \fIIRAF\fR.
+Pixel information can be read from a frame that is not being displayed.
+.SH
+\fBdi\fR F (C Q) [on off]
+.IP
+The \fId\fRisplay \fIi\fRmage command turns specified frames on (or off).
+Turning a frame off does not erase it. A frame need not have all colors
+turned on, nor appear in all quadrants of a split screen display.
+.SH
+\fBdg\fR C (F Q) [on off]
+.IP
+The \fId\fRisplay \fIg\fRraphics command turns specific graphics planes
+on or off. For the IIS display, neither the frame nor the quadrant
+parameters are relevant. A side-effect of this command is that it
+resets the graphics hardware to the \fIcv\fR standard: red cursor and
+seven graphics planes, each colored differently. If the display is in
+a "weird" state that is not cured with the \fIreset r/t\fR commands,
+and a \fIreset i\fR would destroy images of interest, try a \fIdg ca on\fR
+command followed by \fIdg ca off\fR.
+.SH
+\fBerase\fR [F all graphics]
+.IP
+This command erases the specified frame, or all the graphics planes, or
+all data planes. The command \fBclear\fR is a synonym.
+.SH
+\fBmatch\fR (o) (F) (C) (to) (F) (C)
+.IP
+This command allows the user to copy a look-up table to a specified set
+of tables, and hence, to match the mapping function of frames (and/or
+colors) to a reference table. If the \fBo\fR parameter is omitted, the
+match is among the look-up tables associated with particular frames;
+otherwise, the \fIouput\fR tables are used (hence, the \fBo\fR). In the
+latter case, only colors are important; the frame information should
+be omitted. For the individual frame tables, colors can be omitted, in
+which case a match of frame one to two means to copy the three tables
+of frame two (red, green, and blue) to those of frame one. Only one
+reference frame or color should be given, but \fImatch f23 cgb f1 cr\fR
+is legal and means to match the green and blue color tables of both
+frames two and three to the red table of frame one.
+.SH
+\fBoffset\fR C N
+.IP
+The value N, which can range from -4095 to +4095 is added to the data
+pipeline for color \fBC\fR, thus offsetting the data. This is useful
+if one needs to change the data range that is mapped into the useful part
+of the output tables.
+.SH
+\fBpan\fR (F)
+.IP
+When invoked, this command connects the trackball to the specified frames
+and allows the user to move (pan/roam/scroll) the image about the screen.
+This function is automatically invoked whenever the zoom factor is changed.
+.SH
+\fBpseudo\fR (o) (F C) (rn sn)
+.IP
+Look-up tables are changed with the \fIwindow\fR and the \fIpseudocolor\fR
+commands. Windowing provides linear functions and is discussed under that
+command; \fIpseudo\fR provides pseudo-coloring capabilities. Pseudo-color
+maps are usually best done in the output tables, rather than in the
+look-up tables associated with particular frames; hence, \fBps o\fR is
+the more likely invocation of the start of the command line. A color
+(or colors) can be specified for "output" pseudocolor, in which case, only
+those colors will be affected. For frame look-up tables,
+the frame must be specified.
+.IP
+Two mappings are provided. One uses a set of randomly selected colors
+mapped to a specified number of pixel value ranges. The other uses
+triangle color mappings. The former is invoked with the \fI(rn sn)\fR
+options. In this case, the number following \fBr\fR gives the number of
+ranges/levels into which the input data range is to be divided; to
+each such range, a randomly selected color is assigned. The number
+following \fBs\fR is a seed for the random number generator; changing
+this while using the same number of levels gives different color mappings.
+The default seed is the number of levels. If only the seed is given (\fBr\fR
+omitted), the default number of levels is 8. This mapping is used when
+a contour type display is desired: each color represents an intensity range
+whose width is inversely proportional to the number of levels.
+.IP
+The triangle mapping uses a different triangle in each of the three look-up
+tables (either the sets associated with the specified frames, or the output
+tables). The initial tables map low intensity to blue, middle values to
+green, and high values to red, as shown in the diagram. (The red and blue
+triangles are truncated as their centers are on a table boundary.)
+.sp
+.KS
+.PS
+B: box
+move
+G: box
+move
+R: box
+move to B.sw left 0.375
+line dotted to B.nw
+line dashed to B.s
+move to G.sw
+line dashed to G.n
+line dashed to G.se
+move to R.s
+line dashed to R.ne
+line dotted to R.se right 0.375
+"blue" at B.s below
+"green" at G.s below
+"red" at R.s below
+.PE
+.sp
+.KE
+.IP
+Once invoked, the program then allows the user to adjust the triangle
+mapping. In
+response to the prompt line, select the color to be changed and move the
+trackball: the center of the triangle is given by the \fIx\fR cursor
+coordinate and the width by the \fIy\fR coordinate. Narrow functions
+(small \fIy\fR) allow one to map colors to a limited range of intensity.
+When the mapping is satisfactory, a press of any button "fixes" the
+mapping and the user may then either select another color or exit.
+Before selecting a color, place the cursor at approximately the default
+position for the mapping (or where it was for the last mapping of that
+color under the current command); otherwise, the color map will change
+suddenly when the color is selected via the trackball buttons.
+.SH
+\fBrange\fR N (C) (N C ...)
+.IP
+This command changes the range function in the specified color pipeline
+so that the data is scaled by (divided by) the value \fBN\fR. For the
+IIS, useful range values are 1,2,4 and 8; anything else will be changed
+to the next lowest legal value.
+.SH
+\fBreset\fR [r i t a]
+.IP
+Various registers and tables are reset with this command. If the \fBr\fR
+option is used, the registers are reset. This means that zoom is set to
+one, all images are centered, split screen is removed, the range values are
+set to one and the offset values are set to zero. Also, the cursor is
+turned on and its shape is set. Option \fBi\fR causes all the image and
+graphics planes to be erased and turned off. Option \fBt\fR resets all
+the look-up tables to their default linear, positive slope, form, and
+removes any color mappings by making all the output tables the same, and
+all the frame specific tables the same. Option \fBa\fR does \fIall\fR
+the above.
+.SH
+\fBsnap\fR (C)
+.IP
+This command creates an \fIIRAF\fR image file whose contents are a
+512x512 digital snapshot of the image display screen. If no color
+is specified,
+or if \fIcm\fR (color monochromatic) is given,
+the snapshot is of the \fIblue\fR image, which, if you
+have a black and white image, is the same as the red or the green
+image. Specifying \fBcg\fR for instance will take a snapshot of the
+image that you would get had you specified \fIcg\fR for each frame
+turned on by the \fIdi\fR command. Color is of interest only when
+the window or pseudo color commands have made the three colors distinguishable.
+If the "snapped" image is intended to be fed to the Dicomed film
+recorder, a black and white image is all that is usually provided and so
+a color snap is probably not appropriate.
+In the case of the "no color/monochromatic" snap, the graphics planes are
+all added together, while, if a real color is given, only the graphics
+planes that have some of that color are included in the image.
+The color \fBrgb\fR can be
+given, in which case the red, green, and blue images are weighted equally
+to produce a single image file. This image does not represent well what
+you see, partly because of the equal weight given all colors: some
+mapping of eye sensitivity is probably what is required, but it is not
+implemented.
+.IP
+The program operates by first determining zoom, pan, offset, tables, etc,
+and, for each quadrant of the split screen, which images planes are active.
+Then, for each line of the display, those images are read out from the display's
+memory and the transformations done in hardware are duplicated pixel by pixel
+in software. The word "active" needs a bit of explanation. Any image plane
+whose pixels are contributing to the image is active. No image is active if
+it has been turned off (by the \fIdi\fR) command (or if all images were
+turned off and the one of interest not subsequently turned back on). If the
+image is all zeroes, or if it is not but split screen is active and the
+part of the image being displayed is all zeroes, it is not contributing to
+the output. However, the snap program cannot tell that an active image is
+not contributing anything useful,
+and so it dutifully reads out each pixel and adds zeroes to the output.
+The moral of this is that frames of no interest should be (turned) off before
+snap is called (unless you don't have anything better to do than wait for
+computer prompts). When split screen is active, frames are read only for
+the quadrants in which they are active.
+.IP
+The fastest snaps are for single images that are zoomed but not panned
+and which are displayed (and snapped) in black and white, or snapped
+in a single color.
+.SH
+\fBsplit\fR [c o px,y nx,y]
+.IP
+This command sets the split screen point. Option \fBc\fR is shorthand for
+\fIcenter\fR, which is the normal selection. Option \fBo\fR stands for
+\fIorigin\fR, and is the split position that corresponds to no split screen.
+If you wish to specify the split point in pixels, use the \fBpx,y\fR form, in
+which the coordinates are given as integers. If you prefer to specify
+the point in NDC (which range from 0 though 1.0), use the \fBnx,y\fR form
+in which the coordinates are decimal fractions.
+.IP
+A peculiarity of the IIS hardware is that if no split screen is desired,
+the split point must be moved to the upper left corner of the display, rather
+than to the lower left (the \fIIRAF\fR 1,1 position). This means that no
+split screen (the \fBo\fR option, or what you get after \fBre r\fR) is really
+split screen with only quadrant \fBfour\fR displayed: if you use the \fIdi\fR
+command with quadrant specification, only quadrant 4 data will be seen.
+.SH
+\fBtell\fR
+.IP
+This command displays what little it knows about the display status. At
+present, all it can say is whether any image plane is being displayed, and
+if any are, what is the number of one of them. This rather weak performance
+is the result of various design decisions both within \fIcv\fR and the
+\fIIRAF\fR display code, and may be improved.
+.SH
+\fBwindow\fR (o) (F C)
+.IP
+This command operates just as the \fIpseudo\fR command, except that it
+applies a linear mapping to the output look-up tables (if option \fBo\fR
+is used) or to the frame specific tables. The mapping is controlled by
+the trackball, with the \fIy\fR cursor coordinate supplying the slope
+of the map, and \fIx\fR the offset. If different mappings are given to
+each color, a form of pseudo-color is generated.
+.SH
+\fBwrite\fR [F C] text
+.IP
+This command writes the given text into either an image plane (or planes)
+or into the specified color graphics bit plane(s). The user is prompted
+to place the cursor at the (lower left) corner of the text, which is
+then written to the right in roman font. The user is also asked for
+a text size (default 1.0). If the text is written into a graphics
+plane, and a \fBsnap\fR is requested with no color specification, then
+text in any graphics plane will be included in the image. A color snap,
+on the other hand, will include graphics text to the extent that the
+text is displayed in that color.
+Text written into an image plane
+will have the same appearance as any "full on" pixel; that is, text
+in an image plane is written at maximum intensity,
+overwrites the image data,
+and is affected by look-up tables, offsets,
+and so forth, like any other image pixels.
+.SH
+\fBzoom\fR N (F)
+.IP
+This command zooms the display to the power given by \fBN\fR. For the
+IIS, the power must be 1,2,4, or 8; anything else is changed to the next
+lower legal value. The model 70 zooms all planes together. The center
+of the zoom is determined by the cursor position relative to the first
+frame specified (if none, the lowest numbered active one). Once the zoom
+has taken place, the \fIpan\fR routine is called for the specified frames.
diff --git a/pkg/images/tv/iis/doc/cvl.hlp b/pkg/images/tv/iis/doc/cvl.hlp
new file mode 100644
index 00000000..cda07b07
--- /dev/null
+++ b/pkg/images/tv/iis/doc/cvl.hlp
@@ -0,0 +1,287 @@
+.help cvl Jul87 images.tv.iis
+.ih
+NAME
+cvl -- load images in image display
+.ih
+USAGE
+cvl image frame
+.ih
+PARAMETERS
+.ls image
+Image to be loaded.
+.le
+.ls frame
+Display frame to be loaded.
+.le
+.ls erase = yes
+Erase frame before loading image?
+.le
+.ls border_erase = no
+Erase unfilled area of window in display frame if the whole frame is not
+erased?
+.le
+.ls select_frame = yes
+Display the frame to be loaded?
+.le
+.ls fill = no
+Interpolate or block average the image to fit the display window?
+.le
+.ls zscale = yes
+Apply an automatic intensity mapping algorithm when loading the image?
+.le
+.ls contrast = 0.25
+Contrast factor for the automatic intensity mapping algorithm.
+.le
+.ls zrange = yes
+If not using the automatic mapping algorithm (\fIzscale = no\fR) map the
+full range of the image intensity to the full range of the display?
+.le
+.ls nsample_lines = 5
+Number of sample lines to use in the automatic intensity mapping algorithm.
+.le
+.ls xcenter = 0.5, ycenter = 0.5
+Horizontal and vertical centers of the display window in normalized
+coordinates measured from the left and bottom respectively.
+.le
+.ls xsize = 1, ysize = 1
+Horizontal and vertical sizes of the display window in normalized coordinates.
+.le
+.ls xmag = 1., ymag = 1.
+Horizontal and vertical image magnifications when not filling the display
+window. Magnifications greater than 1 map image pixels into more than 1
+display pixel and magnifications less than 1 map more than 1 image pixel
+into a display pixel.
+.le
+.ls z1, z2
+Minimum and maximum image intensity to be mapped to the minimum and maximum
+display levels. These values apply when not using the automatic or range
+intensity mapping methods.
+.le
+.ls ztrans = "linear"
+Transformation of the image intensity levels to the display levels. The
+choices are:
+.ls "linear"
+Map the minimum and maximum image intensities linearly to the minimum and
+maximum display levels.
+.le
+.ls "log"
+Map the minimum and maximum image intensities linearly to the range 1 to 1000,
+take the logarithm (base 10), and then map the logarithms to the display
+range.
+.le
+.ls "none"
+Apply no mapping of the image intensities (regardless of the values of
+\fIzscale, zrange, z1, and z2\fR). For most image displays, values exceeding
+the maximum display value are truncated by masking the highest bits.
+This corresponds to applying a modulus operation to the intensity values
+and produces "wrap-around" in the display levels.
+.le
+.ls "user"
+User supplies a look up table of intensities and their corresponding
+greyscale values.
+.le
+.le
+.ls lutfile = ""
+Name of text file containing the look up table when \fIztrans\fR = user.
+The table should contain two columns per line; column 1 contains the
+intensity, column 2 the desired greyscale output.
+.le
+.ih
+DESCRIPTION
+The specified image is loaded into the specified frame of the standard
+image display device ("stdimage"). For devices with more than one
+frame it is possible to load an image in a frame different than that
+displayed on the monitor. An option allows the loaded frame to become
+the displayed frame. The previous contents of the frame may be erased
+(which can be done very quickly on most display devices) before the
+image is loaded. Without erasing, the image replaces only those pixels
+in the frame defined by the display window and spatial mapping
+described below. This allows displaying more than one image in a
+frame. An alternate erase option erases only those pixels in the
+defined display window which are not occupied by the image being
+loaded. This is generally slower than erasing the entire frame and
+should be used only if a display window is smaller than the entire
+frame.
+
+The image is mapped both in intensity and in space. The intensity is
+mapped from the image pixel values to the range of display values in
+the device. Spatial interpolation maps the image pixel coordinates
+into a part of the display frame called the display window. Many of
+the parameters of this task are related to these two transformations.
+
+A display window is defined in terms of the full frame. The lower left
+corner of the frame is (0, 0) and the upper right corner is (1, 1) as viewed on
+the monitor. The display window is specified by a center (defaulted to the
+center of the frame (0.5, 0.5)) and a size (defaulted to the full size of
+the frame, 1 by 1). The image is loaded only within the display window and
+does not affect data outside the window; though, of course, an initial
+frame erase erases the entire frame. By using different windows one may
+load several images in various parts of the display frame.
+
+If the option \fIfill\fR is selected the image is spatially interpolated
+to fill the display window in its largest dimension (with an aspect
+ratio of 1:1). When the display window is not automatically filled
+the image is scaled by the magnification factors (which need not be
+the same) and centered in the display window. If the number of image
+pixels exceeds the number of display pixels in the window only the central
+portion of the image which fills the window is loaded. By default
+the display window is the full frame, the image is not interpolated
+(no filling and magnification factors of 1), and is centered in the frame.
+The spatial interpolation algorithm is described in the section
+MAGNIFY AND FILL ALGORITHM.
+
+There are several options for mapping the pixel values to the display
+values. There are two steps; mapping a range of image intensities to
+the full display range and selecting the mapping function or
+transformation. The mapping transformation is set by the parameter
+\fIztrans\fR. The most direct mapping is "none" which loads the image
+pixel values directly without any transformation or range mapping.
+Most displays only use the lowest bits resulting in a wrap-around
+effect for images with a range exceeding the display range. This is
+sometimes desirable because it produces a contoured image which is not
+saturated at the brightest or weakest points. This transformation is
+also the fastest. Another transformation, "linear", maps the selected
+image range linearly to the full display range. The logarithmic
+transformation, "log", maps the image range linearly between 1 and 1000
+and then maps the logarithm (base 10) linearly to the full display
+range. In the latter transformations pixel values greater than
+selected maximum display intensity are set to the maximum display value
+and pixel values less than the minimum intensity are set to the minimum
+display value.
+
+Methods for setting of the range of image pixel values, \fIz1\fR and
+\fIz2\fR, to be mapped to the full display range are arranged in a
+hierarchy from an automatic mapping which gives generally good result
+for typical astronomical images to those requiring the user to specify
+the mapping in detail. The automatic mapping is selected with the
+parameter \fIzscale\fR. The automatic mapping algorithm is described
+in the section ZSCALE ALGORITHM and has two parameters,
+\fInsample_lines\fR and \fIcontrast\fR.
+
+When \fIztrans\fR = user, a look up table of intensity values and their
+corresponding greyscale levels is read from the file specified by the
+\fIlutfile\fR parameter. From this information, a piecewise linear
+look up table containing 4096 discrete values is composed. The text
+format table contains two columns per line; column 1 contains the
+intensity, column 2 the desired greyscale output. The greyscale values
+specified by the user must match those available on the output device.
+Task \fIshowcap\fR can be used to determine the range of acceptable
+greyscale levels. When \fIztrans\fR = user, parameters \fIzscale\fR,
+\fIzrange\fR and \fIzmap\fR are ignored.
+
+If the zscale algorithm is not selected the \fIzrange\fR parameter is
+examined. If \fIzrange\fR is yes then \fIz1\fR and \fIz2\fR are set to
+the minimum and maximum image pixels values, respectively. This insures
+that the full range of the image is displayed but is generally slower
+than the zscale algorithm (because all the image pixels must be examined)
+and, for images with a large dynamic range, will generally show only the
+brightest parts of the image.
+
+Finally, if the zrange algorithm is not selected the user specifies the
+values of \fIz1\fR and \fIz2\fR directly.
+.ih
+ZSCALE ALGORITHM
+The zscale algorithm is designed to display the image values near the median
+image value without the time consuming process of computing a full image
+histogram. This is particularly useful for astronomical images which
+generally have a very peaked histogram corresponding to the background
+sky in direct imaging or the continuum in a two dimensional spectrum.
+
+A subset of the image is examined. Approximately 600 pixels are
+sampled evenly over the image. The number of lines is a user parameter,
+\fInsample_lines\fR. The pixels are ranked in brightness to
+form the function I(i) where i is the rank of the pixel and I is its value.
+Generally the midpoint of this function (the median) is very near the peak
+of the image histogram and there is a well defined slope about the midpoint
+which is related to the width of the histogram. At the ends of the
+I(i) function there are a few very bright and dark pixels due to objects
+and defects in the field. To determine the slope a linear function is fit
+with iterative rejection;
+
+ I(i) = intercept + slope * (i - midpoint)
+
+If more than half of the points are rejected
+then there is no well defined slope and the full range of the sample
+defines \fIz1\fR and \fIz2\fR. Otherwise the endpoints of the linear
+function are used (provided they are within the original range of the
+sample):
+
+.nf
+ z1 = I(midpoint) + (slope / contrast) * (1 - midpoint)
+ z2 = I(midpoint) + (slope / contrast) * (npoints - midpoint)
+.fi
+
+As can be seen, the parameter \fIcontrast\fR may be used to adjust the contrast
+produced by this algorithm.
+.ih
+MAGNIFY AND FILL ALGORITHM
+The spatial interpolation algorithm magnifies (or demagnifies) the
+image along each axis by the desired amount. The fill option is a
+special case of magnification in that the magnification factors are set
+by the requirement that the image just fit the display window in its
+maximum dimension with an aspect ratio (ratio of magnifications) of 1.
+There are two requirements on the interpolation algorithm; all the
+image pixels must contribute to the interpolated image and the
+interpolation must be time efficient. The second requirement means that
+simple linear interpolation is used. If more complex interpolation is
+desired then tasks in the IMAGES package must be used to first
+interpolate the image to the desired size before loading the display
+frame.
+
+If the magnification factors are greater than 0.5 (sampling step size
+less than 2) then the image is simply interpolated. However, if the
+magnification factors are less than 0.5 (sampling step size greater
+than 2) the image is first block averaged by the smallest amount such
+that magnification in the reduced image is again greater than 0.5.
+Then the reduced image is interpolated to achieve the desired
+magnifications. The reason for block averaging rather than simply
+interpolating with a step size greater than 2 is the requirement that
+all of the image pixels contribute to the displayed image. If this is
+not desired then the user can explicitly subsample using image
+sections. The effective difference is that with subsampling the
+pixel-to-pixel noise is unchanged and small features may be lost due to
+the subsampling. With block averaging pixel-to-pixel noise is reduced
+and small scale features still contribute to the displayed image.
+.ih
+EXAMPLES
+For the purpose of these examples we assume a display with four frames,
+512 x 512 in size, and a display range of 0 to 255. Also consider two
+images, image1 is 100 x 200 with a range 200 to 2000 and image2 is
+2000 x 1000 with a range -1000 to 1000. To load the images with the
+default parameters:
+
+.nf
+ cl> cvl image1 1
+ cl> cvl image2 2
+.fi
+
+The image frames are first erased and image1 is loaded in the center of
+display frame 1 without spatial interpolation and with the automatic intensity
+mapping. Only the central 512x512 area of image2 is loaded in display frame 2
+
+To load the display without any intensity transformation:
+
+ cl> cvl image1 1 ztrans=none
+
+The next example interpolates image2 to fill the full 512 horizontal range
+of the frame and maps the full image range into the display range. Note
+that the spatial interpolation first block averages by a factor of 2 and then
+magnifies by 0.512.
+
+ cl> cvl image2 3 fill+ zscale-
+
+The next example makes image1 square and sets the intensity range explicitly.
+
+ cl> cvl image1 4 zscale- zrange- z1=800 z2=1200 xmag=2
+
+The next example loads the two images in the same frame side-by-side.
+
+.nf
+ cl> cvl.xsize=0.5
+ cl> cvl image1 fill+ xcen=0.25
+ cl> cvl image2 erase- fill+ xcen=0.75
+.fi
+.ih
+SEE ALSO
+display, magnify
+.endhelp
diff --git a/pkg/images/tv/iis/doc/erase.hlp b/pkg/images/tv/iis/doc/erase.hlp
new file mode 100644
index 00000000..6a3548e6
--- /dev/null
+++ b/pkg/images/tv/iis/doc/erase.hlp
@@ -0,0 +1,26 @@
+.help erase Jan86 images.tv.iis
+.ih
+NAME
+erase -- erase display frame
+.ih
+USAGE
+erase frame
+.ih
+PARAMETERS
+.ls frame
+Frame to be erased.
+.le
+.ih
+DESCRIPTION
+The specified frame in the image display ("stdimage") is erased.
+Note that the erased frame can be different than the frame currently
+being displayed on the monitor. The graphics frame is not erased.
+.ih
+EXAMPLES
+To erase frame 3:
+
+ cl> erase 3
+.ih
+SEE ALSO
+cv
+.endhelp
diff --git a/pkg/images/tv/iis/doc/frame.hlp b/pkg/images/tv/iis/doc/frame.hlp
new file mode 100644
index 00000000..ec3a9059
--- /dev/null
+++ b/pkg/images/tv/iis/doc/frame.hlp
@@ -0,0 +1,24 @@
+.help frame Jan86 images.tv.iis
+.ih
+NAME
+frame -- select frame to be displayed on the image display
+.ih
+USAGE
+frame frame
+.ih
+PARAMETERS
+.ls frame
+Frame to be displayed.
+.le
+.ih
+DESCRIPTION
+The specified frame is displayed on the image display monitor ("stdimage").
+.ih
+EXAMPLES
+To display frame 3:
+
+ cl> frame 3
+.ih
+SEE ALSO
+cv
+.endhelp
diff --git a/pkg/images/tv/iis/doc/lumatch.hlp b/pkg/images/tv/iis/doc/lumatch.hlp
new file mode 100644
index 00000000..95e6f800
--- /dev/null
+++ b/pkg/images/tv/iis/doc/lumatch.hlp
@@ -0,0 +1,28 @@
+.help lumatch Jan86 images.tv.iis
+.ih
+NAME
+lumatch -- match lookup tables for two display frames
+.ih
+USAGE
+lumatch frame ref_frame
+.ih
+PARAMETERS
+.ls frame
+Frame whose lookup table is to be adjusted.
+.le
+.ls ref_frame
+Frame whose lookup table is to be matched.
+.le
+.ih
+DESCRIPTION
+The lookup tables mapping the display frame values to the grey levels
+on the display monitor are matched in one frame to a reference frame.
+.ih
+EXAMPLES
+To match the lookup tables in frame 3 to those in frame 1:
+
+ cl> lumatch 3 1
+.ih
+SEE ALSO
+cv
+.endhelp
diff --git a/pkg/images/tv/iis/doc/monochrome.hlp b/pkg/images/tv/iis/doc/monochrome.hlp
new file mode 100644
index 00000000..70cc7aee
--- /dev/null
+++ b/pkg/images/tv/iis/doc/monochrome.hlp
@@ -0,0 +1,18 @@
+.help monochrome Jan86 images.tv.iis
+.ih
+NAME
+monochrome -- select monochrome enhancement
+.ih
+USAGE
+monochrome
+.ih
+DESCRIPTION
+Set the display monitor to display monochrome grey levels by setting
+the lookup tables for each color gun to the same values.
+.ih
+EXAMPLES
+ cl> monochrome
+.ih
+SEE ALSO
+cv
+.endhelp
diff --git a/pkg/images/tv/iis/doc/pseudocolor.hlp b/pkg/images/tv/iis/doc/pseudocolor.hlp
new file mode 100644
index 00000000..1c7bb70a
--- /dev/null
+++ b/pkg/images/tv/iis/doc/pseudocolor.hlp
@@ -0,0 +1,41 @@
+.help pseudocolor Jan86 images.tv.iis
+.ih
+NAME
+pseudocolor -- select pseudocolor enhancement
+.ih
+USAGE
+pseudocolor
+.ih
+PARAMETERS
+.ls enhancement
+Type of pseudocolor enhancement. The types are:
+.ls "random"
+A randomly chosen color is assigned to each display level.
+.le
+.ls "linear"
+The display levels are mapped into a spectrum.
+.le
+.ls "8color"
+Eight colors are chosen at random over the range of the display levels.
+.le
+.le
+.ls window = yes
+Window the lookup table for the frame after enabling the pseudocolor?
+.le
+.ih
+DESCRIPTION
+The display levels from the lookup table are mapped into various saturated
+colors to enhance an image. There is a choice of three color mappings.
+After the pseudocolor enhancement is enabled on the display monitor the
+user may, optionally, adjust the frame lookup table.
+.ih
+EXAMPLES
+.nf
+ cl> pseudocolor random
+ cl> pseudocolor 8color
+ cl> pseudocolor linear
+.fi
+.ih
+SEE ALSO
+cv
+.endhelp
diff --git a/pkg/images/tv/iis/doc/rgb.hlp b/pkg/images/tv/iis/doc/rgb.hlp
new file mode 100644
index 00000000..1bd9aa13
--- /dev/null
+++ b/pkg/images/tv/iis/doc/rgb.hlp
@@ -0,0 +1,33 @@
+.help rgb Jan86 images.tv.iis
+.ih
+NAME
+rgb - select true color mode (red, green, and blue frames)
+.ih
+USAGE
+rgb red_frame green_frame blue_frame
+.ih
+PARAMETERS
+.ls red_frame
+Frame to use for the red component.
+.le
+.ls green_frame
+Frame to use for the green component.
+.le
+.ls blue_frame
+Frame to use for the blue component.
+.le
+.ls window = no
+Window the rgb lookup tables?
+.le
+.ih
+DESCRIPTION
+Set the display monitor to display rgb colors by using three frames to
+drive the red, green, and blue guns of the color display monitor.
+Optionally, window the rgb lookup tables.
+.ih
+EXAMPLES
+ cl> rgb 1 2 3
+.ih
+SEE ALSO
+cv
+.endhelp
diff --git a/pkg/images/tv/iis/doc/window.hlp b/pkg/images/tv/iis/doc/window.hlp
new file mode 100644
index 00000000..f98130c3
--- /dev/null
+++ b/pkg/images/tv/iis/doc/window.hlp
@@ -0,0 +1,38 @@
+.help window Jan86 images.tv.iis
+.ih
+NAME
+window -- adjust the contrast and dc offset of the current frame
+.ih
+USAGE
+window
+.ih
+DESCRIPTION
+The lookup table between the display frame values and the values sent
+to the display monitor is adjusted interactively to enhance the display.
+The mapping is linear with two adjustable parameters; the intercept
+and the slope. The two values are set with the image display cursor
+in the two dimensional plane of the display. The horizontal position
+of the cursor sets the intercept or zero point of the transformation.
+Moving the cursor to the left lowers the zero point while moving the cursor to
+the right increases the zero point. The vertical position of the cursor
+sets the slope of the transformation. The middle of the display is zero
+slope (all frame values map into the same output value) while points above
+the middle have negative slope and points below the middle have positive
+slope. Positions near the middle have low contrast while positions near
+the top and bottom have very high contrast. By changing the slope from
+positive to negative the image may be displayed as positive or negative.
+
+The interactive loop is exited by pressing any button on the cursor control.
+.ih
+EXAMPLES
+.nf
+ cl> window
+ Window the display and push any button to exit:
+.fi
+.ih
+BUGS
+It may be necessary to execute FRAME before windowing.
+.ih
+SEE ALSO
+cv
+.endhelp
diff --git a/pkg/images/tv/iis/doc/zoom.hlp b/pkg/images/tv/iis/doc/zoom.hlp
new file mode 100644
index 00000000..85a0b604
--- /dev/null
+++ b/pkg/images/tv/iis/doc/zoom.hlp
@@ -0,0 +1,31 @@
+.help zoom Jan86 images.tv.iis
+.ih
+NAME
+zoom - zoom in on the image (change magnification)
+.ih
+USAGE
+zoom
+.ls zoom_factor
+Zoom factor by the display is to be expanded. The factors are powers
+of 2; 1 = no zoom, 2 = factor of 2, 3 = factor of 4, and 4 = factor of 8.
+.le
+.ls window = no
+Window the enlarged image?
+.le
+.ih
+DESCRIPTION
+The display is zoomed by the specified factor. A zoom factor of 1 is no
+magnification and higher factors correspond to factors of 2. The zoom
+replicates pixels on the monitor and only a part of the display frame
+centered on the display cursor is visible. The window option allows
+the user to adjust interactively with the cursor the part of the zoomed
+frame.
+.ih
+EXAMPLES
+To magnify the displayed frame by a factor of 2:
+
+ cl> zoom 2
+.ih
+SEE ALSO
+cv
+.endhelp