home *** CD-ROM | disk | FTP | other *** search
/ GRIPS 2: Government Rast…rocessing Software & Data / GRIPS_2.cdr / dos / pc_mips / imdisp.rmf < prev    next >
Encoding:
Text File  |  1990-06-25  |  76.7 KB  |  1,679 lines

  1.  
  2.                      PLANETARY DATA SYSTEM
  3.  
  4.           USER'S GUIDE FOR THE PDS IMDISP PROGRAM
  5.  
  6.                          INTRODUCTION
  7.  
  8.      This  document describes the IMDISP program, an  interactive 
  9. image  display utility for the IBM Personal Computer family  (PC, 
  10. XT  and AT) and compatibles. It has been developed for  use  with 
  11. the  Compact  Disk  - Read-Only Memory  (CDROM)  storage  systems 
  12. currently being evaluated by the Planetary Data System (PDS).  It 
  13. can  also  be  used to display images stored on  floppy  or  hard 
  14. disks.
  15.  
  16.      This  User's Guide presents an overview of image  processing 
  17. and  CDROM fundamentals, a section on the installation of  IMDISP 
  18. and CDROM software and hardware, a description of IMDISP  program 
  19. operation,  a description of other utility programs which can  be 
  20. used in conjunction with IMDISP, and a command summary.
  21.  
  22.      Other  support  software for using the PDS CDROM  disks  has 
  23. also  been developed. These packages include the  USGS  Planetary 
  24. Image Cartography System (PICS) for Microvax computers, a set  of 
  25. FORTRAN routines to access CDROM disks on VAX computers  (VMSCD), 
  26. and "C" language source code to process disks written in the High 
  27. Sierra  format. Contact Mike Martin (JPLPDS::MMARTIN) for  access 
  28. to these tools.
  29.  
  30.                            Chapter 2
  31.  
  32.                           BACKGROUND
  33.  
  34.  
  35.      Efforts  to utilize small computer systems for  display  and 
  36. analysis  of  scientific data have been hampered by the  lack  of 
  37. sufficient  data  storage  capacity to  accommodate  large  image 
  38. arrays.  Most  planetary images  require  nearly  a  megabyte  of 
  39. storage. Over the past two years a new storage technology "CDROM" 
  40. has been developed which provides the capability to store  up  to 
  41. 600  megabytes of data on a single 4.72-inch disk. The disks  can 
  42. be  mass  produced,  and  hundreds of  copies  of  large  digital 
  43. archives distributed rather than the few sets currently produced. 
  44. Readers for CDROM disks can now be purchased for under a thousand 
  45. dollars   for  use  on  personal  computers  and   some   science 
  46. workstations.
  47.  
  48.      The  PDS  has  worked with  industry  and  other  government 
  49. agencies  to  support the development of CDROM as  a  major  data 
  50. distribution  and storage media for space science  data.  Initial  
  51. development  efforts by the PDS, the Voyager Project, and  multi-
  52. disciplinary   science  representatives  have  resulted   in  the 
  53. production of 5 CDROM disks, two samplers, and 3 disks containing
  54. all 6,538 images from  the Voyager  Uranus encounter.  The IMDISP 
  55. program can be  used to display  most  of these  data  files on a 
  56. personal computer equipped with a CDROM drive.
  57.  
  58. 2.1 DIGITAL IMAGE PROCESSING SUMMARY
  59.  
  60.      A digital image is a picture converted to numerical form  so 
  61. that  it  can  be stored and used in a  computer.  The  image  is 
  62. divided  into a matrix of small regions called picture  elements, 
  63. or pixels. The rows and columns of pixels are called "lines"  and 
  64. "samples", respectively. Each pixel has a numerical value, or  DN 
  65. (data number)  value,  quantifying the darkness  or brightness of    
  66. the image at that spot. In total, each pixel has an address (line 
  67. number,  sample  number) and a  DN value, which is all  that  the 
  68. computer needs for processing. The DN value of each pixel usually 
  69. represents  a shade of darkness or brightness between  black  and 
  70. white  (gray levels). How many gray levels there are in an  image 
  71. depends  on  the  number of bits used  to  represent  each  pixel 
  72. intensity  in  the computer. The number of gray  levels  will  be 
  73. equal to 2^n, where n is the number of bits per pixel's DN value. 
  74. If 8 bits are used to represent a pixel's DN value (gray  level), 
  75. the  system will be capable of using 2^8, or 256, gray levels  in 
  76. an image, where DN 0 is pure black, and DN 255 is pure white. If 
  77. each DN used only 4 bits of storage, the image would contain only 
  78. 2^4 or 16 gray levels; if there were only 1 bit per DN, the image 
  79. would contain only black and white pixels (bit values of 0 or 1).
  80.  
  81. 2.2 OVERVIEW OF IMDISP CAPABILITIES
  82.  
  83.      While  the  specifics of IMDISP commands  are  discussed  in 
  84. Chapter 4, this section provides a general overview of how a user 
  85. can manipulate images once a file is selected. There are  DISPLAY 
  86. commands which allow the user to display all or part of an  image 
  87. at  various  positions on the display screen. The user  may  also 
  88. zoom in and out from a point on the image defined by the  cursor, 
  89. and may pan around the image. The cursor may be turned on or off; 
  90. when  on, the arrow keys are used to move the cursor  around  the 
  91. screen; when off, the cursor is not visible.
  92.  
  93.      A  user may choose to "subsample" the image, to enable  more 
  94. or  all  of the original image to be displayed on the  screen  at 
  95. once. For example, if the image were subsampled by a factor of 2, 
  96. every  other  pixel  from every other line  would  be  displayed, 
  97. starting from the upper left corner of the image. If a factor  of 
  98. 3  were chosen, every third pixel from every third line would  be 
  99. displayed. Any positive integer may be used for subsampling.
  100.  
  101.      The user may produce a histogram of an image file, which  is 
  102. a  graph showing the number of pixels per DN value, or per  range 
  103. of  DN values, for the entire image. Histograms are  overlaid  on 
  104. top  of the image, but may be removed using the REFRESH  command. 
  105. Subsampling may be specified when computing a histogram to reduce 
  106. the time required for the calculations.
  107.  
  108.      A  profile may be created which plots DN value versus  pixel 
  109. along a line between two points on the image. After the cursor is 
  110. used to select the two endpoints, the connecting line is drawn on 
  111. the image and the profile is plotted at the bottom of the screen.
  112.  
  113.      The user may also "stretch" the image, which is analogous to 
  114. turning the contrast knob on a TV set. The user specifies low and 
  115. high  DN values; all pixels with values lower than the  specified 
  116. "low"  become  black, and  all pixels higher than  the  specified 
  117. "high"  value become white. All pixels between the low  and  high 
  118. values are evenly shaded between black and white.
  119.  
  120.      There  are bookkeeping types of commands, also. These  allow 
  121. the  user to do such things as retrieve a desired image from  the 
  122. CD-ROM,  to  save an image to a file on hard disk, and  to  erase 
  123. only the graphics from the screen or to erase the entire  screen. 
  124. Users  may  execute batch command files to do a series  of  tasks 
  125. automatically.  Lastly, the user may, of course, EXIT the  IMDISP 
  126. program when done.
  127.  
  128. 2.3 GRAY LEVEL AND FALSE COLOR IMAGES
  129.  
  130.      Most  planetary  images  are composed  of  8-bit  DN  values 
  131. representing monochrome brightness levels in the scene. To obtain 
  132. color  images,  separate images are taken through  color  filters 
  133. (red,  green,  blue) and are then combined by  ground  processing 
  134. systems to produce a true color image. Only a very small fraction 
  135. of planetary images are available in color versions. Most display 
  136. and analysis is done on monochrome images.
  137.  
  138.      A display with 256 (2^8) gray levels is required to  present 
  139. the information contained in a standard image. However, the human 
  140. eye  can  only distinguish about 32 gray levels.  Thus  5-bit  DN 
  141. values  would satisfy most display  requirements.  Unfortunately, 
  142. computers  are  oriented to the storage of  and  manipulation  of 
  143. items  which are a power of two, and 5-bit pixels would  be  very 
  144. clumsy. The display devices which the IMDISP program supports are 
  145. limited  to 16 gray levels (PGA), 4 gray levels (EGA) or  2  gray 
  146. levels  (CGA).  The  16 gray levels of the PGA  are  adequate  to 
  147. support   image  analysis;  however  4  or  2  gray  levels   are 
  148. practically useless for viewing planetary images. Fortunately the 
  149. EGA display will support 16 different colors, and a color palette 
  150. can  be  selected  which  uses a graduated  scale  of  colors  to 
  151. represent  gray  levels, producing a "false color"  image  (false 
  152. because  the displayed color does not represent the actual  color 
  153. of the scene).
  154.  
  155.      A  false color image (also called a pseudo color  image)  is 
  156. created from a black and white image by assigning a color (rather 
  157. than a gray level) to each DN value in the image. For instance, a 
  158. DN  value  of 128 could be reassigned to yellow if  the  user  so 
  159. desired.  Ranges of DNs (e.g., 100-125) may also be assigned  one 
  160. color. Pseudo colors get assigned to DN values in a pseudo  color 
  161. table,  which the display program then uses to determine  how  to 
  162. color  the  image  on the monitor. Display  programs  often  have 
  163. preset   pseudo   color  tables  with  commonly   used   DN-color 
  164. combinations, and the user can simply call for one of these  when 
  165. generating  a pseudo color image. The option exists,  of  course, 
  166. for  users  to  generate their own pseudo  color  tables.  Pseudo 
  167. colors are often used to highlight features of an unusual  nature 
  168. in an image.
  169.  
  170.      Since  the Enhanced Graphic Adapter for the IBM PC  provides 
  171. only 4 gray shades (black, dark gray, light gray and white)  most 
  172. image viewing is done using a pseudo color table which interprets 
  173. gray  levels  as color values ranging from  black  through  reds, 
  174. greens and blues up to white.
  175.  
  176. 2.4 RADIOMETRIC AND GEOMETRIC CORRECTIONS
  177.  
  178.      All  camera systems have some kind of distortions  in  the 
  179. lens,  in  the  way the shutter works, etc.  Distortions  in  the 
  180. amount  of  fight transferred through the camera to  the  imaging 
  181. plate  are called radiometric distortions.  Geometric  distortion 
  182. affects  the "squareness" of an image, and is detected by  taking 
  183. an image of a geometric grid.
  184.  
  185.      For  spacecraft  cameras, both types of  distortion  can  be 
  186. measured  before  launch, and in a limited  fashion,  in  flight. 
  187. These measured distortions are saved in digital files. When a raw 
  188. image is received, these "calibration files," as they are called, 
  189. are  subtracted  from  (or  otherwise  applied  to)  the   image, 
  190. effectively  removing radiometric and geometric distortion.  This 
  191. process is called radiometric and geometric correction. Corrected 
  192. images  contain the closest possible representation of the  scene 
  193. being imaged.
  194.  
  195. 2.5 IMAGE FILE FORMATS
  196.  
  197.      Digital  image files are seldom stored as a simple array  of 
  198. pixels.  Generally there is an area at the beginning of an  image 
  199. file containing descriptive information about the image. This  is 
  200. referred to as a label or header area. Figure 2-1 shows a diagram 
  201. of a simple image format with a label area followed by the  image 
  202. lines.  In practice, images from planetary missions have  a  more 
  203. complicated   format,  due  to  the  need  to  store   additional 
  204. information  to  allow proper interpretation of the  image  data. 
  205. Figure  2-2  shows  the  format of a  Voyager  image,  which  has 
  206. engineering parameters embedded at the end of each image line  to 
  207. form a line suffix area, an engineering trailer record after  the 
  208. last image line, and this is followed by an image histogram.
  209.  
  210.  
  211.                  --------------------------      
  212.                 |  Labels or Header Area   |    
  213.                 |--------------------------|     
  214.                 |  Image Array Line 1      |    
  215.                 |--------------------------|    
  216.                 |  Image Array Line 2      |
  217.                 |--------------------------|
  218.                              .
  219.                              .
  220.                              .
  221.                  --------------------------
  222.                 |  Image Array Line n      |
  223.                  --------------------------
  224.  
  225.             Figure 2-1: Simple Image Format
  226.  
  227.      Different image label formats have been developed for use by 
  228. nearly  all image processing facilities. Two formats  are  widely 
  229. used  within the planetary and astronomy communities: the  VICAR2 
  230. (Video  Image  Communication and Retrieval) labels  used  by  the 
  231. Multi-Mission   Image  Processing  Laboratory  (MIPL)  and   FITS 
  232. (Flexible  Image  Transport)  labels  used  for  astronomy  image 
  233. interchange.  The PDS has developed a label scheme which is  very 
  234. similar  to  these  standards,  called  the  Object   Description 
  235. Language  (ODL). This format attempts to add a broader  range  of 
  236. data  descriptive capabilities to the proven capabilities of  the 
  237. existing label systems. A description of the ODL architecture  is 
  238. given in Appendix D.
  239.  
  240.      Most of the images stored on the PDS CDROM disks have either 
  241. ODL  or VICAR2 labels. IMDISP will automatically interpret  these 
  242. labels to determine the display format of the image data.
  243.  
  244.                  --------------------------------------      
  245.                 |  PDS ODL Labels                      |    
  246.                 |--------------------------------------|     
  247.                 |  Image Array Line 1    | Line Suffix |    
  248.                 |--------------------------------------|    
  249.                 |  Image Array Line 2    | Line Suffix |    
  250.                 |--------------------------------------|    
  251.                                   .
  252.                                   . 
  253.                                   .
  254.                  ---------------------------------------
  255.                 |  Image Array Line 800  | Line Suffix |    
  256.                 |--------------------------------------|    
  257.                 |  Image Engineering Trailer           |
  258.                 |--------------------------------------|
  259.                 |  Image Histogram                     |
  260.                  --------------------------------------
  261.  
  262.             Figure 2-2: Voyager CDROM Image Format
  263.  
  264. 2.6 CDROM FUNDAMENTALS
  265.  
  266.      The CDROM disk uses the same basic data storage format as  a 
  267. CD  audio  disk. In fact, data blocks are identified  by  minute, 
  268. second and sector number, following the audio format. Data blocks 
  269. are recorded along a spiral from the inner to the outer radius of 
  270. the  disk. Each raw data block (sector) contains 2,352  bytes  of 
  271. information,  with  304  bytes used for  housekeeping  and  error 
  272. correction  and 2,048 (2K) containing user data. Each data  block 
  273. is  called a sector, and 75 sectors are stored per second.  Since 
  274. the  nominal  playing time of a CD disk is 60 minutes,  the  data 
  275. storage capacity is 75 sectors per second * 60 seconds per minute 
  276. *  60  minutes  or  270,000 sectors.  Thus  the  nominal  storage 
  277. capacity  of a single CDROM disk is 540,000 kilobytes, which  can 
  278. be  extended  to  more  than  600,000  kilobytes  and  beyond  by 
  279. recording more than 60 minutes of data on a disk.
  280.  
  281.      In  order  to maximize the storage capacity of  CD  disks  a 
  282. constant  linear  velocity (CLV) recording format is  used.  This 
  283. means that the player changes speed (slows down) as it reads from 
  284. the  inside  to the outside of the disk, to maintain  a  constant 
  285. flow  of data under the read mechanism at a speed of  1.2  meters 
  286. per  second.  This is in contrast to most  magnetic  disk  drives 
  287. which  use  constant angular velocity (CAV)  storage,  where  the 
  288. information density is greater on the inner tracks that the outer 
  289. tracks.  While  the use of CLV recording  increases  the  storage 
  290. capacity  of CDROM disks, it reduces access time, since the  disk 
  291. must change speeds as it moves to different positions on the disk 
  292. radius.  The strategy for locating a recorded data block is  also 
  293. more  complicated than with constant angular  velocity  recording 
  294. technology.
  295.  
  296.      As  a  result  the average access time of  CDROM  drives  is 
  297. between 400 ms and 1 s, and the maximum data transfer rate to the 
  298. host  computer  is  150 kilobytes per  second.  These  rates  are 
  299. approximately  an order of magnitude slower than magnetic  disks. 
  300. Therefore,  the  access mechanisms to disk directories  and  data 
  301. must  be  customized  for CDROM in order  to  provide  acceptable 
  302. performance.
  303.  
  304.      The  development of a standard logical format for  recording 
  305. data  files  on  CDROM disks was taken on by  a  group  of  CDROM 
  306. applications  developers, hardware vendors and computer  vendors. 
  307. The  proposed standard resulting from this effort is  called  the 
  308. High   Sierra   format.  This  format  was   submitted   to   the 
  309. International Standards Organization (ISO) for consideration  and 
  310. approved  on October 5, 1987. The format used for the  PDS  CDROM 
  311. disks is dated May 28, 1986, and differs slightly from the  final 
  312. ISO standard. Microsoft and other CDROM software developers  have 
  313. committed to supporting this preliminary version of the format in 
  314. later  software  releases. However, software developed  by  other 
  315. vendors  to  support the ISO format (DEC for  example)  will  not 
  316. support the format of these disks.
  317.  
  318.  
  319.                             Chapter 3
  320.  
  321.                        IMDISP INSTALLATION
  322.  
  323.  
  324.      IMDISP requires an IBM PC, XT, AT or 100 percent  compatible 
  325. with  512K of base memory. It supports several  graphics  display 
  326. devices,  including  the  Enhanced Graphics  Adapter  (EGA),  the
  327. Video Graphics  Array  (VGA), the Professional  Graphics  Adapter  
  328. (PGA),  and  the  Color  Graphics  Adapter  (CGA).  The  hardware 
  329. environment  in which  the program  has been developed and tested 
  330. includes and  AT class computer,  deluxe or  enhanced  EGA  board 
  331. with 256K of memory, and multisync or multiscan monitor.
  332.  
  333. 3.1 PROGRAM SETUP
  334.  
  335.      The IMDISP program can be run from a floppy or hard disk. To 
  336. use  the program from a floppy disk, insert the program  disk  in 
  337. the  A: or B: drive and type the MSDOS command: "A:" or  "B:"  to 
  338. set the floppy disk as the default drive. To use the program from 
  339. hard disk first create a directory to hold the IMDISP files.  Use 
  340. the  MSDOS command "MKDIR \IMDISP" to create a directory to  hold 
  341. the programs. Use the "CHDIR \IMDISP" command to make IMDISP  the 
  342. default directory. Insert the distribution floppy disk in  floppy 
  343. disk  drive A:. Now type "COPY A:*.*" to copy the files from  the 
  344. distribution  disk to your hard disk. You should now be  able  to 
  345. run  all examples from that directory on your hard disk.  If  you 
  346. wish  to use IMDISP from other directories, you need  to  include 
  347. the  IMDISP directory in your MSDOS "PATH" command. This  command 
  348. provides MSDOS with a list of directories to search when  looking 
  349. for  a  program  file  to run. If you wish  to  run  IMDISP  from 
  350. different  directories, the \IMDISP subdirectory should be  added 
  351. to  the  PATH command in your AUTOEXEC.BAT file.  A  sample  path 
  352. command would look like this:
  353.  
  354.     PATH=C:\DOS;C:\UTIL;C:\WORDSTAR;C:\IMDISP
  355.  
  356.      The  sample  batch  files and special  pointer  label  files 
  357. included  on the distribution disk will only run if your  current 
  358. default directory is \IMDISP.
  359.  
  360.      You  may want to add a line to your AUTOEXEC.BAT file  which 
  361. will  allow you to abort the display program while running  batch 
  362. files or displaying large image files. If the command  "BREAK=ON" 
  363. is  placed  in  CONFIG.SYS,  you  will  (sometimes)  be  able  to 
  364. terminate the IMDISP program by typing the control and break keys 
  365. simultaneously. Different computer systems offer varying response 
  366. to  the  control-break command, and the use of this  command  may 
  367. effect other programs you use.
  368.  
  369. 3.2 CDROM SETUP
  370.  
  371.      To use the IMDISP program with PDS CDROM disks you will need 
  372. a  CDROM  reader, interface board, and software provided  by  the 
  373. vendor  which will make your CD Reader look like a disk drive  to 
  374. your  PC.  The details of setting up your hardware  and  software 
  375. configuration  are  beyond  the scope  of  this  manual,  however 
  376. several aspects of setup will be reviewed.
  377.  
  378.      There  are  many  potential  pitfalls  in  setting  up  your 
  379. hardware and interface board. Read the directions carefully,  and 
  380. don't  assume that "default" switch settings are  correct.  Check 
  381. all  switches  to  see that they correspond  to  the  recommended 
  382. settings.
  383.  
  384.      To  work  properly with the batch command  and  label  files 
  385. provided  with  IMDISP, your CDROM drive should be set up  to  be 
  386. drive letter "L:". Most vendor software allows you to select  the 
  387. drive letter which will be assigned to the CDROM reader.
  388.  
  389. 3.2.1 Microsoft Extensions
  390.  
  391.      If  you are using the Microsoft Extensions you will  load  a 
  392. CDROM  device  driver  as part of your CONFIG.SYS  file  (or  two 
  393. drivers  if  using the Philips or DEC readers) with a  line  like 
  394. this:
  395.  
  396.      DEVICE=HITACHI.SYS /D:CDROM1 /N:1 
  397.  
  398. This command assumes that the driver file "HITACHI.SYS"is located 
  399. in  your ROOT directory. The /D:CDROM1 switch assigns  a  logical 
  400. name CDROM1 to the drive. A name must be supplied, and is used to 
  401. identify this device, in case more than one CDROM drive is  being 
  402. used on your system. The name should not be the same as the  name 
  403. of any file stored on your system. An attempt to open a file with 
  404. the  same  name as the device driver will result  in  the  device 
  405. driver being opened, not the file. The /N:1 switch indicates that 
  406. this  is drive 1. This switch is used since some CDROM  interface 
  407. cards support multiple drives.
  408.  
  409.      Other commands which should be included in CONFIG.SYS if you 
  410. are using a CDROM drive with the Microsoft Extensions are:
  411.  
  412.      LASTDRIVE=Z 
  413.      FILES=30
  414.      BUFFERS=50
  415.  
  416.  
  417.      The LASTDRIVE command tells MSDOS to allow for enough  drive 
  418. letters to support the CDROM drive, plus any other drives on your 
  419. system. Using LASTDRIVE=L should also work in most circumstances. 
  420. The  files and buffers specifications provide  sufficient  system 
  421. work area to support CDROM operations.
  422.  
  423.      You  must  also execute a program  called  MSCDEX.EXE  which 
  424. allows  access to the CDROM drive as if it were a disk  drive  on 
  425. your system. This command can be put in your AUTOEXEC.BAT file so 
  426. that it is automatically run whenever you start-up your computer. 
  427. The command format is:
  428.  
  429.      MSCDEX /D:CDROM1 /L:L /M:20 /V /E
  430.  
  431.      Several  MSCDEX command switches are illustrated.  The  /L:L 
  432. command  assigns  the drive name L: to the CDROM  drive.  The  /D 
  433. switch  gives the device name of the CDROM drive (which  must  be 
  434. the  same  name  used  in  the  device  name  parameter  of   the 
  435. "DEVICE=CDROM.SYS"  command  in the CONFIG.SYS  file.  The  /M:20 
  436. switch  assigns  twenty 2K blocks of memory as a buffer  for  use 
  437. with CDROM data. The /V switch provides verbose messages when the 
  438. installation  program  is run, and /E tells the  program  to  use 
  439. expanded memory for the cache area.
  440.  
  441. 3.2.2 Other Driver Software
  442.  
  443.      Some   vendors  (Reference  Technology,  TMS)  offer   CDROM 
  444. software  which  is comparable to the Microsoft  Extensions.  Our 
  445. experience  with these software packages is that they modify  the 
  446. internals of MSDOS and may cause unpredictable results with  your 
  447. other  PC software. They often do not support CDROM  applications 
  448. designed  to work with the MSDOS extensions for CDROM and  cannot 
  449. be used with the IMDISP FILE prompt mode.
  450.  
  451. 3.2.3 Problems with CDROM Software
  452.  
  453.      The  PDS CDROM disks utilize a feature of the  CDROM  format 
  454. standard which provides extended attribute records to define  the 
  455. physical  characteristics  of data files. These records  will  be 
  456. used  by VAX and other minicomputer systems where  the  operating 
  457. system  allows  a  variety of record  formats  (fixed,  variable, 
  458. stream).  Many  of  the earlier implementations  of  High  Sierra 
  459. software  failed to recognize these records, which are placed  at 
  460. the  beginning of a file's data area. If your CDROM software  was 
  461. developed prior to April 1987, it may interpret these records  as 
  462. part of the data file, causing the first 2K bytes of each file to 
  463. appear as meaningless binary data. Users with this problem should 
  464. contact  their hardware or software vendors for updated  versions 
  465. of  the  CDROM software. The IMDISP program has been  patched  to 
  466. recognize and skip over these records on the PDS CDROM disks, but 
  467. these  patches  may not support other CDROM disks  with  extended 
  468. attribute records.
  469.  
  470. 3.3 DISPLAY DEVICE CHARACTERISTICS
  471.  
  472.      IMDISP  automatically  finds out which display  devices  are 
  473. available  (PGA,  EGA, or CGA) and uses the  one  available.  The 
  474. Enhanced  Graphics Adapter must have at least 128K of  memory  to 
  475. work  properly. Use of the Color Graphics Adapter is  discouraged 
  476. because the pixels have no gray levels, only black or white.
  477.  
  478.      The  display  coordinates start at (1,1) in the  upper  left 
  479. corner  of the screen; the line direction is down and the  sample 
  480. direction is to the right.
  481.  
  482. 3.3.1 Enhanced Graphics Adapter (EGA)
  483.  
  484.      The   EGA  is  a  bit-mapped  display  device  providing   a 
  485. resolution  of  350  lines  by 640 samples  of  4-bits  each.  It 
  486. produces  a  digital video signal for each  primary  color  (red, 
  487. green  and blue), The video signal for each color can be  set  to 
  488. one  of four levels, roughly equivalent to off, low,  medium  and 
  489. high.  Thus the number of possible colors (color palette)  is  64 
  490. (4^3). The following table illustrates the colors created by some 
  491. of the different combinations of red, green and blue.
  492.  
  493.   Red=   off, Green=   off, Blue=   off   results in Black
  494.   Red=   low, Green=   off, Blue=   off   results in Dark Red
  495.   Red=medium, Green=   off, Blue=   off   results in Light Red
  496.   Red=  high, Green=   off, Blue=   off   results in Bright Red
  497.   Red=   low, Green=   low, Blue=   low   results in Dark Gray
  498.   Red=medium, Green=   low, Blue=   off   results in Brown
  499.   Red=medium, Green=medium, Blue=   off   results in Yellow
  500.   Red=medium, Green=medium, Blue=medium   results in Light Gray
  501.   Red=  high, Green=   low, Blue=   off   results in Orange
  502.   Red=  high, Green=  high, Blue=  high   results in White
  503.  
  504.          Table 3-1: Sample EGA Color Palette Settings
  505.  
  506.  
  507.      The  EGA display is limited to only 16 colors out of the  64 
  508. possible, because only 4-bits are used to store each pixel  value 
  509. in memory. This 4-bit pixel value points to an entry in the color 
  510. table  which  represents one of the 64 possible  combinations  of 
  511. red, green and blue which can be displayed.
  512.  
  513.      Many  of  the  newer EGA boards are  capable  of  displaying 
  514. additional lines and samples when using a Multisync or  Multiscan 
  515. monitor.  The  standard  EGA uses a  16  Mhz  crystal  oscillator 
  516. (something like a clock which regulates the display speed), which 
  517. limits  the video output rate to the equivalent of 640 pixels  by 
  518. 350  lines.  The  EGA  circuitry  allows  for  a  faster  crystal 
  519. oscillator to be added to the board (24 Mhz and beyond)  allowing 
  520. about 25 percent more lines to be displayed (480 lines instead of 
  521. 350).  A  method for adding this capability to  an  existing  EGA 
  522. board  (for  about  $10  worth of  parts)  is  described  in  the 
  523. September 16, 1986 issue of PC Magazine.
  524.  
  525.      This mode requires that a multisync or multiscan monitor  be 
  526. attached to the computer, and there is no way for the program  to 
  527. automatically  detect  the  presence  of  the  special   monitor. 
  528. Therefore  this  display mode is invoked by specifying  an  MSDOS 
  529. "ENVIRONMENT"  variable. This is done by issuing an  MSDOS  "SET" 
  530. command at the MSDOS prompt as follows:
  531.  
  532.     SET IMDISP=EGA480
  533.  
  534.      This command can also be put in your AUTOEXEC.BAT file using 
  535. a  text editor, so that you need not invoke it each time you  run 
  536. IMDISP.   It  should  have  no  effect  on  other  MSDOS   system 
  537. operations.  There  is a chance that adding  this  variable  will 
  538. exceed  the size reserved by MSDOS for environment variables.  If 
  539. so,  you  should  consult  your  MSDOS  manual  to  increase  the 
  540. environment size on your system. The environment variable can  be 
  541. removed with the MSDOS command:
  542.  
  543.     SET IMDISP=
  544.  
  545.      Where a carriage return is typed immediately after the equal 
  546. sign. The 480 line mode requires an additional 83K of memory  for 
  547. the refresh buffer. If you try this mode and receive the  message 
  548. "Insufficient memory for line buffer", it is probably because you 
  549. have  a  512K memory machine, or have  memory  resident  programs 
  550. operating (like Sidekick or Superkey) which reduce the  available 
  551. memory to less than about 400K. You will need to use the 350 line 
  552. mode  or remove some memory resident programs to operate  in  480 
  553. line mode.
  554.  
  555.      Users  of the EGA with Multisync and Multiscan monitors  can 
  556. achieve  a  16 gray level display through the use  of  a  special 
  557. device  called the Grayscaler 1, from Avocado Computer, Box  632, 
  558. Yorba  Linda, Ca, 92686, (714) 528-1025. This cable converts  the 
  559. digital  video  signals  produced  by the  EGA  board  to  analog 
  560. signals.  By selecting appropriate EGA palette entries, a  fairly 
  561. good  representation of 16 gray levels can be achieved  (use  the 
  562. palette selection "PAL LOAD GRAY16.PAL" to select this palette).
  563.  
  564. 3.3.2 Video Graphics Array (VGA)
  565.  
  566. This version (4.0) of the IMDISP program includes support for the 
  567. IBM Video Graphics Array (VGA) display device.  The VGA  produces 
  568. an  analog display with several new color modes.   Of  particular 
  569. interest  to  IMDISP users are the 640 x 480 line  mode  with  16 
  570. displayable  colors (or gray levels).  The  320 x 200  line  mode 
  571. with 256 displayable  colors (or 64 gray levels) has  been tested
  572. but produces very blocky pixels.  This version of IMDISP supports 
  573. the 640 x 480 mode.  
  574.  
  575. To  set  the VGA display mode you must set  a  MSDOS  environment 
  576. variable prior to executing IMDISP.
  577.  
  578. To set the environment variable use the MSDOS command:
  579.  
  580. SET IMDISP=VGA
  581.  
  582. This will put the display in 640 sample by 480 line mode, with 16 
  583. gray  levels or colors displayable from a palette of  256K.   The 
  584. display  is  initialized  with  a  gray  scale  palette,  but   a 
  585. pseudocolor  palette can be invoked with the IMDISP command  "PAL 
  586. PS 0".  The "PALETTE EDIT" command will allow you to step forward 
  587. or  backward  through the 64 available shades  for  each  primary 
  588. color.   See  the  next  section  of  the  IMDISP manual for more 
  589. information on the palette edit function.  
  590.  
  591.  
  592. Users who  wish to experiment with the 320 x 200 VGA mode may use
  593.  
  594. SET IMDISP=VGA320
  595.  
  596. but be warned that all text messages expect an 80  column screen,
  597. and therefore wrap-around  on the display  creating a mess.  This 
  598. mode  is only provided for  experimentation and is not for casual 
  599. users!!!
  600.  
  601. 3.3.3 Professional Graphics Adapter (PGA)
  602.  
  603.      The PGA is a special graphics board developed by IBM for use 
  604. with CAD/CAM applications on the IBM PC. Because its architecture 
  605. is incompatible with the CGA and EGA boards, it has not been well 
  606. received by software developers. The PGA provides an analog video 
  607. signal  with a display resolution of 480 lines by 640 samples  of 
  608. 8-bits  each. It provides 16 intensities for each primary  color, 
  609. resulting  in a palette of 4,096 colors (16^3). The  color  table 
  610. allows 256 colors to be displayed simultaneously, however only 16 
  611. gray levels can be selected. 
  612.  
  613. Use the command:
  614.  
  615. SET IMDISP=PGA 
  616.  
  617. at the MSDOS prompt to force IMDISP to go into PGA display mode.
  618.  
  619. 3.3.4 Color Graphics Adapter (CGA)
  620.  
  621.      The  CGA  display  is a bit-mapped graphics  device  with  a 
  622. resolution of 200 lines by 640 samples of 1-bit each. It supports 
  623. only 2 colors in this display mode, black and white. This display 
  624. can  be used to get a general idea of the contents of  a  digital 
  625. image,  or for displaying one bit images (graphics  for  example) 
  626. but is not recommended for use with the PDS CDROM images.
  627.  
  628. To force a multi-function display card into CGA mode, use:
  629.  
  630. SET IMDISP=CGA
  631.  
  632.  
  633.                           Chapter 4
  634.  
  635.                        IMDISP OPERATION
  636.  
  637.      IMDISP can be used to display images up to several  thousand 
  638. lines and samples with a variety of pixel formats. These  formats 
  639. include  bit (1 bit), nibble (4 bits), byte (8 bits), or  integer 
  640. (16  bits). Integer pixels are assumed to be byte-swapped,  which 
  641. means  that  the  sign and most significant 7 bits  are  in  the 
  642. rightmost  byte,  and  the least significant 8 bits  are  in  the 
  643. leftmost byte. This is the convention used by both the IBM PC and 
  644. VAX  computer hardware families. IBM mainframes and 68000  series 
  645. computers  (Macintosh and Sun, for example)  use  un-byte-swapped 
  646. integers.
  647.  
  648.      Program  interaction with the user is via commands typed  in 
  649. response to the "COMMAND:" prompt. Most interaction is  performed 
  650. on  the graphic display screen, and program messages are  printed 
  651. over  any  image  display currently on the  screen.  The  REFRESH 
  652. command can be used to restore an image after other commands have 
  653. written  text over the display. The ERASE command can be used  to 
  654. clear  away  the  clutter left by  program  status  messages  and 
  655. previously  displayed  images. The screen  is  not  automatically 
  656. erased after each operation in order that multiple images can  be 
  657. displayed simultaneously, or so a histogram can be placed on  the 
  658. screen with the image.
  659.  
  660.      IMDISP  is invoked by typing "IMDISP" or "IMDISP  filename", 
  661. where  filename  is the name of an image file to  be  opened  for 
  662. processing  at program start-up. The filename may include a  disk 
  663. drive and path name specification.
  664.  
  665.      The  program  will blank the display screen  and  display  a 
  666. welcome logo, then the prompt "COMMAND:" will appear in the lower 
  667. left  portion  of the screen. If a filename is  included  in  the 
  668. command invocation, the welcome message is not displayed and  the 
  669. screen will display the COMMAND: prompt.
  670.  
  671.      Typing  "HELP" at the command prompt will provide a list  of 
  672. IMDISP commands. The most frequently used commands are "FILE"  to 
  673. open  a  file for processing, and "DISPLAY" to display  an  image 
  674. once the file has been opened.
  675.  
  676. 4.1 COMMAND SYNTAX
  677.  
  678.      The command line syntax is of the form:
  679.  
  680.      COMMAND KEYWORD1 = VALUE1 KEYWORD2=VALUE2 KEYWORD3 VALUE3 . . .
  681.  
  682.      The command line may be typed in either upper or lower case. 
  683. The  command  and  the  keyword names may  be  abbreviated  to  3 
  684. characters  in most cases. Any number of spaces may  be  inserted 
  685. between  words, and the keyword and value may be separated  by  a 
  686. space  or an equals sign. Some keywords do not require  a  value. 
  687. All  keywords are optional and have default values.  
  688.  
  689. 4.2  COMMAND DESCRIPTION
  690.  
  691.      Table  4-1 presents a summary of IMDISP commands.  They  are 
  692. separated  into  3 groups, file  manipulation  commands;  display 
  693. commands  and  program  control commands.  Only  the  capitalized 
  694. letters are required to specify a command.
  695.  
  696. 4.3 OPERATING MODES
  697.  
  698.      Several  of  the commands invoke special  program  operating 
  699. modes.  These  include  the FILE command when  issued  without  a 
  700. filename  argument  and  the CURSOR,  PROFILE  and  PALETTE  EDIT 
  701. commands.  The FILE mode displays a list of files in the  current 
  702. directory  on the screen for selection. It also contains  several 
  703. subcommands  for  controlling the display of files  on  the  menu 
  704. screen.  In  the CURSOR, PROFILE and PALETTE  EDIT  commands  the 
  705. cursor  keys  (arrow  keys) on the numeric  keypad  are  used  in 
  706. conjunction  with other keys to control program operation.  These 
  707. modes  are  exited  by typing either a  period  '.'  or  carriage 
  708. return.
  709.  
  710. File oriented commands:
  711.  
  712.        CD               . . . . to change the default directory
  713.        DIRECTORY        . . . . to perform the MSDOS directory command
  714.        FILE             . . . . to specify the name of the image
  715.        SAVE             . . . . to save the image display to a file
  716.        TYPE             . . . . to perform the MSDOS type command
  717.        LABEL            . . . . to display the image labels
  718.  
  719. Display commands:
  720.  
  721.        BROWSE           . . . . to display a group of images
  722.        DISPLAY          . . . . to display the image
  723.        ERASE            . . . . to erase the display
  724.        OVERLAY          . . . . to place an overlay on the image
  725.        REFRESH          . . . . to refresh the image plane
  726.        PALETTE          . . . . to adjust the palette for the display
  727.        HISTOGRAM        . . . . to display the histogram of the image
  728.        SET              . . . . to set DN value range
  729.        STRETCH          . . . . to do a linear gray scale stretch
  730.        CURSOR           . . . . to move the cursor around
  731.        PROFILE          . . . . to plot a profile of the image
  732.        TEXT             . . . . to draw text on the image
  733.  
  734. Program control commands:
  735.  
  736.        BATCH            . . . . to execute a batch command file
  737.        MENU             . . . . to select images from a menu file
  738.        EXIT or QUIT     . . . . to exit from the program
  739.        HELP             . . . . display help information
  740.        SYSTEM           . . . . execute MSDOS commands
  741.  
  742.                  Table 4-1: IMDISP Command Summary
  743.  
  744. 4.4 ERROR HANDLING
  745.  
  746.      If  an invalid command is issued at the COMMAND: prompt  the 
  747. program will beep and return to the COMMAND: prompt. In  handling 
  748. command  parameters the program takes action on those  parameters 
  749. that are recognized, but ignores invalid parameters. For example, 
  750. issuing a "SET LO = 25 HI = 100" command will not have any effect 
  751. since  the proper parameter names for the SET command are  "DNLO" 
  752. and "DNHI".
  753.  
  754.      It  is  also  possible  for  certain  system  errors  to  be 
  755. encountered  which  cause  the  program  to  abort  leaving  your 
  756. computer  in  graphics mode. N you are  using  certain  utilities 
  757. which reset the default text mode screen colors (like the  Norton 
  758. Utilities  screen attributes command) you may not be able to  see 
  759. what is being printed on the screen. The simplest approach is  to 
  760. perform  a  warm  boot,  by  typing  the  Ctrl,  Alt,  Del   keys 
  761. simultaneously. Alternately, you can often type IMDISP then  EXIT 
  762. to  reset the computer to text mode. Errors in  processing  image 
  763. files on CDROM, hard disk or floppy disks can cause these aborts.
  764.  
  765. 4.5 COMMAND REFERENCE
  766.  
  767.      This  section lists all IMDISP commands  alphabetically  and 
  768. describes  their  function,  parameters  which  control   command 
  769. operation,  and provides examples of command use, In the  command 
  770. and parameter description the following conventions are used:
  771.  
  772.   filename    represents the name of an MSDOS file, and may include 
  773.               an optional drive identifier and path specification.
  774.  
  775.   n           represents an integer value.
  776.  
  777. 4.5.1 BATCH
  778.  
  779.      The  BATCH command reads commands from the  specified  batch 
  780. command file. If no file name is specified the current  directory 
  781. is  searched for a file named BATCH.CMD. The CURSOR, PROFILE  and 
  782. PALETTE  EDIT  commands should not be used within  batch  command 
  783. files since they require interactive inputs from the keyboard.
  784.  
  785.      The BATCH command may take the following argument:
  786.  
  787.    filename    filename of batch command file.
  788.  
  789.      A  batch  file is simply a text file containing  a  list  of 
  790. commands,  with each command terminated by a carriage return.  If 
  791. the  command file is created with a word processor,  the  program 
  792. should be used in the non-document mode, to assure that  carriage 
  793. returns  are  embedded  between  command  lines.  An  example  of 
  794. creating a batch file to display the PDS logo image follows.
  795.  
  796.      At the MSDOS command level type:
  797.  
  798.      COPY CON TEST.CMD 
  799.      FILE LOGO.IMG
  800.      DISP ZOOM 4 
  801.      DISP ZOOM 2
  802.      DISP 
  803.      DISP SUB 2
  804.      EXIT
  805.  
  806.      Now  run IMDISP and type"BATCH TEST.CMD" at  the  "COMMAND:" 
  807. prompt.  Make  sure  the  file  "LOGO.IMG"  is  in  your  current 
  808. directory.  The  PDS logo should be displayed on  the  screen  in 
  809. several different sizes.
  810.  
  811. 4.5.3 BROWSE
  812.  
  813.      The BROWSE command  will  display all images  in a directory
  814. one after another.  An optional directory mask can be supplied to
  815. display only selected files ("BROWSE *.IMG"). The command creates
  816. a list  of files  to be  displayed, then  creates and  executes a 
  817. batch command file to display those images.  After  each image is 
  818. displayed, the  filename is displayed at the top of the image.  A 
  819. BROWSE  session can be  interrupted by pressing  control-s,  then 
  820. restarted by pressing control-q TWICE. A session can be halted by 
  821. typing any other key during the display. It can then be restarted 
  822. (from the beginning) with the command  "BROWSE C:BATCH.CMD".  The  
  823. default  file  name  for  the batch  file  created  by the BROWSE 
  824. command is 'C:BATCH.CMD'.  This  name  can be  changed using  the 
  825. "SET BROWSE fname" command  where  fname can  consist  of a drive  
  826. letter  and  filename,  which  should  be  terminated   with  the 
  827. extension ".CMD".
  828.  
  829. The BROWSE command has one argument and several optional keywords.
  830.  
  831.       fname   optional file selection mask (must immediately 
  832.               follow the command BROWSE).  May include a drive
  833.               letter but not a subdirectory name. Examples (*.img, 
  834.               L:*.BRS).
  835.  
  836.       SIZe n  allows the display of multiple images on the 
  837.               screen.  For example, on a 640 x 480 VGA display, 
  838.               six 200 x 200 images can be displayed adjacent to 
  839.               each other.
  840.  
  841.       SUBsample n used in conjunction with the SIZE command, to 
  842.               scale each image to fit in the SIZE specification.
  843.  
  844.       NOLabel inhibits writing the file name label at the top of 
  845.               each image as it is displayed.
  846.  
  847. As an example, the command "BROWSE *.* SIZE 200 SUBSAMPLE 4" will 
  848. display all the files in the current directory, subsampling  each
  849. by 4 and displaying  them  in  a 200 x 200  window.  The  command 
  850. "BROWSE *.BRS SIZE 100 SUB 2"  when used  with the Voyager Uranus
  851. browse images (on  Volume 3 of the  Uranus CDROM collection) will
  852. display up to 24 images at a time on the screen.
  853.  
  854. *** NOTE ***
  855.  
  856. BROWSE does  not  distinguish  between image and non-image files,
  857. and it is up to the  user  to  provide  the appropriate directory
  858. mask to select ONLY images.  If a message  "Image  does  not have 
  859. proper  label"  comes  up  on  the  screen  during  BROWSE, it is 
  860. probably  because  a  non-image  file is in the directory you are 
  861. browsing.  You  can  type  carriage  returns several times to get 
  862. back to the "COMMAND:" prompt, and the browse will continue.
  863.  
  864. If  you  are  using BROWSE on a computer without a hard disk, you 
  865. will have  to  use  the SET BROWSE command to  change the default 
  866. browse file name to a writable disk drive, for example: 
  867. "SET BROWSE A:BROWSE.CMD". If you are using BROWSE to view  files 
  868. on  a  CDROM  disk,  be  sure to  include the  drive letter  of a  
  869. writable  disk   drive if  you  specify  a BROWSE file name.  The
  870. BROWSE command file  produced by the BROWSE command can be edited
  871. with a text editor to produce your own custom command files.
  872.  
  873. 4.5.3 CD or CHDIR
  874.  
  875.      The  CD or CHDIR command is used just as it is at the  MSDOS 
  876. command level to change the current default directory.
  877.  
  878.      The   argument   of  the  CD  command  is  the   path   name 
  879. specification  of  the new default directory.  For  example,  "CD 
  880. \IMDISP\IMAGES"  would make \IMDISP\IMAGES the current  directory 
  881. if  it  exists.  To  change the current  default  drive  use  the 
  882. "SYSTEM"  command  ("SYSTEM  L:"   for  example)  or  the  "FILE" 
  883. command.  If there is not enough memory available for the  system 
  884. command to be executed an error message is displayed.
  885.  
  886. 4.5.4 CURSOR
  887.  
  888.      The CURSOR command is used to select a point in a  displayed 
  889. image  for  subsequent display commands. When first  invoked,  it 
  890. places  a  small  cursor  symbol at the  center  of  the  screen. 
  891. Depending  on the current contents of the screen, the cursor  may 
  892. be  hard  to see. Moving it with the arrow keys  on  the  numeric 
  893. keypad will help you locate it.
  894.  
  895.      Whenever  the cursor is moved, the current line  and  sample 
  896. location  of  the cursor and the DN value of the  pixel  at  that 
  897. point  is printed in the lower right portion of the  screen.  The 
  898. cursor  will move 16 pixels in the selected direction unless  the 
  899. movement value is adjusted using the + or  keys.
  900.  
  901.                         Numeric Keypad Keys
  902.                    -------------------------------
  903.                   |   7   |   8   |   9   | PrtSc |
  904.                   |  Home |  Up   |  PgUp |       |
  905.                    -------------------------------
  906.                   |   4   |   5   |   6   |   -   |
  907.                   |  Left |       | Right |       |
  908.                    ------------------------------- 
  909.                   |   1   |   2   |   3   |   +   |
  910.                   |  End  | Down  |  PgDn |       |
  911.                    -------------------------------
  912.  
  913.                       Action of Keypad Keys:
  914.  
  915.                       7 = Move up and left.
  916.                       8 = Move up.
  917.                       9 = Move up and right.
  918.                       4 = Move left.
  919.                       5 = Not active.
  920.                       6 = Move right.
  921.                       1 = Move down and left.
  922.                       2 = Move down.
  923.                       3 = Move down and right.
  924.                       - = Decrement cursor movement value.
  925.                       + = Increment cursor movement value.
  926.  
  927.  
  928.              Table 4-2: IMDISP Cursor Keys
  929.  
  930.      Cursor  mode is exited by typing a "." (period) or  carriage 
  931. return. The cursor position is retained for future use in DISPLAY 
  932. commands  which  use the CENTER option. It is  very  useful  with 
  933. large  images where the entire image may be displayed  using  the 
  934. subsample option, then a point selected for subsequent display at 
  935. full resolution.
  936.  
  937.      Example:  Type  "FILE  MONTAGE.IMG" followed  by  "DISP"  to 
  938. display  the  MONTAGE.IMG file.  Type "CUR" to enter  the  cursor 
  939. mode,  then move the cursor to the center of the Uranus image  in 
  940. the  upper left corner of the image using the up and  left  arrow 
  941. keys.  Now type "." to exit cursor mode, then type "DISP  ZOOM  4 
  942. CENTER"  which will display Uranus as a large grainy ball on  the 
  943. screen.
  944.  
  945. 4.5.5 DIR
  946.  
  947.      The  DIR command is used just as the MSDOS dir command.  Its 
  948. argument  is  passed to MSDOS for execution. At the  end  of  the 
  949. directory  listing the screen will display "Type carriage  return 
  950. to  continue:" which will return to the IMDISP command  mode.  If 
  951. there is not enough memory available for the system command to be 
  952. executed an error message is displayed.
  953.  
  954. 4.5.6 DISPLAY
  955.  
  956.      The  DISPLAY command reads an image file and displays it  on 
  957. the  the screen. If the image is larger than the display  screen, 
  958. the default mode is to display as much of the upper left  portion 
  959. of the image as will fit on the screen. The SUBSAMPLE keyword  can 
  960. be   used  to  select  every  'n'  lines  and  samples  so   that 
  961. representations  of very large images may be displayed. The  ZOOM 
  962. keyword  can  be  used to enlarge a portion of an  image  on  the 
  963. display screen. Keywords can be specified to begin displaying  at 
  964. any line and sample in the image with the SL (starting line)  and 
  965. SS  (starting  sample).  If only a limited number  of  lines  and 
  966. samples  are  to  be displayed the NL (number of  lines)  and  NS 
  967. (number of samples) keywords can be used. The UP, DOWN, LEFT  and 
  968. RIGHT  keywords can be used to display different portions of  the 
  969. image,  relative to the currently displayed portion. The  display 
  970. can also placed at any point on the screen using the DSL (display 
  971. starting line) and DSS (display starting sample) keywords.
  972.  
  973.      DISPLAY takes the following keywords :
  974.  
  975.       SUBsample n  a positive integral subsampling factor for
  976.                    displaying images larger than the size of the 
  977.                    screen.  SUB=2 would display an image at half 
  978.                    the resolution.  
  979.   
  980.       If the image lines and samples look like this:
  981.  
  982.                                   sample values 
  983.  
  984.                 line 1            1  2  3  4  5 
  985.                 line 2            6  7  8  9 10
  986.                 line 3           11 12 13 14 15    
  987.  
  988.       Then the command DISP SUB 2 would produce:
  989.  
  990.                                   sample values
  991.  
  992.                 line 1            1  3  5 
  993.                 line 2           11 13 15    
  994.  
  995.       ZOOM n        a positive integral zoom factor for looking at
  996.                     part of an image close up.  The zoom command 
  997.                     replicates pixels by the integer value specified.  
  998.                     If the image lines and samples look like this:
  999.  
  1000.                                   sample values
  1001.  
  1002.                 line 1            1  2  3  
  1003.                 line 2            4  5  6
  1004.                 line 3            7  8  9
  1005.  
  1006.       Then the command ``zoom 2" would produce the following:
  1007.  
  1008.                                   sample values 
  1009.  
  1010.                 line 1            1  1  2  2  3  3  
  1011.                 line 2            1  1  2  2  3  3  
  1012.                 line 3            4  4  5  5  6  6  
  1013.                 line 4            4  4  5  5  6  6
  1014.                 line 5            7  7  8  8  9  9
  1015.                 line 6            7  7  8  8  9  9
  1016.  
  1017.  
  1018.       CENTER     center the display around current cursor position. 
  1019.                  This command is very useful when displaying large 
  1020.                  images or when zooming in on selected areas. 
  1021.       NL n
  1022.       NS n       number of lines or samples from the image file to display
  1023.  
  1024.       SL n
  1025.       SS n       starting line or sample within the image file to display
  1026.  
  1027.       UP n
  1028.       DOWN n     adjusts the starting line up or down from the 
  1029.                  previous value, thereby moving the display window 
  1030.                  up or down in the image.  The default amount to 
  1031.                  move up or down is the size of the display.
  1032.  
  1033.       LEFT n
  1034.       RIGHT n    adjusts the starting sample left or right from the 
  1035.                  previous value, thereby moving the display window 
  1036.                  left or right in the image
  1037.         
  1038.       DSL n
  1039.       DSS n      start the image display at the specified line and 
  1040.                  sample on the display screen.
  1041.  
  1042.      Examples: The user wants to display an entire Voyager  image 
  1043. (800  x 800) on the display screen then display a portion of  the 
  1044. image  at full resolution. Type "FILE MIRANDA1.LBL",  then  "DISP 
  1045. SUB  2" to display the entire image at half resolution,  Use  the 
  1046. CURSOR  command  to move the cursor to the center of an  area  of 
  1047. interest.  Exit  the cursor mode by typing ".", then  type  "DISP 
  1048. CENT"  to  display  the selected portion of  the  image  at  full 
  1049. resolution.
  1050.  
  1051.      The  user wishes to place 2 images which are each 800  lines 
  1052. by  800 samples on the screen next to each other. The first  file 
  1053. is opened with "FILE IMAGE1.IMG".  The "DISPLAY SUB 4" command is 
  1054. given to display every 4th line and sample of the image to create 
  1055. a 200 x 200 display. Next the "FILE IMAGE2.IMG" command is given. 
  1056. Now a "DISPLAY SUB 4 DSS 201" is given to place the second  image 
  1057. on  the screen starting at display sample position 201,  next  to 
  1058. the first image.
  1059.  
  1060. 4.5.7 ERASE
  1061.  
  1062.      The command ERASE causes the screen to be erased by  setting 
  1063. all  of  the  pixels to 0, which may  not  necessarily  be  black 
  1064. depending on the palette setting. 
  1065.  
  1066. 4.5.8 EXIT
  1067.  
  1068.      The  EXIT command exits IMDISP and returns the user  to  the 
  1069. MSDOS  operating  system. The contents of the image  display  and 
  1070. refresh buffer are discarded.
  1071.  
  1072. 4.5.9 FILE
  1073.  
  1074.      FILE does not take a keyword, just a value which is the file 
  1075. name.  The  specified file will be opened, or  an  error  message 
  1076. issued  if the file cannot be opened. The capability to  directly 
  1077. address  any sector on the CDROM disk by providing  its  physical 
  1078. address  (minute, second and sector number) is also available  to 
  1079. users of the Microsoft Extensions software.
  1080.  
  1081.      If  the  FILE command is specified without a  filename,  the 
  1082. program  will  display  a  list of  file  names  in  the  current 
  1083. directory.  Each  file name is preceded by a number.  Typing  the 
  1084. number  associated  with a file name will select  that  file  for 
  1085. processing.  File  names  that  actually  represent  lower  level 
  1086. directories  are  indicated  with a <d> symbol  after  the  name, 
  1087. Directories  can  be traversed downward by selecting  the  number 
  1088. associated  with  a  directory  name.  Upward  traversal  is   by 
  1089. selecting  the  item  identified as PARENT DIR.  This  will  move 
  1090. upward in the directory hierarchy.
  1091.  
  1092.      The  prompt  mode clears the screen and displays a  menu  of 
  1093. files  and commands. These commands allows specification  of  the 
  1094. default  drive, a file "mask" to use in selecting file names  for 
  1095. display and options for moving through the list of files when the 
  1096. current directory contain more than 30 files. The top line of the 
  1097. display  also  indicates  how  many  files  are  in  the  current 
  1098. directory.  After  exiting  the FILE prompt  mode,  the  previous 
  1099. contents  of  the  display  screen can  be  recovered  by  typing 
  1100. "REFRESH".
  1101.  
  1102.      The FILE prompt mode subcommands:
  1103.  
  1104.          D       select default disk drive
  1105.          M       specify a file selection mask to use in displaying 
  1106.                  files on the screen.
  1107.          N       display the next set of file names on the screen 
  1108.                  if there are more files in the current directory 
  1109.                  than can be displayed on one screen.
  1110.          P       display the previous set of file names.
  1111.          Q       quit the file selection mode and return to IMDISP 
  1112.                  command mode.
  1113.  
  1114.      The  N, P and Q commands are executed immediately. If the  D 
  1115. or M commands are selected, the user is prompted to enter a drive 
  1116. letter or file mask.
  1117.  
  1118.      If  the file selected by the "FILE filename" or FILE  prompt 
  1119. mode has a valid label, either PDS or VICAR2, then the number  of 
  1120. lines  and samples and the pixel size will be displayed.  If  the 
  1121. file  is unlabeled then the program will prompt for the values  to 
  1122. use  for the number of lines and samples, the number of bits  per 
  1123. pixel,  and  the  number of header bytes.  PDS  detached  labeled 
  1124. images  can  also be displayed. The specified  file  remains  the 
  1125. current file until a new FILE command is given. The FILE  command 
  1126. resets  the  SET  DNLO and SET DNHI values  to  the  minimum  and 
  1127. maximum  for the pixel size (normally 0 and 255). If a  specified 
  1128. filename  is  not found in the current directory  then  an  error 
  1129. message is displayed.
  1130.  
  1131.      If  the  unlabeled  image has a regular format,  that  is  a 
  1132. uniform  structure of repeating lines and samples, the  user  can 
  1133. specify  this  information  when prompted  by  the  program.  For 
  1134. example,  an  image named ASTERIA.DAT with one 1422  byte  header 
  1135. block  followed by an image composed of 370 lines by 450  samples 
  1136. of 8 bit pixels would be processed as follows:
  1137.  
  1138. At  the COMMAND: prompt type "FILE ASTERIA.DAT" The program  will 
  1139. display the message:
  1140.  
  1141.     Input file does not have a proper label.
  1142.     Input number of lines: 370                enter the value 370
  1143.     Input number of samples: 450              enter the value 450
  1144.     Input size of each sample: 8              enter the value 8
  1145.     Input size of header label: 1422          enter 1422 for the 
  1146.                                               size of the foreign 
  1147.                                               label block).
  1148.  
  1149.      The  COPIM  utility can be used to add a PDS  label  to  the 
  1150. beginning  of  such a file, so that it can be  used  subsequently 
  1151. without having to specify all the parameters separately.
  1152.  
  1153.      The  physical address of a data block on the CDROM can  also 
  1154. be  specified using the syntax 'FILE "CD:mm:ss:bb"', where mm  is 
  1155. the minute, ss the second, and bb the sector block number of  the 
  1156. beginning  of the desired data area. The CD:mm:ss:nn must  be  in 
  1157. double quotes and the CD must be capitalized! This mechanism  can 
  1158. be  used  to access files on non-High Sierra format  disks.  This 
  1159. will  only  work  on  systems  using  the  Microsoft   Extensions 
  1160. software.
  1161.  
  1162. 4.5.10 HELP
  1163.  
  1164.  
  1165.      HELP  displays the online help message. If followed  by  the 
  1166. name  of  a  valid  command  the  message  for  that  command  is 
  1167. displayed.  HELP is not provided for MSDOS commands (DIR,  CHDIR, 
  1168. CD and TYPE).
  1169.  
  1170. 4.5.11 HISTOGRAM
  1171.  
  1172.  
  1173.      The HISTOGRAM command produces a plot showing the number  of 
  1174. pixel  values  in  the image at each DN level. The  range  of  DN 
  1175. values  is displayed on the x-axis and the number of  occurrences 
  1176. of a specific DN value on the y-axis (See Figure 4-1).
  1177.  
  1178.      The  HISTOGRAM command reads through the  image,  calculates 
  1179. the  histogram,  and then displays the plot on  the  screen.  The 
  1180. histogram is scaled so that the third highest histogram value  is 
  1181. used  as  the maximum. It is recommended that  the  SUBSAMPLE  or 
  1182. other   subsetting  keywords  be  used  to  speed  up   histogram 
  1183. calculation,  which  can be quite slow for large images  and  for 
  1184. images  stored on CDROM. Histogram plots are displayed on top  of 
  1185. any image currently displayed on the screen, so the user may wish 
  1186. to  use  the  ERASE command to clear the screen  prior  to  using 
  1187. HISTO.  After  the  histogram  is displayed,  the  image  can  be 
  1188. restored using the REFRESH command.
  1189.  
  1190.        27582  |            .
  1191.               |           .. 
  1192.               |          ....
  1193.     COUNT     |         .....
  1194.               |        .......
  1195.               |       .........
  1196.               |     ............
  1197.               |   ...............
  1198.               --+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
  1199.               0      64      128     192     256                
  1200.                           DN value
  1201.  
  1202.             Figure 4-1: Sample Image Histogram
  1203.  
  1204.  
  1205.      By  evaluating  the histogram, the user  can  determine  the 
  1206. optimum settings for the SET (DNLO and DNHI) command to produce a 
  1207. useful  display.  In  the  example  above,  the  image  data  are 
  1208. clustered  between  DN  values  32 and  144.  Using  the  default 
  1209. settings  of  the EGA display mode the colors assigned to  the  2 
  1210. lowest  color  values and the 7 highest values  (representing  DN 
  1211. values from 0 to 31 and from 144 to 255) would not be used  since 
  1212. the image contains no pixels with these values.
  1213.  
  1214.      By  using the "SET DNLO 32 DNHI 144" command the 16  display 
  1215. levels  available on the EGA display would be assigned to  values 
  1216. between 32 and 144 rather than distributed evenly from 0 to  255, 
  1217. and all 16 colors would be used in the display.
  1218.  
  1219.      HISTOGRAM takes the following keywords and arguments:
  1220.  
  1221.         SUBSAMPLE  n   a integral subsample  factor 
  1222.                        for speeding up histogram use of
  1223.                        "HISTOGRAM SUBSAMPLE 4" is always recommended
  1224.         NL n
  1225.         NS n           number of lines and samples from image
  1226.         SL n
  1227.         SS n           starting line and sample in image
  1228.         CENT           perform the histogram on only the displayed
  1229.                        portion of the image.
  1230.  
  1231.      Two  special  keywords can be used with  Voyager  or  Viking 
  1232. images  on  the PDS CDROM disks.  These  will  extract  histogram 
  1233. values  stored  with the image on the CDROM disk and  reduce  the 
  1234. time required for the histogram to be generated from more than  1 
  1235. minute to about 3 seconds. Note that these commands will not work 
  1236. with Voyager image files in the \PLANET\JUPITER\ATMOS  directory, 
  1237. or with versions of system software written before April 1987.  
  1238.  
  1239.         VOY     use histogram from Voyager CDROM engineering data
  1240.         VIK     use histogram from Viking CDROM engineering data
  1241.  
  1242. 4.5.12 LABEL
  1243.  
  1244. The label command prints the labels for the currently selected
  1245. image file on the screen.  
  1246.  
  1247. 4.5.13 MENU
  1248.  
  1249. The menu command reads a file containing a list of file names and 
  1250. places the user in the MENU mode, where files from this list can be 
  1251. selected for display.  The MENU mode is similar to the FILE mode, 
  1252. except that the list of files presented is that provided in the menu 
  1253. file, rather than from a selected directory.
  1254.  
  1255. The MENU mode can be invoked by typing "MENU filename.MNU" at the 
  1256. COMMAND: prompt.  It can also be invoked on program startup by typing 
  1257. "IMDISP filename.MNU" to initiate the program.  The menu file must
  1258. use the ".MNU" extension to startup IMDISP in MENU mode.
  1259.  
  1260. Subcommands of the MENU mode are as follows:
  1261.  
  1262. # - Enter the number corresponding to a desired file name to select
  1263. the file.
  1264.  
  1265. P)revious  - display the previous screen of file names
  1266. N)ext      - display the next screen of file names
  1267. Q)uit      - quit or exit from MENU mode
  1268.  
  1269. After selecting and displaying an image, the user can return to the 
  1270. current menu by typing "MENU" at the COMMAND: prompt.
  1271.  
  1272. A menu file can take either of two formats.  The preferred format is a 
  1273. PDS labelled table file containing file names.  A sample file is shown
  1274. below:
  1275.  
  1276. NJPL1I00PDS100000000           = SFDU_LABEL
  1277. FILE_TYPE                      = TABLE
  1278. RECORD_FORMAT                  = STREAM
  1279. OBJECT                         = FILE_NAME
  1280.   TYPE                         = LITERAL
  1281.   LENGTH                       = 80
  1282. ENDOBJECT
  1283. NOTE                           = "Sample MENU file for IMDISP"
  1284. END
  1285. L:\OCEAN\SCBMEAN.IMG
  1286. L:\OCEAN\WCMEAN.IMG
  1287. L:\PLDS\TMCH01.DAT
  1288. L:\PLDS\DEM.DAT
  1289. L:\PLANET\SATURN\ATMOS\C3497355.IMG
  1290. <END OF FILE>
  1291.  
  1292. A  second  abbreviated  form  may  also  be  used, where only the 
  1293. filenames are specified in the  ".MNU"  file.  In  this  case the 
  1294. file  would  only  contain  the  filenames  shown  after  the END 
  1295. statement in the example above.  
  1296.  
  1297. 4.5.14 OVERLAY
  1298.  
  1299. The OVERLAY command draws a lat/lon overlay grid on the displayed 
  1300. image.  It is  intended only for use  with the Ocean Data System, 
  1301. West Coast Time Series CDROM in this program version.  
  1302.  
  1303. The OVERLAY command has the following arguments:
  1304.  
  1305.       MAXLAT      Latitude of top of image.
  1306.       MINLAT      Latitude of bottom of image. 
  1307.       MAXLON      Longitude of left side of image.
  1308.       MINLON      Longitude of right side of image.
  1309.  
  1310.       LEGend      Draw a color scale with the overlay.
  1311.  
  1312. 4.5.15 PALETTE
  1313.  
  1314.      The PALETTE command is used for changing the colors assigned 
  1315. to  displayable  color  values.  This is  done  by  modifying  an 
  1316. internal  color  table which assigns intensity  values  for  red, 
  1317. green  and  blue to a color value, The EGA provides  4  intensity 
  1318. values  for each of 3 colors, so that 64 different colors can  be 
  1319. created. However, the EGA pixels are only 4-bits each so only  16 
  1320. color values can be used simultaneously.
  1321.  
  1322.      The palette can be modified using the EDIT command and saved 
  1323. and  loaded from a disk file. The edit mode is invoked by  typing 
  1324. PALETTE EDIT. With the EGA display, a bar containing 16 colors or 
  1325. shades  will  be displayed on the bottom of the screen.  A  small 
  1326. square  will appear in the middle of the center color  box.  This 
  1327. indicates  that  this  color  value  is  currently  selected  for 
  1328. editing.  To  select another color value for  editing,  move  the 
  1329. small square to the appropriate color using the "4" (left  arrow) 
  1330. and  "6" (right arrow) keys on the numeric keypad. The  color  of 
  1331. the current color box is changed with the "R", "G", and "B"  keys 
  1332. (for  red,  green,  and blue). Upper case  letters  increase  the 
  1333. amount  of  the primary color, and lower case keys  decrease  the 
  1334. amount of the color. The "8" (up arrow) and "2" (down arrow) keys 
  1335. increase  and decrease, respectively, the amount of  red,  green, 
  1336. and  blue simultaneously. Other commands in the palette edit mode 
  1337. are the  "s" command,  which  will  shift all colors one value to 
  1338. the right, and the  "x" command, which will exchange color values 
  1339. (the color setting for color  0 becomes the setting for color 15, 
  1340. while 15  replaces  0, the  color setting for color 1 becomes the 
  1341. setting  for 14,  while 14  replaces  1, etc.).  The  up and down 
  1342. arrow keys can also be used to cycle through the colors available 
  1343. in  a  given  display  mode  one  at a time.  Type the "." key or 
  1344. carriage return to exit the edit mode.
  1345.  
  1346.      PALETTE takes the following keywords and arguments:
  1347.  
  1348.         EDIT n           to interactively adjust an n-color palette. 
  1349.                          See edit description (above) for details
  1350.  
  1351.         PSEUDOCOLOR n    PS = 0 for default palette, 
  1352.                          PS = 1 for gray scale palette, 
  1353.                          PS = 2 for pseudo color palette
  1354.         SAVE filename    saves the specified palette on disk
  1355.         LOAD filename    loads the specified palette from disk
  1356.  
  1357.      The  default  palette file for LOAD or  SAVE  operations  is 
  1358. IMDISP.PAL.  The format of the default color palette when  stored 
  1359. in a palette file is as shown below:
  1360.  
  1361. NJPL1I00PDS000000784            = PDS_SFDU_LABEL
  1362. FILE_TYPE                       = TABLE
  1363. RECORD_TYPE                     = STREAM
  1364. FILE_RECORDS                    =  28
  1365. TABLE_ROWS                      =  16
  1366. ROW_COLUMNS                     =   4
  1367. COLUMN_NAME                     = (COLOR_NUMBER,
  1368.                                    RED_VALUE,
  1369.                                    GREEN_VALUE,
  1370.                                    BLUE_VALUE)
  1371. COLUMN_TYPE                     = (INTEGER,INTEGER,INTEGER,INTEGER)
  1372. END
  1373.    0   0   0   0
  1374.    1  64   0   0
  1375.    2 128   0   0
  1376.    3 192   0   0
  1377.    4 192  64   0
  1378.    5 192 128   0
  1379.    6 192 192   0
  1380.    7 128 192   0
  1381.    8   0 192   0
  1382.    9   0 192 128
  1383.   10   0 128 128
  1384.   11   0 128 192
  1385.   12   0   0 192
  1386.   13 128   0 192
  1387.   14 192   0 192
  1388.   15 192 192 192
  1389.  
  1390.      The  first  column of the palette table is the  color  value 
  1391. number  for  the display, and columns 2, 3 and  4  represent  the 
  1392. intensity  of  the  red, green and  blue  (respectively)  primary 
  1393. colors on a scale of 0 to 255. With the EGA display these  values 
  1394. are: 0 = off; 64 = low; 128 = medium; 192 = high.
  1395.  
  1396. 4.5.16 PROFILE
  1397.  
  1398.  
  1399.      PROFILE  plots the DN values of pixels located along a  line 
  1400. between  two points in the image, i.e. it creates a graph  of  DN 
  1401. value versus pixel along the line joining the two points,  Cursor 
  1402. mode is used to select the two endpoints; typing "." or  carriage 
  1403. return selects the current cursor position as the endpoint. After 
  1404. the endpoints are selected a line is drawn between the points and 
  1405. the graph is plotted at the bottom of the screen, showing the  DN 
  1406. values  on the x-axis and the positions along the line on the  y-
  1407. axis.
  1408.  
  1409. 4.5.17 QUIT
  1410.  
  1411.      Exits  the  program. The contents of the image  display  and 
  1412. refresh buffer are discarded.
  1413.  
  1414. 4.5.18 REFRESH
  1415.  
  1416.      REFRESH redisplays the image plane from the refresh  buffer. 
  1417. When  images are written to the screen they are also  written  to 
  1418. the  refresh buffer. The REFRESH command writes this buffer  back 
  1419. to  the screen, thereby erasing any graphics or  text  overlaying 
  1420. the  image  on the screen. The refresh buffer  contains  as  many 
  1421. lines  from  the display screen as there is room for  in  memory. 
  1422. REFRESH  takes,es  no parameters. It can also be used  after  the 
  1423. FILE prompt mode to redisplay the contents of the refresh buffer.
  1424.  
  1425.      Refresh is commonly used after the HELP command, or after  a 
  1426. HISTOGRAM  or PROFILE command to remove text and plots  from  the 
  1427. display screen.
  1428.  
  1429. 4.5.19 SAVE
  1430.  
  1431.      The SAVE command copies  the  contents of the display screen 
  1432. to a file.  On  EGA  systems  the  display  buffer  contains only 
  1433. 4-bits per  pixel, so  specifying  BP = 8  will  write  the 4-bit 
  1434. pixels in full bytes,  but does not save full 8-bit  pixels  even 
  1435. if the  input  image  is an 8-bit  image,  Use  the COPIM utility 
  1436. program to  produce  a  full resolution subset of an 8-bit image.
  1437.  
  1438.      SAVE  takes the following arguments and keywords, where  the 
  1439. filename must immediately follow the SAVE command:
  1440.  
  1441.         filename        filename of image to save
  1442.  
  1443.         NL n
  1444.         NS n            number of lines and samples to save
  1445.  
  1446.         SL n
  1447.         SS n            starting line and sample to save
  1448.         BP n            number of bits per pixel in output image
  1449.  
  1450.      Example: Save a 200 line by 200 sample area at the center of 
  1451. an  image  in the file SMALL.IMG. First use the FILE  command  to 
  1452. select and display an input image. Now type:
  1453.  
  1454.      "SAVE SMALL.IMG SL 100 SS 210 NL 200 NS 200" 
  1455.  
  1456. to save the portion of the image beginning at line 100 and sample 
  1457. 210 in the new file SMALL.IMG.
  1458.  
  1459. 4.5.20 SET
  1460.  
  1461.      SET is used to display and change the DN (pixel value) range 
  1462. that  is  used  to  compress  the  pixel  values  to  the   range 
  1463. appropriate  for the display device. The default, which is  reset 
  1464. for  each  new  file,  is the full range of  DN  values  for  the 
  1465. particular pixel format (e.g. 0 to 255 for byte). It is also used
  1466. to specify a file name to be used by the browse command.
  1467.  
  1468.      The results of a SET command will not take effect until  the 
  1469. next DISPLAY command is performed.
  1470.  
  1471.      Set takes the following keywords:
  1472.  
  1473.         DNLOW n
  1474.         DNHIGH n   where values less than DNlow are set to  color 
  1475.                    value 0, values greater than DNHIGH are set to 
  1476.                    the  maximum  color value available,  and  the 
  1477.                    color  values between are assigned equally  to 
  1478.                    the DN values between Dnlow and DNhi.
  1479.  
  1480.         BROwse filename sets a file name to be used for the
  1481.                    browse file.  This file name will override the
  1482.                    default file name, which is 'c:browse.cmd'.
  1483.  
  1484.      For  example,  using the default color palette  and  an  EGA 
  1485. display with 16 color values available, the command "SET DNLO 100 
  1486. DNHI 164" will assign DN values below 100 to black and DN  values 
  1487. above 164 to white, and spread the 16 color values between the DN 
  1488. limits, thus each color value will represent 4 DNs (value 0 =  DN 
  1489. 100 to 103; value 1 - DN 104 to 107, etc.).
  1490.  
  1491.      If  values other than the default are used then  the  images 
  1492. will display more slowly because scaling divisions are  required. 
  1493. SET with no parameters will display the current values.
  1494.  
  1495.      The  DNLO  and  DNHI values are reset  to  the  minimum  and 
  1496. maximum for a given pixel size when a FILE command is issued.
  1497.  
  1498. 4.5.21 STRETCH
  1499.  
  1500.  
  1501.      STRETCH  sets the palette to a gray scale stretched  between 
  1502. the two specified pixel values. Stretch is most useful on the PGA 
  1503. display  where 16 gray levels are available. On the  EGA  display 
  1504. the  stretch  command  activates the  gray  level  palette  which 
  1505. provides  only 4 gray levels. Use the PAL PS 0 command to  return 
  1506. the display to the default palette after performing a stretch.
  1507.  
  1508.      STRETCH takes the following keywords :
  1509.  
  1510.         LOW n
  1511.         HIGh n     the low and high DN values  of the stretch.   
  1512.                    
  1513.  
  1514.      These  pixel  values refer to the DN values in  the  current 
  1515. image display, not necessarily in the original image (scaling may 
  1516. have  been involved).   For example with the EGA display  the  DN 
  1517. values in the display range from 0 to 15, even if a byte image is 
  1518. being displayed.
  1519.  
  1520.      The STRETCH command is not recommended for use on EGA systems.
  1521.  
  1522. 4.5.22 SYSTEM
  1523.  
  1524.      The SYSTEM command is used to send a command to MSDOS.
  1525.  
  1526.  
  1527.      For  example "SYS L:" will set the L: drive as  the  current 
  1528. default  drive. If there is not enough memory available  for  the 
  1529. system command to be executed an error message is displayed.  The 
  1530. SYS  command will not work on floppy disk systems unless the  file 
  1531. "COMMAND.COM"  is  present  on the floppy disk  with  the  IMDISP 
  1532. program.
  1533.  
  1534. 4.5.23 TEXT
  1535.  
  1536. The text command can be used to display a string of text on the 
  1537. screen.  The text string can be entered on the command line, enclosed 
  1538. in apostraphies or quotes (e. g., TEXT `This is a text string').  
  1539. If the text string is not entered on the command line the program will 
  1540. prompt for the string to be displayed.  
  1541.  
  1542. Once the command is issued and the text string entered the program is 
  1543. placed in CURSOR mode so that the display position can be selected.  
  1544. This is done by using the arrow keys to move the cursor to the desired 
  1545. location.  After the position is selected, the user types a period (.) 
  1546. or carriage return and the text will be written on the display screen.
  1547.  
  1548. The TEXT command has one argument and two optional keywords.
  1549.  
  1550.       LINe       The line number to position the text at.
  1551.       SAMple     The sample number to position the text at.
  1552.  
  1553.       'text...'  The text string to be printed, enclosed in 
  1554.                  quotes or apostraphies.
  1555.  
  1556. The  text  command  writes  over  image  data  in the display and 
  1557. refresh buffer, thus the underlying portion of the image is lost.
  1558.  
  1559. 4.5.24 TYPE
  1560.  
  1561.      The TYPE command is used to type the contents of a text file 
  1562. on the display screen, using the standard MSDOS type command.
  1563.  
  1564.      Its argument is passed to MSDOS for execution. At the end of 
  1565. the type operation the screen will display "Type carriage  return 
  1566. to  continue:" which will return to the IMDISP command  mode.  If 
  1567. there is not enough memory available for the system command to be 
  1568. executed an error message is displayed.
  1569.  
  1570. 4.6 OTHER UTILITY PROGRAMS
  1571.  
  1572.      There  are  several utility programs also  provided  on  the 
  1573. distribution  disk. These programs can read PDS  labeled,  VICAR2 
  1574. labeled,  or  unlabeled  images. The output  images  are  always 
  1575. written  with  PDS  ODL  labels.  The  programs  prompt  for  the 
  1576. necessary input values.
  1577.  
  1578. 4.6.1 COPIM
  1579.  
  1580.      COPIM  is a simple image copying program. It' can  copy  the 
  1581. whole  image, for example to put PDS labels on a foreign  image), 
  1582. or  extract a window from the image. It can subsample  the  image 
  1583. with an integral subsampling factor. The program prompts for  the 
  1584. input  and  output file names, the window to extract  (just  type 
  1585. return  for  the whole image), and the  subsampling  factor  (the 
  1586. default  is 1). If the input file is not in VICAR2 or  PDS  image 
  1587. format  the program will also prompt for the number of lines  and 
  1588. samples, pixel size and header size of the image.
  1589.  
  1590.      For example, to extract the first 100 lines and samples from 
  1591. the file LOGO.IMG the following commands would be used:
  1592.  
  1593.      COPIM 
  1594.      Input Image: LOGO.IMG
  1595.      Lines: 350 Samples: 340 Bits per pixel: 1 
  1596.      Output Image: LOGOSUB.IMG
  1597.      Starting line: 1 
  1598.      Starting sample: 1 
  1599.      Number of lines: 100 
  1600.      Number of samples: 100 
  1601.      Line Subsampling factor (1): 1
  1602.      Sample Subsampling factor(1): 1
  1603.  
  1604.  
  1605. 4.6.2 CONVERT
  1606.  
  1607.      CONVERT  is  simple  pixel  format  conversion  program.  It 
  1608. converts an image to an integer (16 bits), byte (8 bits),  nibble 
  1609. (4  bits),  or binary (1 bit) image. It can also perform  a  user 
  1610. specified  scaring. The program prompts for the input and  output 
  1611. file  names, the output format (must be 1,4,8, or 16  bits),  and 
  1612. the  input and output numerical ranges for scaling.  The  default 
  1613. scaling values are appropriate for the data types being used.
  1614.  
  1615.      For  example, to convert MONTAGE.IMG to an 8-bit  per  pixel 
  1616. image and scale the output pixels evenly between the values of  0 
  1617. and 127 the following commands would be used:
  1618.  
  1619.      CONVERT 
  1620.      Input Image: MONTAGE.IMG
  1621.      Lines : 350       Samples : 640 Bits per pixel : 4 
  1622.      Output Image: MONTBIG.IMG
  1623.      Output bits per pixel (1, 4, 8, 16) : 8 
  1624.      Input DN range (O 15) :
  1625.      Output DN range (O 255) : 0 127
  1626.  
  1627. 4.6.3 CLEANUP
  1628.  
  1629.      The  CLEANUP and CLEANUP2 programs are available  separately 
  1630. with  a  user's guide, executables and required data  files.  The 
  1631. purpose  of these programs is to clean up "noisy" Voyager  images 
  1632. by  removing the dark current. The dark current image  represents 
  1633. the ambient noise in the camera system; therefore, removing  this 
  1634. noise "cleans up" the original image, making it appear crisper on 
  1635. the monitor.
  1636.  
  1637.  
  1638.                            Chapter 5
  1639.  
  1640.  
  1641.                         COMMAND SUMMARY
  1642.  
  1643.  
  1644.      Within this command summary listing, brackets ([])  indicate 
  1645. optional  parameters or keywords. Filename is the name of a  file 
  1646. in the current directory or a fully qualified filename which  can 
  1647. include  drive  letter and pathname. Directory name is  an  MSDOS 
  1648. directory   path   specification,  a  valid  directory   mask   a 
  1649. specification  containing wild card characters (*, ?)  per  MSDOS 
  1650. rules  for wildcard use in the DIRECTORY command. The symbol  "n" 
  1651. is used to indicate an integer value.
  1652.  
  1653.     driveletter:
  1654.     BATCH        [filenamel
  1655.     BROWSE       [directory mask] [SIZ n] [SUB n] [NOLabel]
  1656.     CD           [directory name]  [..]
  1657.     CURSOR
  1658.     DIRECTORY    [directory mask]  [/w]
  1659.     DISPLAY      [SUB n] [SL n] [SS n]  [NL n] [NS n]  [BP n] 
  1660.                  [CENT] [DSL n] [DSS n]
  1661.     ERASE
  1662.     EXIT
  1663.     FILE         [filename] ["CD:mm:ss:bb"]
  1664.     HELP         [command name]
  1665.     HISTOGRAM    [SUB n] [SL n] [SS n] [NL n] [NS n] [BP n] [CENT]
  1666.     LABEL
  1667.     MENU         [filename]
  1668.     OVERLAY      [MAXLAT n] [MAXLON n] [MINLAT n] [MINLON n] [LEGend]
  1669.     PALETTE      [EDIT n] [PS n]  [LOAD filename] [SAVE filename]
  1670.     PROFILE
  1671.     QUIT
  1672.     REFRESH
  1673.     SAVE         filename [SL n] [SS n] [NL n] [NS n] [BP n]
  1674.     SET          [DNLO n] [DNHI n] [BROwse filename]
  1675.     STRETCH      [LO n] [HI n]
  1676.     SYSTEM       [MSDOS command]
  1677.     TEXT         [LINe n] [SAMple n] "text" or 'text'
  1678.     TYPE         filename
  1679.