Category : Printer + Display Graphics
Archive   : IMDISP79.ZIP
Filename : IMDISP.DOC

Output of file : IMDISP.DOC contained in archive : IMDISP79.ZIP


Chapter 1


This document describes version 7.9 of the IMDISP program, an
interactive image processing utility for the IBM Personal Computer family
(PC, XT and AT) and compatibles. It has been developed for use with the
Compact Disk - Read-Only Memory (CD-ROM) storage systems currently being
evaluated by the Planetary Data System (PDS). It can also be used to
display and process images stored on floppy or hard disks.

This User's Guide presents an overview of image processing and CD-ROM
fundamentals, a section on the installation of IMDISP and CD-ROM software
and hardware, a description of IMDISP program operation, a description of
other utility programs which can be used in conjunction with IMDISP, and a
command summary.

Other support software for using the PDS CD-ROM disks has also been
developed. These packages include the USGS Planetary Image Cartography
System (PICS) for MicroVAX computers, a set of FORTRAN routines to access
CD-ROM disks on VAX computers (VMSCD), and "C" language source code to
process disks written in the High Sierra format. Contact Mike Martin
(JPLPDS::MMARTIN on SPAN) for access to these tools.

Chapter 2


Efforts to utilize small computer systems for display and analysis of
scientific data have been hampered by the lack of sufficient data storage
capacity to accommodate large image arrays. Most planetary images require
nearly a megabyte of storage. Over the past two years a new storage
technology, "CD-ROM", has been developed which provides the capability to
store up to 600 megabytes of data on a single 4.72-inch disk. The disks
can be mass produced, and hundreds of copies of large digital archives
distributed rather than the few sets currently produced. Readers for
CD-ROM disks can now be purchased for under a thousand dollars for use on
personal computers and some science workstations.

The PDS has worked with industry and other government agencies to
support the development of CD-ROM as a major data distribution and storage
media for space science data. Initial development efforts by the PDS, the
Voyager Project, and multi-disciplinary science representatives have
resulted in the production of 12 CD-ROM disks containing about 30,000
images from the Voyager 1 and 2 encounters. The IMDISP program can be used
to display most of these data files on a personal computer equipped with a
CD-ROM drive.

Any feedback on the use of IMDISP is greatly appreciated, and any of the
following people can be contacted for reporting bugs, adding enhancements,

Mike Martin
Jet Propulsion Lab
Internet: [email protected]

Ron Baalke
Jet Propulsion Lab
Internet: [email protected]

Archie Warnock
Goddard Space Flight Center
Internet: [email protected]


A digital image is a picture converted to numerical form so that it can
be stored and used in a computer. The image is divided into a matrix of
small regions called picture elements, or pixels. The rows and columns of
pixels are called "lines" and "samples", respectively. Each pixel has a
numerical value, or DN (data number) value, quantifying the darkness or
brightness of the image at that spot. In total, each pixel has an address
(line number, sample number) and a DN value, which is all that the computer
needs for processing. The DN value of each pixel usually represents a
shade of darkness or brightness between black and white (gray levels). How
many gray levels there are in an image depends on the number of bits used
to represent each pixel intensity in the computer. The number of gray
levels will be equal to 2^n, where n is the number of bits per pixel's DN
value. If 8 bits are used to represent a pixel's DN value (gray level),
the system will be capable of using 2^8, or 256, gray levels in an image,
where DN 0 is pure black, and DN 255 is pure white. If each DN used only 4
bits of storage, the image would contain only 2^4 or 16 gray levels; if
there were only 1 bit per DN, the image would contain only black and white
pixels (bit values of 0 or 1).


While the specifics of IMDISP commands are discussed in Chapter 4, this
section provides a general overview of how a user can manipulate images
once a file is selected. There are DISPLAY commands which allow the user
to display all or part of an image at various positions on the display
screen. The user may also zoom in and out from a point on the image
defined by the cursor, and may pan around the image. The cursor may be
turned on or off; when on, the arrow keys are used to move the cursor
around the screen; when off, the cursor is not visible.

A user may choose to "subsample" the image, to enable more or all of the
original image to be displayed on the screen at once. For example, if the
image were subsampled by a factor of 2, every other pixel from every other
line would be displayed, starting from the upper left corner of the image.
If a factor of 3 were chosen, every third pixel from every third line would
be displayed. Any positive integer may be used for subsampling.

The user may produce a histogram of an image file, which is a graph
showing the number of pixels per DN value, or per range of DN values, for
the entire image. Histograms are overlaid on top of the image, but may be
removed using the REFRESH command. Subsampling may be specified when
computing a histogram to reduce the time required for the calculations.

A profile may be created which plots DN value versus pixel along a line
between two points on the image. After the cursor is used to select the
two endpoints, the connecting line is drawn on the image and the profile is
plotted at the bottom of the screen. There is a plot command to plot the
actual data values in an image line.

The user may also "stretch" the image, which is analogous to turning the
contrast knob on a TV set. The user specifies low and high DN values; all
pixels with values lower than the specified "low" become black, and all
pixels higher than the specified "high" value become white. All pixels
between the low and high values are evenly shaded between black and white.
IMDISP also has several filter functions available. The user may process
the image with a convolution filter, mean or median filters. There is also
an edge detection filter, as well as functions to brighten, darken and
smear the displayed image.

There are bookkeeping types of commands, also. These allow the user to
do such things as retrieve a desired image from the CD-ROM, to save an
image to a file on hard disk, and to erase only the graphics from the
screen or to erase the entire screen. Users may execute batch command
files to do a series of tasks automatically. Lastly, the user may, of
course, EXIT the IMDISP program when done.


Most planetary images are composed of 8-bit DN values representing
monochrome brightness levels in the scene. To obtain color images,
separate images are taken through color filters (red, green, blue) and are
then combined by ground processing systems to produce a true color image.
Only a very small fraction of planetary images are available in color
versions. Most display and analysis is done on monochrome images.

A display with 256 (2^8) gray levels is required to present the
information contained in a standard image. However, the human eye can only
distinguish about 32 gray levels. Thus 5-bit DN values would satisfy most
display requirements. Unfortunately, computers are oriented to the storage
of and manipulation of items which are a power of two, and 5-bit pixels
would be very clumsy. The standard display devices which the IMDISP
program supports are limited to 16 gray levels (PGA and VGA), 4 gray levels
(EGA) or 2 gray levels (CGA), but the program also supports several
"enhanced" VGA display devices offering up to 256 colors (or 64 shades of
gray). The 16 gray levels of the PGA are adequate to support image
analysis; however 4 or 2 gray levels are practically useless for viewing
planetary images. Fortunately the EGA display will support 16 different
colors, and a color palette can be selected which uses a graduated scale of
colors to represent gray levels, producing a "false color" image (false
because the displayed color does not represent the actual color of the

A false color image (also called a pseudo color image) is created from a
black and white image by assigning a color (rather than a gray level) to
each DN value in the image. For instance, a DN value of 128 could be
reassigned to yellow if the user so desired. Ranges of DNs (e.g., 100-125)
may also be assigned one color. Pseudo colors get assigned to DN values in
a pseudo color table, which the display program then uses to determine how
to color the image on the monitor. Display programs often have preset
pseudo color tables with commonly used DN-color combinations, and the user
can simply call for one of these when generating a pseudo color image. The
option exists, of course, for users to generate their own pseudo color
tables. Pseudo colors are often used to highlight features of an unusual
nature in an image.

Since the Enhanced Graphic Adapter for the IBM PC provides only 4 gray
shades (black, dark gray, light gray and white) most image viewing is done
using a pseudo color table which interprets gray levels as color values
ranging from black through reds, greens and blues up to white.


All camera systems have some kind of distortions in the lens, in the way
the shutter works, etc. Distortions in the amount of light transferred
through the camera to the imaging plate are called radiometric distortions.
Geometric distortion affects the "squareness" of an image, and is detected
by taking an image of a geometric grid.

For spacecraft cameras, both types of distortion can be measured before
launch, and in a limited fashion, in flight. These measured distortions
are saved in digital files. When a raw image is received, these
"calibration files," as they are called, are subtracted from (or otherwise
applied to) the image, effectively removing radiometric and geometric
distortion. This process is called radiometric and geometric correction.
Corrected images contain the closest possible representation of the scene
being imaged.


Digital image files are seldom stored as a simple array of pixels.
Generally there is an area at the beginning of an image file containing
descriptive information about the image. This is referred to as a label or
header area. Figure 2-1 shows a diagram of a simple image format with a
label area followed by the image lines. In practice, images from planetary
missions have a more complicated format, due to the need to store
additional information to allow proper interpretation of the image data.
Figure 2-2 shows the format of a Voyager image, which has engineering
parameters embedded at the end of each image line to form a line suffix
area, an engineering trailer record after the last image line, and this is
followed by an image histogram.

³ Labels or Header Area ³
³ Image Array Line 1 ³
³ Image Array Line 2 ³
³ Image Array Line n ³

Figure 2-1: Simple Image Format

Different image label formats have been developed for use by nearly all
image processing facilities. Two formats are widely used within the
planetary and astronomy communities: the VICAR2 (Video Image Communication
and Retrieval) labels used by the Multi-Mission Image Processing Laboratory
(MIPL) and FITS (Flexible Image Transport) labels used for astronomy image
interchange. The PDS has developed a label scheme which is very similar to
these standards, called the Object Description Language (ODL). This format
attempts to add a broader range of data descriptive capabilities to the
proven capabilities of the existing label systems.

Most of the images stored on the PDS CD-ROM disks have either ODL or
VICAR2 labels. IMDISP will automatically interpret these labels to
determine the display format of the image data.

³ PDS ODL Labels ³
³ Image Array Line 1 ³ Line Suffix ³
³ Image Array Line 2 ³ Line Suffix ³
³ Image Array Line 800 ³ Line Suffix ³
³ Image Engineering Trailer ³
³ Image Histogram ³

Figure 2-2: Voyager CD-ROM Image Format


The CD-ROM disk uses the same basic data storage format as a CD audio
disk. In fact, data blocks are identified by minute, second and sector
number, following the audio format. Data blocks are recorded along a
spiral from the inner to the outer radius of the disk. Each raw data block
(sector) contains 2,352 bytes of information, with 304 bytes used for
housekeeping and error correction and 2,048 (2K) containing user data. Each
data block is called a sector, and 75 sectors are stored per second. Since
the nominal playing time of a CD disk is 60 minutes, the data storage
capacity is 75 sectors per second * 60 seconds per minute * 60 minutes or
270,000 sectors. Thus the nominal storage capacity of a single CD-ROM disk
is 540,000 kilobytes, which can be extended to more than 600,000 kilobytes
and beyond by recording more than 60 minutes of data on a disk.

In order to maximize the storage capacity of CD disks a constant linear
velocity (CLV) recording format is used. This means that the player
changes speed (slows down) as it reads from the inside to the outside of
the disk, to maintain a constant flow of data under the read mechanism at a
speed of 1.2 meters per second. This is in contrast to most magnetic disk
drives which use constant angular velocity (CAV) storage, where the
information density is greater on the inner tracks that the outer tracks.
While the use of CLV recording increases the storage capacity of CD-ROM
disks, it lengthens access time, since the disk must change speeds as it
moves to different positions on the disk radius. The strategy for locating
a recorded data block is also more complicated than with constant angular
velocity recording technology.

As a result the average access time of CD-ROM drives is between 400 ms
and 1 s, and the maximum data transfer rate to the host computer is 150
kilobytes per second. These rates are approximately an order of magnitude
slower than magnetic disks. Therefore, the access mechanisms to disk
directories and data must be customized for CD-ROM in order to provide
acceptable performance.

The development of a standard logical format for recording data files on
CD-ROM disks was taken on by a group of CD-ROM applications developers,
hardware vendors and computer vendors. The proposed standard resulting
from this initial effort was called the High Sierra format. This format was
submitted to the International Standards Organization (ISO) for
consideration and approved on October 5, 1987. It is now referred to as the
ISO-9660 standard. The format used for the early PDS CD-ROM disks is dated
May 28, 1986, and differs slightly from the final ISO standard. Microsoft
and other CD-ROM software developers have committed to supporting this
preliminary version of the format in later software releases. However,
software developed by other vendors to support the ISO format (DEC for
example) will not support the format of these early disks.

Chapter 3


IMDISP requires an IBM PC, XT, AT or 100 percent compatible with 512K of
base memory. It supports several graphics display devices, including the
Enhanced Graphics Adapter (EGA), the Video Graphics Array (VGA), the
Professional Graphics Adapter (PGA), and the Color Graphics Adapter (CGA).
The hardware environment in which the program has been developed and tested
includes and AT class computer, deluxe or enhanced EGA board with 256K of
memory, selected VGA boards with 512K or 1MB memory, and MultiSync (tm) or
multiscan monitor.


The IMDISP program can be run from a floppy or hard disk. To use the
program from a floppy disk, insert the program disk in the A: or B: drive
and type the MS-DOS command: "A:" or "B:" to set the floppy disk as the
default drive. To use the program from hard disk first create a directory
to hold the IMDISP files. Use the MS-DOS command "MKDIR \IMDISP" to create
a directory to hold the programs. Use the "CHDIR \IMDISP" command to make
IMDISP the default directory. Insert the distribution floppy disk in
floppy disk drive A:. Now type "COPY A:*.*" to copy the files from the
distribution disk to your hard disk. You should now be able to run all
examples from that directory on your hard disk. If you wish to use IMDISP
from other directories, you need to include the IMDISP directory in your
MS-DOS "PATH" command. This command provides MS-DOS with a list of
directories to search when looking for a program file to run. If you wish
to run IMDISP from different directories, the \IMDISP subdirectory should
be added to the PATH command in your AUTOEXEC.BAT file. A sample path
command would look like this:


You may want to add a line to your AUTOEXEC.BAT file which will allow
you to abort the display program while running batch files or displaying
large image files. If the command "BREAK=ON" is placed in CONFIG.SYS, you
will (sometimes) be able to terminate the IMDISP program by typing the
control and break keys simultaneously. Different computer systems offer
varying response to the control-break command, and the use of this command
may effect other programs you use.

You can set IMDISP to start up in the correct display mode for your
video system by specifying the environment variable IMDISP in your
AUTOEXEC.BAT file. A sample command to do this would look like this:


if you have an Orchid ProDesigner super VGA board with 512K of video
memory. See section 3.3 for a description of all the possible supported
video modes.

IMDISP also builds various scratch files for use when browsing images or
executing DOS functions. By default, they go in the root directory on
drive C:. If you wish to have them written somewhere else, you may do that
by specifying the desired directory in the environment variable IMBROWSE. A
sample command to do this would look like this:


This will make IMDISP write its scratch files in the subdirectory TEMP on
drive D:. Note that the final backslash (\) is required. We recommend
that the drive specified by IMBROWSE have at least 512K of free space - the
scratch file written when using any of the DOS system calls can be as large
as that.

Also, if you have a collection of color palettes in a separate
subdirectory, you can specify this directory as being the default palette
directory. For example:


will tell IMDISP to look in the D:\IMAGES\PALETTES directory first when
loading in a color palette with the PAL LOAD command.

IMDISP can use extended memory, managed by an XMS memory driver like
HIMEM.SYS or QEMM, for its refresh buffer. If no extended memory is
available, IMDISP will not set up a refresh buffer by default, but will
allow the user to open a disk file to be used for refreshing the screen. In
this case, the environment variable IMREFRESH defines where the refresh
buffer is to go, so


tells IMDISP to put the refresh buffer in the root directory of drive G:.
Note that the refresh buffer can be quite large - a 1024x768 display will
require 768K of disk space (or XMS memory) to hold the entire buffer.


To use the IMDISP program with PDS CD-ROM disks you will need a CD-ROM
reader, interface board, and software provided by the vendor which will
make your CD Reader look like a disk drive to your PC. The details of
setting up your hardware and software configuration are beyond the scope of
this manual, however several aspects of setup will be reviewed.

There are many potential pitfalls in setting up your hardware and
interface board. Read the directions carefully, and don't assume that
"default" switch settings are correct. Check all switches to see that they
correspond to the recommended settings.

To work properly with the batch command and label files provided with
IMDISP, your CD-ROM drive should be set up to be drive letter "L:". Most
vendor software allows you to select the drive letter which will be
assigned to the CD-ROM reader.

3.2.1 Microsoft Extensions

If you are using the Microsoft Extensions you will load a CD-ROM device
driver as part of your CONFIG.SYS file (or two drivers if using the Philips
or DEC readers) with a line like this:


This command assumes that the driver file "HITACHI.SYS"is located in your
ROOT directory. The /D:CDROM1 switch assigns a logical name CDROM1 to the
drive. A name must be supplied, and is used to identify this device, in
case more than one CD-ROM drive is being used on your system. The name
should not be the same as the name of any file stored on your system. An
attempt to open a file with the same name as the device driver will result
in the device driver being opened, not the file. The /N:1 switch indicates
that this is drive 1. This switch is used since some CD-ROM interface
cards support multiple drives.

Other commands which should be included in CONFIG.SYS if you are using a
CD-ROM drive with the Microsoft Extensions are:


The LASTDRIVE command tells MS-DOS to allow for enough drive letters to
support the CD-ROM drive, plus any other drives on your system. Using
LASTDRIVE=L should also work in most circumstances. The files and buffers
specifications provide sufficient system work area to support CD-ROM

You must also execute a program called MSCDEX.EXE which allows access to
the CD-ROM drive as if it were a disk drive on your system. This command
can be put in your AUTOEXEC.BAT file so that it is automatically run
whenever you start-up your computer. The command format is:


Several MSCDEX command switches are illustrated. The /L:L command
assigns the drive name L: to the CD-ROM drive. The /D switch gives the
device name of the CD-ROM drive (which must be the same name used in the
device name parameter of the "DEVICE=CDROM.SYS" command in the CONFIG.SYS
file. The /M:20 switch assigns twenty 2K blocks of memory as a buffer for
use with CD-ROM data. The /V switch provides verbose messages when the
installation program is run, and /E tells the program to use expanded
memory for the cache area.

3.2.2 Other Driver Software

Some vendors (Reference Technology, TMS) offer CD-ROM software which is
comparable to the Microsoft Extensions. Our experience with these software
packages is that they modify the internals of MS-DOS and may cause
unpredictable results with your other PC software. They often do not
support CD-ROM applications designed to work with the MS-DOS extensions for
CD-ROM and cannot be used with the IMDISP FILE prompt mode.

3.2.3 Problems with CD-ROM Software

The PDS CD-ROM disks utilize a feature of the CD-ROM format standard
which provides extended attribute records to define the physical
characteristics of data files. These records will be used by VAX and other
minicomputer systems where the operating system allows a variety of record
formats (fixed, variable, stream). Many of the earlier implementations of
High Sierra software failed to recognize these records, which are placed at
the beginning of a file's data area. If your CD-ROM software was developed
prior to April 1987, it may interpret these records as part of the data
file, causing the first 2K bytes of each file to appear as meaningless
binary data. Users with this problem should contact their hardware or
software vendors for updated versions of the CD-ROM software. The IMDISP
program has been patched to recognize and skip over these records on the
PDS CD-ROM disks, but these patches may not support other CD-ROM disks with
extended attribute records.


IMDISP automatically finds out which display devices are available (PGA,
EGA, or CGA) and uses the one available. The Enhanced Graphics Adapter
must have at least 128K of memory to work properly. Use of the Color
Graphics Adapter is discouraged because the pixels have no gray levels,
only black or white.

The display coordinates start at (1,1) in the upper left corner of the
screen; the line direction is down and the sample direction is to the

3.3.1 Enhanced Graphics Adapter (EGA)

The EGA is a bit-mapped display device providing a resolution of 350
lines by 640 samples of 4-bits each. It produces a digital video signal
for each primary color (red, green and blue), The video signal for each
color can be set to one of four levels, roughly equivalent to off, low,
medium and high. Thus the number of possible colors (color palette) is 64
(4^3). The following table illustrates the colors created by some of the
different combinations of red, green and blue.

Red= off, Green= off, Blue= off results in Black
Red= low, Green= off, Blue= off results in Dark Red
Red=medium, Green= off, Blue= off results in Light Red
Red= high, Green= off, Blue= off results in Bright Red
Red= low, Green= low, Blue= low results in Dark Gray
Red=medium, Green= low, Blue= off results in Brown
Red=medium, Green=medium, Blue= off results in Yellow
Red=medium, Green=medium, Blue=medium results in Light Gray
Red= high, Green= low, Blue= off results in Orange
Red= high, Green= high, Blue= high results in White

Table 3-1: Sample EGA Color Palette Settings

The EGA display is limited to only 16 colors out of the 64 possible,
because only 4-bits are used to store each pixel value in memory. This
4-bit pixel value points to an entry in the color table which represents
one of the 64 possible combinations of red, green and blue which can be

Many of the newer EGA boards are capable of displaying additional lines
and samples when using a MultiSync (tm) or Multiscan monitor. The standard
EGA uses a 16 Mhz crystal oscillator (something like a clock which
regulates the display speed), which limits the video output rate to the
equivalent of 640 pixels by 350 lines. The EGA circuitry allows for a
faster crystal oscillator to be added to the board (24 Mhz and beyond)
allowing about 25 percent more lines to be displayed (480 lines instead of
350). A method for adding this capability to an existing EGA board (for
about $10 worth of parts) is described in the September 16, 1986 issue of
PC Magazine.

This mode requires that a MultiSync (tm) or multiscan monitor be
attached to the computer, and there is no way for the program to
automatically detect the presence of the special monitor. Therefore this
display mode is invoked by specifying an MS-DOS "ENVIRONMENT" variable.
This is done by issuing an MS-DOS "SET" command at the MS-DOS prompt as


This command can also be put in your AUTOEXEC.BAT file using a text
editor, so that you need not invoke it each time you run IMDISP. It should
have no effect on other MS-DOS system operations. There is a chance that
adding this variable will exceed the size reserved by MS-DOS for environment
variables. If so, you should consult your MS-DOS manual to increase the
environment size on your system. The environment variable can be removed
with the MS-DOS command:


where a carriage return is typed immediately after the equal sign. The 480
line mode requires an additional 83K of memory for the refresh buffer. If
you try this mode and receive the message "Insufficient memory for line
buffer", it is probably because you have a 512K memory machine, or have
memory resident programs operating (like Sidekick or Superkey) which reduce
the available memory to less than about 400K. You will need to use the 350
line mode or remove some memory resident programs to operate in 480 line

Users of the EGA with MultiSync (tm) and Multiscan monitors can achieve
a 16 gray level display through the use of a special device called the
Grayscaler 1, from Avocado Computer, Box 632, Yorba Linda, Ca, 92686, (714)
528-1025. This cable converts the digital video signals produced by the
EGA board to analog signals. By selecting appropriate EGA palette entries,
a fairly good representation of 16 gray levels can be achieved (use the
palette selection "PAL LOAD GRAY16.PAL" to select this palette).

3.3.2 Video Graphics Array (VGA)

This version (5.7) of the IMDISP program includes support for the IBM
Video Graphics Array (VGA) display device. The VGA produces an analog
display with several new color modes. Of particular interest to IMDISP
users are the 640 x 480 line mode with 16 displayable colors (or gray
levels). The 320 x 200 line mode with 256 displayable colors (or 64 gray
levels) has been tested but produces very blocky pixels. This version of
IMDISP also supports a number super VGA graphic boards (see below).

To set the VGA display mode you must set a MS-DOS environment variable
prior to executing IMDISP.

To set the environment variable use the MS-DOS command:


This will put the display in 640 sample by 480 line mode, with 16 gray
levels or colors displayable from a palette of 256K. The display is
initialized with a gray scale palette, but a pseudocolor palette can be
invoked with the IMDISP command "PAL PS 0". The "PALETTE EDIT" command
will allow you to step forward or backward through the 64 available shades
for each primary color. See the next section of the IMDISP manual for more
information on the palette edit function.

Users may experiment with the 320 x 200 VGA mode by using


The pixels are rather large in this mode, but there are enough colors to
display images nicely.

3.3.3 Professional Graphics Adapter (PGA)

The PGA is a special graphics board developed by IBM for use with
CAD/CAM applications on the IBM PC. Because its architecture is
incompatible with the CGA and EGA boards, it has not been well received by
software developers. The PGA provides an analog video signal with a
display resolution of 480 lines by 640 samples of 8-bits each. It provides
16 intensities for each primary color, resulting in a palette of 4,096
colors (16^3). The color table allows 256 colors to be displayed
simultaneously, however only 16 gray levels can be selected.

Use the command:


at the MS-DOS prompt to force IMDISP to go into PGA display mode.

3.3.4 Color Graphics Adapter (CGA)

The CGA display is a bit-mapped graphics device with a resolution of 200
lines by 640 samples of 1-bit each. It supports only 2 colors in this
display mode, black and white. This display can be used to get a general
idea of the contents of a digital image, or for displaying one bit images
(graphics for example) but is not recommended for use with the PDS CD-ROM

To force a multi-function display card into CGA mode, use:


3.3.5 Super VGA Display Boards

Several high resolution display boards are supported by this version of
IMDISP. Most of them support resolutions with 256 colors or 64 grayscale
levels. Select one from the following list if it matches your display

SET IMDISP= Resolution Board Name
ATI640 640x480x256 ATI VGA Wonder Board (512K)
ATI800 800x600x256 ATI VGA Wonder Board (512K)
ATI1024 1024x768x16 ATI VGA Wonder Board (512K)
EVGA512 512x480x256 Everex EV-673 Board (256K)
EVGA640 640x400x256 Everex EV-673 Board (256K)
ORCHID 640x480x256 Orchid ProDesigner+ Board (512K)
ORCHID800 800x600x256 Orchid ProDesigner+ Board (512K)
ORCHID1024 1024x768x256 Orchid ProDesigner+ Board (1MB)
PARADISE 640x480x256 Paradise VGA Board (400 lines if the
board has 256K of memory)
TRIDENT 640x480x256 Trident-based SVGA boards (512K)
VESA 1024x768x256 VESA SVGA Interface (1MB) (test)


Multiple copies of images (or the entire screen) can now be copied and
stored away into buffers, limited by the available memory. If you don't
have enough memory, the buffers can still be used, but as virtual files
(see HINTS & TIPS ON CONSERVING MEMORY, down below). Using the buffers,
images can now be merged together to create interesting effects. You can
add or subtract images from each other. You can store an image away into a
buffer before applying a filter, and if you didn't like the result, then
retrieve it back from the buffer, effectively creating an UNDO feature. You
can create a "face-on-Venus image" by merging the face-on-Mars image with a
Magellan image.

There are 26 buffers available in IMDISP, limited by memory or disk space.
The buffers are referenced by name as a single letter, one for each letter
of the alphabet (A-Z).


If you have no extended memory, or don't have enough extended memory, don't
despair. You can still use the buffers if you use the following tips to
help you maximize the use of the memory

o IMDISP will automatically create a refresh buffer in extended memory
whose size is the size of the screen. You can disable the refresh
buffer and this memory will be freed up for buffer use. To disable
the refresh buffer, type:


The refresh buffer can be enabled with


o IMDISP will also attempt to load an entire image into extended
memory whenever you do the FILE command. You can have IMDISP not do
this by using the NOMEMORY option:


o If you are using a Super VGA graphics card in its highest
resolution, then if you switch to a lower screen resolution, this
will generally cause the buffers to be smaller. For example, if you
using an Orchid Pro Designer II card in its highest resolution
(1024x768), then you can switch to the 800x600 or 640x480 screen


o Subsample the image so that it doesn't take up the entire screen,
which then can be saved to smaller buffers:


o Use the FILE option on the COPY or MERGE commands to store buffers
into a file instead of extended memory.

o Erase any unused buffers:



The HELP command in IMDISP uses a plain text file, called IMDISP.HLP,
which contains brief summaries of each command and its options. This file
can be modified as you wish with any text editor or word processor capable
of saving files in plain ASCII format.

IMDISP looks in several places to try to find the help file when the
program starts. First, the DOS environment is searched for the environment
variable IMHELP. If IMHELP is found, and contains a file name, the program
will attempt to open that file (so you can call the help file anything you
want). If IMHELP contains only the name of a subdirectory, the program
will attempt to open IMDISP.HLP in that directory. If that fails, or if
IMHELP is not set, the program then looks in the current directory for
IMDISP.HLP. If IMDISP.HLP isn't found in the current directory, and if you
are using MS-DOS v3.3 or later, the program tries to open the help file in
the directory where the IMDISP.EXE program file is located. If all these
fail, the program reports that it can't open the help file and continues.

For example, to use a file called MYHELP.IMD, located in the
subdirectory C:\HELPFILES, instead of using the default file IMDISP.HLP,
issue the command


either at the DOS prompt or in your AUTOEXEC.BAT file. To use the file
IMDISP.HLP, but to allow the program to find it in the subdirectory
C:\HELPFILES, issue the command




Chapter 4


IMDISP can be used to display images up to several thousand lines and
samples with a variety of pixel formats. These formats include bit (1
bit), nibble (4 bits), byte (8 bits), integer (16 bits) or long integer (32
bits). Integer pixels may be byte-swapped, which means that the sign and
most significant 7 bits are in the rightmost byte, and the least
significant 8 bits are in the leftmost byte. This is the convention used
by both the IBM PC and VAX computer hardware families. IBM mainframes and
68000 series computers (Macintosh and Sun, for example) use
non-byte-swapped integers.

Program interaction with the user is via commands typed in response to
the "COMMAND:" prompt. Most interaction is performed on the graphic
display screen, and program messages are printed over any image display
currently on the screen. The REFRESH command can be used to restore an
image after other commands have written text over the display. The ERASE
command can be used to clear away the clutter left by program status
messages and previously displayed images. The screen is not automatically
erased after each operation in order that multiple images can be displayed
simultaneously, or so a histogram can be placed on the screen with the

IMDISP is invoked by typing "IMDISP" or "IMDISP filename", where
filename is the name of an image file to be opened for processing at
program start-up. The filename may include a disk drive and path name

The program will blank the display screen and display a welcome logo,
then the prompt "COMMAND:" will appear in the lower left portion of the
screen. If a filename is included in the command invocation, the welcome
message is not displayed and the screen will display the COMMAND: prompt.

Typing "HELP" at the command prompt will provide a list of IMDISP
commands. The most frequently used commands are "FILE" to open a file for
processing, and "DISPLAY" to display an image once the file has been

Previous commands can be recalled for editing, so you don't have to type
them over again. Use the up arrow (or cursor up) key to recall old
commands. The left and right arrow (cursor) keys move you back and forth
in the command. Make whatever changes you want, then press the Enter key
to execute the command.


The command line syntax is of the form:


The command line may be typed in either upper or lower case. The
command and the keyword names may be abbreviated to 3 characters in most
cases. Any number of spaces may be inserted between words, and the keyword
and value may be separated by a space or an equals sign. Some keywords do
not require a value. All keywords are optional and have default values.


Table 4-1 presents a summary of IMDISP commands. They are separated
into 3 groups, file manipulation commands; display commands and program
control commands. Only the capitalized letters are required to specify a


Several of the commands invoke special program operating modes. These
include the FILE command when issued without a filename argument and the
CURSOR, PROFILE and PALETTE EDIT commands. The FILE mode displays a list
of files in the current directory on the screen for selection. It also
contains several subcommands for controlling the display of files on the
menu screen. In the CURSOR, PROFILE and PALETTE EDIT commands the cursor
keys (arrow keys) on the numeric keypad are used in conjunction with other
keys to control program operation. These modes are exited by typing either
a period '.' or carriage return.

File oriented commands:

CD or CHDIR . . . . to change the default directory
DIRECTORY . . . . to perform the MS-DOS directory command
FILE . . . . to specify the name of the image
LABEL . . . . to display the image labels
LOG . . . . to save (log) commands to a text file
SAVE . . . . to save the image display to a file
TYPE . . . . to perform the MS-DOS type command

Display commands:

BROWSE . . . . to display a group of images
CURSOR . . . . to move the cursor around
DISPLAY . . . . to display the image
ERASE . . . . to erase the display
HISTOGRAM . . . . to display the histogram of the image
OVERLAY . . . . to place an overlay on the image
PALETTE . . . . to adjust the palette for the display
PERSPECTIVE . . . . to plot a pseudo-perspective of the image
PLOT . . . . to plot image lines and spectra on the display
PROFILE . . . . to plot a profile of the image
REFRESH . . . . to refresh the image plane
SET . . . . to set display options
TEXT . . . . to draw text on the image

Image processing commands:

BRIGHTEN . . . . to brighten the image
COPY . . . . to copy images to/from memory buffers
DARKEN . . . . to darken the image
ENHANCE . . . . to apply various filters to the image:
MASK . . . . to mask off pixels in the image
MERGE . . . . to combine image and memory buffers
NEG . . . . to invert the color palette
PALETTE . . . . to adjust the palette for the display
ROTATE . . . . to rotate the image
SLANT . . . . to slant the image to the right or left
STRETCH . . . . to do a linear gray scale stretch
WINDOW . . . . to mark off a subimage on the screen

Program control commands:

BATCH . . . . to execute a batch command file
EXIT or QUIT. . . . to exit from the program
HELP . . . . Display help information
MENU . . . . to select images from a menu file
SYSTEM . . . . execute an MS-DOS command

Table 4-1: IMDISP Command Summary


If an invalid command is issued at the COMMAND: prompt the program will
beep and return to the COMMAND: prompt. In handling command parameters the
program takes action on those parameters that are recognized, but ignores
invalid parameters.

It is also possible for certain system errors to be encountered which
cause the program to abort leaving your computer in graphics mode. If you
are using certain utilities which reset the default text mode screen colors
(like the Norton Utilities screen attributes command) you may not be able
to see what is being printed on the screen. The simplest approach is to
perform a warm boot, by typing the Ctrl, Alt, Del keys simultaneously.
Alternately, you can often type IMDISP then EXIT to reset the computer to
text mode. Errors in processing image files on CD-ROM, hard disk or floppy
disks can cause these aborts.


This section lists all IMDISP commands alphabetically and describes
their function, parameters which control command operation, and provides
examples of command use, In the command and parameter description the
following conventions are used:

filename represents the name of an MS-DOS file, and may include an
optional drive identifier and path specification.

n represents an integer value.

4.5.1 BATCH

The BATCH command reads commands from the specified batch command file.
If no file name is specified the current directory is searched for a file
named BATCH.CMD. The CURSOR, PROFILE and PALETTE EDIT commands should not
be used within batch command files since they require interactive inputs
from the keyboard. Batch files may be nested.

The BATCH command may take the following argument:

filename filename of batch command file.

A batch file is simply a text file containing a list of commands, with
each command terminated by a carriage return. You can add comments to a
batch file by putting a semi-colon on the line. Everything from the
semi-colon to the end of the line is ignored. If the command file is
created with a word processor, the program should be used in the
non-document mode, to assure that carriage returns are embedded between
command lines. An example of creating a batch file to display the PDS logo
image follows.

At the MS-DOS command level type:


Now run IMDISP and type "BATCH TEST.CMD" at the "COMMAND:" prompt. Make
sure the file "LOGO.IMG" is in your current directory. The PDS logo should
be displayed on the screen in several different sizes.


The BRIGHTEN command adds a constant value to all pixels in the
displayed image. If no value is specified, the default is 10% of the total
range of DN values (i.e., 2 will be added to all pixels in 16-color modes,
26 will be added in 256 color modes).



4.5.3 BROWSE

The BROWSE command will display all images in a directory one after
another. An optional directory mask can be supplied to display only
selected files ("BROWSE *.IMG"). The command creates a list of files to be
displayed, then creates and executes a batch command file to display those
images. After each image is displayed, the filename is displayed at the
top of the image. A BROWSE session can be interrupted by pressing
control-s, then restarted by pressing control-q TWICE. A session can be
halted by typing any other key during the display. It can then be
restarted (from the beginning) with the command "BROWSE C:BATCH.CMD". The
default file name for the batch file created by the BROWSE command is
"C:BATCH.CMD". This name can be changed using the "SET BROWSE fname"
command where fname can consist of a drive letter and filename, which
should be terminated with the extension ".CMD". It can also be set from
DOS or in your AUTOEXEC.BAT file by using the environment variable
IMBROWSE. For example, the DOS command


will make the BROWSE command file in the subdirectory TEMP on drive D:.

The BROWSE command has one argument and several optional keywords.

fname optional file selection mask (must immediately follow the
command BROWSE).
Examples: *.img, D:\IMAGES\*.IMG, L:*.BRS.

SIZe n allows the display of multiple images on the screen. For
example, on a 640x480 VGA display, six 200x200 images can
be displayed adjacent to each other.

SUBsample n used in conjunction with the SIZE command, to scale each
image to fit in the SIZE specification. Same as SUB
option used with the DISPLAY command.

NOLabel inhibits writing the file name label at the top of each
image as it is displayed. The default is that labels are

DNLow DNHigh sets the DN range for all images (see SET).

PAUse n pauses display for n seconds when the screen gets full.

ALL searches all subdirectories in addition to the current
directory, looking for files matching the mask.

AUToset n sets DNLO and DNHI to n% of the full range, based on the
image histogram. The default is 5%.

SELect interactively selects files as they are being displayed

and writes the filenames out to a "select" file. The
default select file is "C:\IMDISP.SEL" and this can be
changed by using the SET SELECT command.

FILe fname select files to browse from a file instead of using a
mask. The file will contain a list of files, and the list
can have wildcarded names. The filename can also be the
IMDISP.SEL file created earlier with the SELect option.

BUFFERS browses through all the memory buffers which have been



will display all the files in the current directory, subsampling each by 4
and displaying them in a 200 x 200 window. The command:


when used with the Voyager browse images will display all of the browse
images on the screen (including the subdirectories), pausing each time the
screen fills up with images.


will allow the selection of individual images and


will redisplay the images that you just selected.


displays the contents of each buffer, pausing in between each display.


displays a small version of each buffer.

*** NOTE ***

BROWSE does not distinguish between image and non-image files, and it is
up to the user to provide the appropriate directory mask to select ONLY
images. If a message "Image does not have proper label" comes up on the
screen during BROWSE, it is probably because a non-image file is in the
directory you are browsing. You can type carriage returns several times
to get back to the "COMMAND:" prompt, and the browse will continue.

If you are using BROWSE on a computer without a hard disk, you will have
to use the SET BROWSE command to change the default browse file name to a
writable disk drive, for example: "SET BROWSE A:BROWSE.CMD". If you are
using BROWSE to view files on a CD-ROM disk, be sure to include the drive
letter of a writable disk drive if you specify a BROWSE file name. The
text editor to produce your own custom command files.

4.5.4 CD or CHDIR

The CD or CHDIR command is used just as it is at the MS-DOS command
level to change the current default directory.

The argument of the CD command is the path name specification of the
new default directory. For example, "CD \IMDISP\IMAGES" would make
\IMDISP\IMAGES the current directory if it exists. To change the current
default drive use the "SYSTEM" command ("SYSTEM L:" for example) or the
"FILE" command. If there is not enough memory available for the system
command to be executed an error message is displayed.

4.5.5 COPY

The COPY command will attempt to copy the image last displayed with the
DISPLAY command, the screen or another buffer to a destination buffer.
IMDISP will attempt to put the buffer into extended memory. An FILE option
is provided to allow the buffer to be put into a file on the disk.

COPY buffer [FILe]
COPY TO buffer [FILe]
COPY source TO buffer [FILe]

where buffer = A-Z
where source = A-Z or SCReen


COPY A Copies the last displayed image to buffer A
COPY A TO B Copies buffer A to buffer B
COPY A TO B FILE Copies buffer A to buffer B, buffer B is a file
COPY SCREEN TO Z Copies the entire screen to buffer Z

4.5.6 CURSOR

The CURSOR command is used to select a point in a displayed image for
subsequent display commands. When first invoked, it places a small cursor
symbol at the center of the screen. Depending on the current contents of
the screen, the cursor may be hard to see. Moving it with the arrow keys
on the numeric keypad will help you locate it. If you have a mouse, it
will also move the cursor around.

Whenever the cursor is moved, the current line and sample location of
the cursor and the DN value of the pixel at that point is printed in the
lower right portion of the screen. The cursor will move 16 pixels in the
selected direction unless the movement value is adjusted using the + or

Numeric Keypad Keys
³ 7 ³ 8 ³ 9 ³ PrtSc ³
³ Home ³ Up ³ PgUp ³ ³
³ 4 ³ 5 ³ 6 ³ - ³
³ Left ³ ³ Right ³ ³
³ 1 ³ 2 ³ 3 ³ + ³
³ End ³ Down ³ PgDn ³ ³

Action of Keypad Keys:

7 = Move up and left.
8 = Move up.
9 = Move up and right.
4 = Move left.
5 = Not active.
6 = Move right.
1 = Move down and left.
2 = Move down.
3 = Move down and right.
- = Decrement cursor movement value.
+ = Increment cursor movement value.

Table 4-2: IMDISP Cursor Keys

Cursor mode is exited by typing a "." (period) or carriage return or by
tapping the left button on the mouse. The cursor position is retained for
future use in DISPLAY commands which use the CENTER option. It is very
useful with large images where the entire image may be displayed using the
subsample option, then a point selected for subsequent display at full

You can specify the starting position of the cursor with the subcommands
DSL (Display Starting Line) and DSS (Display Starting Sample). Otherwise,
the cursor starts off at the position where it was left last.

Example: Type "FILE MONTAGE.IMG" followed by "DISP" to display the
MONTAGE.IMG file. Type "CUR" to enter the cursor mode, then move the
cursor to the center of the Uranus image in the upper left corner of the
image using the up and left arrow keys. Now type "." to exit cursor mode,
then type "DISP ZOOM 4 CENTER" which will display Uranus as a large grainy
ball on the screen.

4.5.7 DARKEN

The DARKEN command subtracts a constant value from all pixels in the
displayed image. If no value is specified, the default is 10% of the total
range of DN values (i.e., 2 will be subtracted from all pixels in 16-color
modes, 26 will be subtracted in 256 color modes).


DAR 100

4.5.8 DIR

The DIR command is used just as the MS-DOS dir command. Its argument is
passed to MS-DOS for execution. At the end of the directory listing the
screen will display "Type carriage return to continue:" which will return
to the IMDISP command mode. If there is not enough memory available for
the system command to be executed an error message is displayed.


The DISPLAY command reads an image file and displays it on the the
screen. If the image is larger than the display screen, the default mode
is to display as much of the upper left portion of the image as will fit on
the screen. The SUBSAMPLE keyword can be used to select every 'n' lines
and samples so that representations of very large images may be displayed.
The ZOOM keyword can be used to enlarge a portion of an image on the
display screen. Keywords can be specified to begin displaying at any line
and sample in the image with the SL (starting line) and SS (starting
sample). If only a limited number of lines and samples are to be displayed
the NL (number of lines) and NS (number of samples) keywords can be used.
The UP, DOWN, LEFT and RIGHT keywords can be used to display different
portions of the image, relative to the currently displayed portion. The
display can also placed at any point on the screen using the DSL (display
starting line) and DSS (display starting sample) keywords. The FLIP
keyword displays the image from the bottom of the screen to the top, rather
than the other way around.

DISPLAY takes the following keywords :

buffer displays the image in the named memory buffer

SUBsample n a positive integral subsampling factor for displaying
images larger than the size of the screen. SUB=2 would
display an image at half the resolution.

If the image lines and samples look like this:

sample values

line 1 1 2 3 4 5
line 2 6 7 8 9 10
line 3 11 12 13 14 15

Then the command DISP SUB 2 would produce:

sample values

line 1 1 3 5
line 2 11 13 15

ZOOM n a positive integral zoom factor for looking at part of an
image close up. The zoom command replicates pixels by the
integer value specified. If the image lines and samples
look like this:

sample values

line 1 1 2 3
line 2 4 5 6
line 3 7 8 9

Then the command ZOOM 2 would produce the following:

sample values

line 1 1 1 2 2 3 3
line 2 1 1 2 2 3 3
line 3 4 4 5 5 6 6
line 4 4 4 5 5 6 6
line 5 7 7 8 8 9 9
line 6 7 7 8 8 9 9

CENTER center the display around current cursor position. This
command is very useful when displaying large images or when
zooming in on selected areas. Should be used after using
the CURSOR command.

NL n
NS n number of lines or samples from the image file to display

SL n
SS n starting line or sample within the image file to display

UP n
DOWN n adjusts the starting line up or down from the previous
value, thereby moving the display window up or down in the
image. The default amount to move up or down is the size of
the display.

RIGHT n adjusts the starting sample left or right from the previous
value, thereby moving the display window left or right in
the image

DSS n start the image display at the specified line and sample on
the display screen.

FLIP flips the image top to bottom, so the image is displayed
from the bottom of the screen to the top.

NOPrompt displays the image without display the command line prompt
(COMMAND:) at the bottom of the screen. This is to
accommodate screen captures of IMDISP displays.

AUToset n sets DNLO and DNHI to n% of the full range, based on the
histogram. The default is 5%.

NOMemory tells IMDISP not to attempt to load the image into extended
memory as it displays the image.

SOUrce used to display the source file of a browse image. The
source file is specified with the SOURCE_FILE_NAME and
SAMPLING_FACTOR keywords in the label. The source file is
centered on the current cursor position in the browse file.
Does not work with Voyager or Viking compressed images.

Examples: The user wants to display an entire Voyager image (800 x 800)
on the display screen then display a portion of the image at full
resolution. Type "FILE MIRANDA1.LBL", then "DISP SUB 2" to display the
entire image at half resolution, Use the CURSOR command to move the cursor
to the center of an area of interest. Exit the cursor mode by typing ".",
then type "DISP CENT" to display the selected portion of the image at full

The user wishes to place 2 images which are each 800 lines by 800
samples on the screen next to each other. The first file is opened with
"FILE IMAGE1.IMG". The "DISPLAY SUB 4" command is given to display every
4th line and sample of the image to create a 200 x 200 display. Next the
"FILE IMAGE2.IMG" command is given. Now a "DISPLAY SUB 4 DSS 201" is given
to place the second image on the screen starting at display sample position
201, next to the first image.


DISP CEN ZOOM 2 (Use CUR first to select a center)
DISP A Displays buffer A
DISP A SUB 2 Displays buffer A, subsampled twice
DISP A CEN ZOOM 3 Zooms in on the center of buffer A

4.5.10 ENHANCE

The command ENHANCE applies a number of image processing filters to the
image. It can either be applied to the entire image (from the input file)
or simply to the displayed portion of the image.

ENHANCE takes the following subcommands:

SCReen applies the filter to the entire screen. If this
option is not selected, then the filter will be applied
to the image last displayed with the DISPLAY command.

BAAlke applies an enhancement filter developed by Ron Baalke.

CONvolution n applies a convolution filter to the image which has the
effect of detecting the edges. A 3x3 mask is used.
There are two variations of this filter used (n = 0 or
1). Integer arithmetic is used to speed up the process.
The following weighted mask is used:

-1 -1 -1
-1 8 -1
-1 -1 -1

EDGe n applies an edge enhancement filter to the image using a
3x3 mask. There are four variations of this filter (n
= 0, 1, 2, 3). Integer arithmetic is used to speed up
the process.

HIGh n applies a high pass filter to the image, which has the
effect of removing slowly varying changes in the image,
and leaving behind rapid changes.

HIStogram applies a histogram equalization filter to the image,
which has the effect of maximizing the contrast across
the whole image.

LOG n applies a logarithmic filter to the image which has the
effect of enhancing the contrast in the image. Useful
on dark images or on images like stars and galaxies.
The parameter that goes with this one is a little
different than the other filters, in that you specify a
factor (default=40) which is multiplied with the log of
the pixel value. Examples:

MEAn n applies a mean filter to the image which has the effect
of smoothing out the image. There are three variations
of this filter (n = 0, 1). A 3x3 (n=0), 5x5 (n=1) or
7x7 (n=2) mask is used where the middle pixel is
replaced by the average of the nine pixels in the mask.
Integer arithmetic is used to speed up the process.

MEDian applies a median filter to the image which has the
effect of smoothing out the image. A 3x3 mask is used
where the middle pixel is replaced by the middle of the
nine pixels after they have been sorted. The sort used
is a simple bubble sort which is terminated halfway
through the sort process since the median value will be
found by then.

POWer n modifies the pixels of the image by the following

newDN = numDN * (oldDN/numDN) ^ n

where n is a floating point number. The default value
is 2.0. Values less than 1.0 tend to brighten the
image, while values greater than 1.0 tend to darken it.

STAir n groups pixels together with the net result of smoothing
the image. The default step increment is 8

SMEar applies a filter which averages the image in the
vertical direction. The result is to "smear" the
images down the screen.

UNSharp applies an unsharp mask to the image, which has the
effect of enhancing edges in the image. It is the
equivalent of performing a merge with 3 times the
original image minus 2 times the image after it has
been blurred with a 5x5 mean filter.


ENH POWER .1 (similar to ENH LOG)
ENH STAIR 2 (creates a binary 2-color image)

4.5.11 ERASE

The command ERASE causes the screen to be erased by setting all of the
pixels to 0, which may not necessarily be black depending on the palette
setting. If the REFRESH option is selected, then only the refresh buffer
will be erased. Memory buffers (denoted by letters A through Z) can also
be erased.


ERA erases the screen
ERA REFRESH erases the refresh buffer
ERA A erases the memory buffer named A

4.5.12 EXIT

The EXIT command exits IMDISP and returns the user to the MS-DOS
operating system. The contents of the image display and refresh buffer are
discarded. The single subcommand NOClear will leave the computer display
in graphics mode, and will not clear the screen. Same as QUIT.

4.5.13 FILE

FILE takes just a value which is the file name. The specified file will
be opened, or an error message issued if the file cannot be opened. The
capability to directly address any sector on the CD-ROM disk by providing
its physical address (minute, second and sector number) is also available
to users of the Microsoft Extensions software. There is one keyword,
NOMEMORY. If not given, the FILE command will attempt to put the image
directly into extended memory (where the DISPLAY command will find it). If
specified, or if the image doesn't fit into extended memory, the DISPLAY
command will read the image from disk. FILE can now display GIF-format
images, as well. It does this automatically if the filename extension is

If the FILE command is specified without a filename, or with a filename
mask which contains a wildcard, the program will display a list of file
names in the current directory. Each file name is preceded by a number.
Typing the number associated with a file name will select that file for
processing. File names that actually represent lower level directories are
indicated with a symbol after the name, Directories can be traversed
downward by selecting the number associated with a directory name. Upward
traversal is by selecting the item identified as PARENT DIR. This will
move upward in the directory hierarchy.

The prompt mode clears the screen and displays a menu of files (matching
the wildcard mask, if one was used) and commands. These commands allows
specification of the default drive, a file "mask" to use in selecting file
names for display and options for moving through the list of files when the
current directory contain more than 30 files. The top line of the display
also indicates how many files are in the current directory. After exiting
the FILE prompt mode, the previous contents of the display screen can be
recovered by typing "REFRESH".

The FILE prompt mode subcommands:

D select default disk drive
M specify a file selection mask to use in displaying files on the
N display the next set of file names on the screen if there are
more files in the current directory than can be displayed on one
P display the previous set of file names.
Q quit the file selection mode and return to IMDISP command mode.

The N, P and Q commands are executed immediately. If the D or M
commands are selected, the user is prompted to enter a drive letter or file

If the file selected by the "FILE filename" or FILE prompt mode has a
valid label, either PDS or VICAR2, then the number of lines and samples and
the pixel size will be displayed. If the file is unlabeled then the
program will prompt for the values to use for the number of lines and
samples, the number of bits per pixel, and the number of header bytes. PDS
detached labeled images can also be displayed. The specified file remains
the current file until a new FILE command is given. The FILE command
resets the SET DNLO and SET DNHI values to the minimum and maximum for the
pixel size (normally 0 and 255). If a specified filename is not found in
the current directory then an error message is displayed.

If the unlabeled image has a regular format, that is a uniform structure
of repeating lines and samples, the user can specify this information when
prompted by the program. For example, an image named ASTERIA.DAT with one
1422 byte header block followed by an image composed of 370 lines by 450
samples of 8 bit pixels would be processed as follows:

At the COMMAND: prompt type "FILE ASTERIA.DAT". The program will
display the message:

Input file does not have a proper label.
Input number of lines: 370 enter the value 370
Input number of samples: 450 enter the value 450
Input size of each sample: 8 enter the value 8
Input size of header label: 1422 enter 1422 for the size of the
foreign label block).

The physical address of a data block on the CD-ROM can also be specified
using the syntax 'FILE "CD:mm:ss:bb"', where mm is the minute, ss the
second, and bb the sector block number of the beginning of the desired data
area. The CD:mm:ss:nn must be in double quotes and the CD must be
capitalized! This mechanism can be used to access files on non-High Sierra
format disks. This will only work on systems using the Microsoft
Extensions software.

4.5.14 HELP

HELP displays the online help message. If followed by the name of a
valid command the message for that command is displayed. HELP is not
provided for MS-DOS commands (DIR, CHDIR, CD and TYPE).


The HISTOGRAM command produces a plot showing the number of pixel values
in the image at each DN level. The range of DN values is displayed on the
x-axis and the number of occurrences of a specific DN value on the y-axis
(See Figure 4-1).

The HISTOGRAM command reads through the image, calculates the histogram,
and then displays the plot on the screen. The histogram is scaled so that
the third highest histogram value is used as the maximum. It is recommended
that the SUBSAMPLE or other subsetting keywords be used to speed up
histogram calculation, which can be quite slow for large images and for
images stored on CD-ROM. Histogram plots are displayed on top of any image
currently displayed on the screen, so the user may wish to use the ERASE
command to clear the screen prior to using HISTO. After the histogram is
displayed, the image can be restored using the REFRESH command.

27582 | .
| ..
| ....
COUNT | .....
| .......
| .........
| ............
| ...............
0 64 128 192 256
DN value

Figure 4-1: Sample Image Histogram

By evaluating the histogram, the user can determine the optimum settings
for the SET (DNLO and DNHI) command to produce a useful display. In the
example above, the image data are clustered between DN values 32 and 144.
Using the default settings of the EGA display mode the colors assigned to
the 2 lowest color values and the 7 highest values (representing DN values
from 0 to 31 and from 144 to 255) would not be used since the image
contains no pixels with these values.

By using the "SET DNLO 32 DNHI 144" command the 16 display levels
available on the EGA display would be assigned to values between 32 and 144
rather than distributed evenly from 0 to 255, and all 16 colors would be
used in the display.

HISTOGRAM takes the following keywords and arguments:

SUBsample n a integral subsample factor. For speeding up HISTOGRAM,
use of "SUBSAMPLE 4" is recommended

buffer displays the histogram of the image in the named memory

NL n
NS n number of lines and samples from image

SL n
SS n starting line and sample in image

CENT perform the histogram on only the displayed portion of the

Two special keywords can be used with Voyager or Viking images on the
PDS CD-ROM disks. These will extract histogram values stored with the
image on the CD-ROM disk and reduce the time required for the histogram to
be generated from more than 1 minute to about 3 seconds. Note that these
commands will not work with Voyager image files in the
\PLANET\JUPITER\ATMOS directory, or with versions of system software
written before April 1987.

VOY use histogram from Voyager CD-ROM engineering data
VIK use histogram from Viking CD-ROM engineering data

4.5.16 LABEL

The LABEL command prints the labels for the currently selected image
file on the screen. It pauses after each screen full of data, and waits
for you to press a key before displaying the next screen of data. You can
terminate the listing by pressing the letter 'Q' to quit and return to

4.5.17 LOG

The LOG command controls logging commands to a text file as they're
entered. The resulting file can be used as a batch file, to repeat the
command sequence, or as a record of what operations have been performed.
The file is automatically flushed and closed when you exit IMDISP.

The LOG command takes the following keywords and arguments:

ON opens a log file called IMDISP.LOG. Commands will be
copied into this file until it is either closed or you
exit IMDISP.

FILe fname opens a log file called fname (defaults to IMDISP.LOG).

OFF closes the current log file.

4.5.18 MASK

The MASK command is used to mask out pixels on the low or high end of
the color palette. It is particularly userful when merging images
together. It sets all the pixels with a DN value above or below a
specified value to a default.

The MASK command takes the following keywords and arguments:

LO n sets all pixels with a DN value of n or less to the
default DN value of 0.

HI n sets all pixels with a DN value of n or greater to the
default DN value of 255.

WITH n overrides the default values for LO and HI, and sets the
pixels to the DN value n.


MASK LO 20 Sets the DN values for all pixels with DN values of
20 or less to 0.

MASK LO 20 WITH 255 Sets the DN values for all pixels with DN values of
20 or less to 255.

MASK HI 200 Sets the DN values for all pixels with DN values of
200 or more to 255.

MASK HI 200 WITH 0 Sets the DN values for all pixels with DN values of
200 or more to 0.

4.5.19 MENU

The MENU command reads a file containing a list of file names and places
the user in the MENU mode, where files from this list can be selected for
display. The MENU mode is similar to the FILE mode, except that the list
of files presented is that provided in the menu file, rather than from a
selected directory.

The MENU mode can be invoked by typing "MENU filename.MNU" at the
COMMAND: prompt. It can also be invoked on program startup by typing
"IMDISP filename.MNU" to initiate the program. The menu file must use the
".MNU" extension to startup IMDISP in MENU mode.

Subcommands of the MENU mode are as follows:

# - Enter the number corresponding to a desired
file name to select the file.

P)revious - display the previous screen of file names
N)ext - display the next screen of file names
Q)uit - quit or exit from MENU mode

After selecting and displaying an image, the user can return to the
current menu by typing "MENU" at the COMMAND: prompt.

A menu file can take either of two formats. The preferred format is a
PDS labelled table file containing file names. A sample file is shown

NOTE = "Sample MENU file for IMDISP"

A second abbreviated form may also be used, where only the filenames are
specified in the ".MNU" file. In this case the file would only contain the
filenames shown after the END statement in the example above.

4.5.20 MERGE

The MERGE command will merge buffers, images or the screen together. A
scaling option can be provided to control the amount of merging. If the TO
option is not used then the result will be displayed on the screen by
default. The result can also be written to a buffer.

MERGE buffer
MERGE source1 [scale1] WITH source2 [scale2] [TO buffer] [FILE]


MERGE A Merge the last displayed image with buffer A and
display the result back on the screen

MERGE A WITH B Merge buffer A with buffer B and display the
result on the screen. Since no scaling parameter
are specified IMDISP will default to 50% of A and
50% of B.

MERGE A WITH B TO C Merge buffer A with buffer B and store the result
into buffer C

MERGE A WITH B -1 Subtract buffer A from buffer B

MERGE A .75 Merge 25% of the last displayed image with 75% of
buffer A, display the result on the screen.

MERGE A .75 with B .8 Merge 75% of buffer B with 80% of buffer B,
display result on the screen

MERGE B WITH SCREEN Merge buffer B with the screen

MERGE A 3 WITH B -2 TO C FILE Subtract twice buffer B from 3 times A,
store the result in buffer.

4.5.21 OVERLAY

The OVERLAY command draws a lat/lon overlay grid on the displayed image.
It is intended only for use with the Ocean Data System, West Coast Time
Series CD-ROM in this program version.

The OVERLAY command has the following arguments:

MAXLAT Latitude of top of image.
MINLAT Latitude of bottom of image.
MAXLON Longitude of left side of image.
MINLON Longitude of right side of image.

LEGend Draw a color scale with the overlay.

4.5.22 PALETTE

The PALETTE command is used for changing the colors assigned to
displayable color values. This is done by modifying an internal color
table which assigns intensity values for red, green and blue to a color
value, The EGA provides 4 intensity values for each of 3 colors, so that 64
different colors can be created. However, the EGA pixels are only 4-bits
each so only 16 color values can be used simultaneously.

The palette can be modified using the EDIT command and saved and loaded
from a disk file. The edit mode is invoked by typing PALETTE EDIT. With
the EGA display, a bar containing 16 colors or shades will be displayed on
the bottom of the screen. A small square will appear in the middle of the
center color box. This indicates that this color value is currently
selected for editing. To select another color value for editing, move the
small square to the appropriate color using either the "4" (left arrow) and
"6" (right arrow) keys on the numeric keypad or the mouse. The "7" (Home)
and "1" (End) keys move to the beginning and end of the palette. Pressing
the "Ctrl" key with either the "4" or "6" keys will jump the small square
left or right by 8 color bars.

The color of the current color box is changed with the "R", "G", and "B"
keys (for red, green, and blue). Upper case letters increase the amount of
the primary color, and lower case keys decrease the amount of the color.
The "8" (up arrow) and "2" (down arrow) keys increase and decrease,
respectively, the amount of red, green, and blue simultaneously. The left
button on the mouse does the same thing. Other commands in the palette
edit mode are the "S" and "s" commands, which will shift all colors one
value to the right or left, and the "x" command, which will exchange color
values (the color setting for color 0 becomes the setting for color 15,
while 15 replaces 0, the color setting for color 1 becomes the setting for
14, while 14 replaces 1, etc.). The up and down arrow keys can also be
used to cycle through the colors available in a given display mode one at a
time. Type the "." key or carriage return to exit the edit mode.

PALETTE takes the following keywords and arguments:

EDIT n to interactively adjust an n-color palette. See edit
description (above) for details

PSEUDOCOLOR n PS = 0 for default EGA palette,
PS = 1 for gray scale palette,
PS = 2 or 3 for pseudo color palettes (16 levels)
PS = 4, ..., 9 for pseudo color palettes (256 levels)

SAVE filename saves the specified palette on disk

LOAD filename loads the specified palette from disk, if no filename is
specified, then list of files is displayed. See FIL
command for more details.

DIS displays the current palette on the screen

ERA erases the current palette from the screen

CYC n cycles the color palette

CYC = 0 "blinks" the palette
CYC = 1 blinks four times
CYC = 2 rotates the palette for spectacular results
CYC = 3 rotates and feeds in random colors
CYC = 4 randomizes the palette
CYC = 5 double rotates the palette
CYC = 6 random swaps of the palette

Any key will stop the palette cycling. A 'S' or 's' key
will save the palette which is currently being
displayed, any other key will restore the palette to its
original colors.

CYCLE itself has two keywords.

FASt sets the delay between changes to .1 second
(the default is .3). Works best on machines
with fast video, where flicker is minimized.

TIMe n runs the PAL CYCLE command for n seconds
(useful in batch files).

The default palette file for LOAD or SAVE operations is IMDISP.PAL. The
format of the default color palette when stored in a palette file is as
shown below:

0 0 0 0
1 64 0 0
2 128 0 0
3 192 0 0
4 192 64 0
5 192 128 0
6 192 192 0
7 128 192 0
8 0 192 0
9 0 192 128
10 0 128 128
11 0 128 192
12 0 0 192
13 128 0 192
14 192 0 192
15 192 192 192

The first column of the palette table is the color value number for the
display, and columns 2, 3 and 4 represent the intensity of the red, green
and blue (respectively) primary colors on a scale of 0 to 255. With the EGA
display these values are: 0 = off; 64 = low; 128 = medium; 192 = high.


PAL PS 1 (Gray scale palette)
PAL PS 7 (Built in color palette #7)


PERSPECTIVE displays the current image as a pseudo-perspective plot.
This is useful for inspecting the topography of an image - brighter areas
will seem to be raised higher than dark areas.

The PERSPECTIVE command has these arguments:

SL n displays the plot starting at line n of the image

SCR reads the image from the screen, rather than from disk (slightly

4.5.24 PROFILE

PROFILE plots the DN values of pixels located along a line between two
points in the image, i.e., it creates a graph of DN value versus pixel
along the line joining the two points, CURsor mode is used to select the
two endpoints; typing "." or carriage return, or tapping the left mouse
button, selects the current cursor position as the endpoint. After the
endpoints are selected a line is drawn between the points and the graph is
plotted at the bottom of the screen, showing the DN values on the x-axis
and the positions along the line on the y-axis.

4.5.25 QUIT

The QUIT command exits IMDISP and returns the user to the MS-DOS
operating system. The contents of the image display and refresh buffer are
discarded. The single subcommand NOClear will leave the computer display
in graphics mode, and will not clear the screen.

4.5.26 REFRESH

REFRESH redisplays the image plane from the refresh buffer. When images
are written to the screen they are also written to the refresh buffer. The
REFRESH command writes this buffer back to the screen, thereby erasing any
graphics or text overlaying the image on the screen. The refresh buffer
contains as many lines from the display screen as there is room for in
memory. REFRESH takes no parameters. It can also be used after the FILE
prompt mode to redisplay the contents of the refresh buffer. By default,
the refresh buffer is allocated from extended (XMS) memory. If extended
memory is present, the refresh buffer is on by default. If there isn't any
extended memory, or not enough extended memory is available, the refresh
buffer is off by default, by may be turned on to use a virtual file. The
location of the virtual file is given by the environment variable

REFRESH is commonly used after the HELP command, or after a HISTOGRAM or
PROFILE command to remove text and plots from the display screen.

The refresh buffer can be disabled/enabled with the SET command:


4.5.27 ROTATE

The ROTATE command rotates the image through a specified angle. The
entire image or just the displayed portion can be rotated. The resulting
image can be clipped to the dimensions of the screen, if desired, and the
borders of the image filled.

ROTATE takes the following arguments and keywords:

n the angle to rotate the image through. Must be between 0 and
360 degrees.

SCREEN rotate the entire screen

CLIP trim off the parts of the rotated image outside the display

NOFILL don't blank out the borders of the image

4.5.28 SAVE

The SAVE command copies the contents of the display screen to a file. On
EGA systems the display buffer contains only 4-bits per pixel, so
specifying BP = 8 will write the 4-bit pixels in full bytes, but does not
save full 8-bit pixels even if the input image is an 8-bit image. Use the
COPIM utility program to produce a full resolution subset of an 8-bit image
in that case. An 8-bit display device can save an image with full 8-bit

SAVE takes the following arguments and keywords, where the filename must
immediately follow the SAVE command:

filename filename of image to save - if the extension on the
filename is .GIF, the file will be saved in GIF format
instead of PDS format.

FORMAT xxx saves the file in the specified format, where "xxx" is GIF,

NL n
NS n number of lines and samples to save

SL n
SS n starting line and sample to save
BP n number of bits per pixel in output image
REFRESH save the displayed image into the refresh buffer

Example: Save a 200 line by 200 sample area from the inner region of an
image in the file SMALL.IMG. First use the FILE command to select and
display an input image. Now type:

"SAVE SMALL.IMG SL 100 SS 210 NL 200 NS 200"

to save the portion of the image beginning at line 100 and sample 210 in
the new file SMALL.IMG.

4.5.29 SET

SET is used set various display options. It may be used to display and
change the DN (pixel value) range that is used to compress the pixel values
to the range appropriate for the display device. The default, which is
reset for each new file, is the full range of DN values for the particular
pixel format (e.g. 0 to 255 for byte).

The results of a SET DNLOW or SET DNHIGH command will not take effect
until the next DISPLAY command is performed.

SET can also be used to specify a file name to be used by the browse
command, change the default display resolution or change the number of
samples used to display the current image.

Set takes the following keywords:

DNHIGH n where values less than DNlow are set to color value 0, values
greater than DNHIGH are set to the maximum color value
available, and the color values between are assigned equally
to the DN values between Dnlow and DNhi.

BROwse filename
sets a file name to be used for the browse file. This file
name will override the default file name, which is

NS n sets the number of samples to be used for the next DISPLAY

REFresh ON
toggles the state of the refresh buffer on or off. If IMDISP
detects the presence of extended memory (XMS - managed by a
device driver like HIMEM.SYS or QEMM), the refresh buffer
will default to ON. If no XMS is present, the default is
off, and turning the refresh buffer on will cause IMDISP to
set up a scratch file to be used as the refresh buffer.

DELay OFF (default)
enables/disables the time delay before executing commands.
Most useful when used in batch file, because it allows the
commands to play slowly instead of as fast as possible.

PROmpt ON (default)
enables/disables the display of the command names before
execution. Most useful when used in batch files, because it
prevents the command prompts from appearing on the screen.

sets the current display device. You might use this to
change from Super VGA resolution to VGA if you wish to have
bigger pixels for displaying images with the BROWSE command,
for example. To do this, you would type the command SET DIS
VGA. The change will take place immediately. The current
values for DISPLAY are

CGA (640x200x2)
EGA (640x350x16)
EGA480 (640x480x16)
VGA320 (320x200x256)
VGA (640x480x16)
ATI640 (640x480x256) - ATI VGA Wonder Board (512K)
ATI800 (800x600x256) - ATI VGA Wonder Board (512K)
ATI1024 (1024x768x16) - ATI VGA Wonder Board (512K)
EVGA512 (512x480x256) - Everex EV-673 Board (256K)
EVGA640 (640x400x256) - Everex EV-673 Board (256K)
ORCHID (640x480x256) - Orchid ProDesigner+ Board (512K)
ORCHID800 (800x600x256) - Orchid ProDesigner+ Board (512K)
ORCHID1024 (1024x768x256) - Orchid ProDesigner+ Board (1MB)
PARADISE (640x480x256) - Paradise SuperVGA Board (512K)
(640x400x256) - Paradise SuperVGA Board (256K)
PGA (640x480x256) - PGA Board
TRIDENT (640x480x256) - Trident-based SVGA boards (512K)
VESA (1024x768x256) - VESA SVGA Interface (1MB) (test)

PALette directory
Sets the default palette directory. This is used with the
PAL LOAD command. If PAL LOAD is used with no parameters,
IMDISP will go to the default palette directory and display
the files there.

BUFfers directory
Sets the directory to hold the buffers as files instead of
memory buffers. Useful when not enough extended (XMS) memory
exists to create the buffers.

For example, using the default color palette and an EGA display with 16
color values available, the command "SET DNLO 100 DNHI 164" will assign DN
values below 100 to black and DN values above 164 to white, and spread the
16 color values between the DN limits, thus each color value will represent
4 DNs (value 0 = DN 100 to 103; value 1 - DN 104 to 107, etc.).

If values other than the default are used then the images will display
more slowly because scaling divisions are required. SET with no parameters
will display the current values.

The DNLO and DNHI values are reset to the minimum and maximum for a
given pixel size when a FILE command is issued.

4.5.30 SLANT

SLANT displays the image slanted either to the left or right. This is
done by shifting each line of the image by 1 pixel. It is particularly
useful for finding errors in image headers.


SLANT (slants image to the right)

4.5.31 STRETCH

STRETCH sets the palette to a gray scale stretched between the two
specified pixel values. Stretch is most useful on the PGA display where 16
gray levels are available. On the EGA display the stretch command
activates the gray level palette which provides only 4 gray levels. Use
the PAL PS 0 command to return the display to the default palette after
performing a stretch.

STRETCH takes the following keywords :

HIGh n the low and high DN values of the stretch.

These pixel values refer to the DN values in the current image display,
not necessarily in the original image (scaling may have been involved). For
example with the EGA display the DN values in the display range from 0 to
15, even if a byte image is being displayed.

The STRETCH command is not recommended for use on EGA systems.

4.5.32 SYSTEM

The SYSTEM command is used to send a command to MS-DOS.

For example "SYS L:" will set the L: drive as the current default drive.
If there is not enough memory available for the system command to be
executed an error message is displayed. The SYS command will not work on
floppy disk systems unless the file "COMMAND.COM" is present on the floppy
disk with the IMDISP program.

The SYSTEM command in this version of IMDISP will attempt to free as
much of memory as possible, by swapping most of the program to scratch
space. It tries to find Extended memory (XMS), Expanded memory (EMS) or
disk space, in that order. If it succeeds, only a small amount of IMDISP
remains in memory, leaving far more memory for DOS functions that previous
versions. If the attempt to swap fails, the program will try to swap to
DOS with the available memory. Currently, you must have about the same
amount of free XMS, EMS or disk space as you have memory free before
running IMDISP (i.e., IMDISP allocates all available memory to itself when
it starts, and requires that much scratch space when swapping out).

The swap process, if it attempts to write out to a scratch disk file,
will use the directory specified by the environment variable IMBROWSE. If
IMBROWSE doesn't exist, IMDISP will write the scratch file to the root
directory of drive C:. The scratch file is deleted when you return to
IMDISP (using the EXIT command at the DOS prompt).

4.5.33 TEXT

The text command can be used to display a string of text on the screen.
The text string can be entered on the command line, enclosed in apostrophes
or quotes (e.g., TEXT `This is a text string'). If the text string is not
entered on the command line the program will prompt for the string to be

Once the command is issued and the text string entered the program is
placed in CURSOR mode so that the display position can be selected. This is
done by using the arrow keys to move the cursor to the desired location.
After the position is selected, the user types a period (.) or carriage
return and the text will be written on the display screen.

The TEXT command has one argument and two optional keywords.

LINe The line number to position the text at.
SAMple The sample number to position the text at.
NOPrompt Will display text without the command line prompt.

'text...' The text string to be printed, enclosed in quotes or

The text command writes over image data in the display and refresh
buffer, thus the underlying portion of the image is lost.

4.5.34 TYPE

The TYPE command is used to type the contents of a text file on the
display screen, using the standard MS-DOS type command.

Its argument is passed to MS-DOS for execution. At the end of the type
operation the screen will display "Type carriage return to continue:" which
will return to the IMDISP command mode. If there is not enough memory
available for the system command to be executed an error message is

4.5.35 NEG

The NEG command is used to invert the current color palette, turning the
image into a negative. It takes no keywords or arguments.

4.5.36 PLOT

The PLOT command is used to draw plots of image lines and spectra on the
screen. If the current file is an image, you must specify which line you
wish to plot.

PLOT takes the following keywords:

LIN n plot line n of the image (required for 2-D files)

SYMbol x draw the plot using character x instead of connecting the
points with a line

ZOOm prompt user to zoom in on a region of the plot after it is

OVErlay overplot - do not erase the current plot

MAX n set the maximum y value in the plot

MIN n set the minimum y value in the plot

COLor n use DN value n to plot the data

SPEctral analyze the plotted spectrum by doing baseline removal and
integrating line flux.

Example: to compare lines 200 and 210 of the current image on the same
vertical scale, first plot line 200 (as a line) with the command


Now overlay the plot of line 210 using "+" signs and color 10 of the
current palette with the command


4.5.37 WINDOW

The WINDOW command lets the user define a subimage with the cursor keys
or a mouse. The mouse button (or enter key) sets the starting point and
then the lower corner is "dragged" to the desired position. The window
stays in effect until turned off with the CANCEL subcommand.

WINDOW takes the following subcommands:

CANCEL cancels the defined window and sets commands back to the
full screen

S1 n
S2 n defines the starting and ending samples of the window

L1 n
L2 n defines the starting and ending lines of the window


There are several utility programs also provided on the distribution
disk. These programs can read PDS labeled, VICAR2 labeled, or unlabeled
images. The output images are always written with PDS ODL labels. The
programs prompt for the necessary input values.

4.6.1 COPIM

COPIM is a simple image copying program. It can copy the whole image,
for example to put PDS labels on a foreign image), or extract a window from
the image. It can subsample the image with an integral subsampling factor.
The program prompts for the input and output file names, the window to
extract (just type return for the whole image), and the subsampling factor
(the default is 1). If the input file is not in VICAR2 or PDS image format
the program will also prompt for the number of lines and samples, pixel
size and header size of the image.

For example, to extract the first 100 lines and samples from the file
LOGO.IMG the following commands would be used:

Input Image: LOGO.IMG
Lines: 350 Samples: 340 Bits per pixel: 1
Output Image: LOGOSUB.IMG
Starting line and sample, number of lines and samples:
1 1 100 100
Line Subsampling factor (1): 1
Sample Subsampling factor(1): 1


CONVERT is simple pixel format conversion program. It converts an image
to an integer (16 bits), byte (8 bits), nibble (4 bits), or binary (1 bit)
image. It can also perform a user specified scaring. The program prompts
for the input and output file names, the output format (must be 1,4,8, or
16 bits), and the input and output numerical ranges for scaling. The
default scaling values are appropriate for the data types being used.

For example, to convert MONTAGE.IMG to an 8-bit per pixel image and
scale the output pixels evenly between the values of 0 and 127 the
following commands would be used:

Input Image: MONTAGE.IMG
Lines : 350 Samples : 640 Bits per pixel : 4
Output Image: MONTBIG.IMG
Output bits per pixel (1, 4, 8, 16) : 8
Input DN range (O 15) :
Output DN range (O 255) : 0 127

Chapter 5


IMDISP is maintained and updated (since version 4.4) by a small group of
volunteers -- Mike Martin, Ron Baalke (JPL) and Archie Warnock (Hughes STX
Corp). It was originally written by Mike Martin, Frank Evans and Dan
Nakamura of the Jet Propulsion Lab. The plotting code was written by Ed
Esfandari (Interferometrics). Paradise and Trident video drivers were
added by Gregg Gunnells of the USGS. Jerry McFaul (USGS), Ed Grayzeck (U of
MD) and Nick Beser (JHU/APL) have been valiant testers of the program
through its many iterations, and have made many suggestions for
improvements along the way.

IMDISP would not have its current capabilities if it weren't for the
generous efforts of several software authors who have seen fit to donate
their work into the public domain. Through their work, we are able to keep
IMDISP in the public domain, free to anyone who wants it. We want to
publicly thank all of them here:

Gershon Elber - GIF I/O routines (GIF_LIB.ZIP)
Michael Walraven - High resolution timer (TIMERHI.ZIP)
Max Medley - Mouse interface code
James Birdsall - EMS, XMS allocation code (EMSLB215.ZIP, XMSLB121.ZIP)
Marty Del Vecchio - EMS/XMS swap routines (SWAP300.ZIP)

And, of course, we would also like to thank our users, from whom we
continue to receive ideas, bug reports and fixes. They exercise the
program in ways we never imagined.

GIF and 'Graphics Interchange Format' are trademarks of CompuServe,
Incorporated, an H&R Block Company.



Within this command summary listing, brackets ([]) indicate optional
parameters or keywords. Filename is the name of a file in the current
directory or a fully qualified filename which can include drive letter and
pathname. Directory name is an MS-DOS directory path specification, a
valid directory mask a specification containing wild card characters (*, ?)
per MS-DOS rules for wildcard use in the DIRECTORY command. The symbol "n"
is used to indicate an integer value.

BATCH [filename]
BROWSE [directory mask] [SIZe n] [SUB n] [NOLabel] [DNLOw n]
[DNHIgh n] [PAUse n] [ALL] [SELect] [FILe] [BUFFERS]

[AUToset n]
CD [directory name] [..]
CHDIR [directory name] [..]
COPY [buffer [TO buffer]] [FILE]
DIRECTORY [directory mask] [/w]
DISPLAY [SUB n] [SL n] [SS n] [NL n] [NS n] [BP n] [CENTer] [DSL n]
[DSS n] [ZOOm] [FLIP] [NOPrompt] [NOMemory] [AUToset]
[SOUrce] [CURsor] [buffer]
ENHANCE [BAAlke] [CONvolution n] [EDGe n] [HIGh n] [HIStogram]
[LOG n] [MEAn n] [MEDian] [POWer n] [STAir n] [SMEar]
[SCReen] [UNSharp]
ERASE [REFRESH] [buffer]
EXIT [NOClear]
FILE [filename[.GIF]] ["CD:mm:ss:bb"] [NOMemory]
HELP [command name]
HISTOGRAM [SUB n] [SL n] [SS n] [NL n] [NS n] [BP n] [CENter]
[VOYager] [VIKing] [buffer]
LOG [ON] [FILe filename] [CLOse] [OFF]
MASK [LO n [WITH n]] [HI n [WITH n]]
MENU [filename]
MERGE [buffer [scale] [WITH buffer [scale] [TO buffer]]] [FILE]
PALETTE [EDIT n] [PS n] [LOAd filename] [SAVe filename] [DISplay]
[ERAse] [CYC n [FAST] [TIME n]]
QUIT [NOClear]
ROTATE [n] [SCReen] [NOFill] [CLIp]
SAVE filename[.GIF] [FORmat fmt] [SL n] [SS n] [NL n] [NS n] [BP n]
SET [DNLO n] [DNHI n] [BROwse filename] [DIS name] [NS n]
[PAL dir] [REFresh ON/OFF] [DELay ON/OFF] [PROmpt ON/OFF]
SYSTEM [MS-DOS command]
TEXT [LINe n] [SAMple n] "text" or 'text' [NOPrompt]
TYPE filename
WINDOW [CANcel] [S1 n] [L1 n] [S2 n] [L2 n]


All of these environment variables control options for IMDISP.


  3 Responses to “Category : Printer + Display Graphics
Archive   : IMDISP79.ZIP
Filename : IMDISP.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: