Help for VLOOKUP

 PURPOSE:

 VLOOKUP generates output images from input images using data number
 mappings defined in a multi-channel lookup table.  The user can specify 
 the table by giving its location (if it is contained in a file) or by
 naming a standard pseudocolor transformation. 

 This program performs the same function as an older program, LOOKUP; 
 the difference is that VLOOKUP uses IBIS format table files, as does
 VIDS, whereas LOOKUP uses the special format files created by IDX. 
 Because the IBIS files can be edited and viewed by other programs,
 the CHANGE and LIST functions of LOOKUP are not present in VLOOKUP.
 THE PROGRAM TEMPORARILY (UNTIL VIDS IS FIXED TO GENERATE IBIS2 FORMAT
 TABLE FILES) CANNOT HANDLE LOOKUP TABLE FILES UNLESS THEY ARE GENERATED ON
 THE VAX.
 THE PROGRAM HAS BEEN FIXED SO THAT THE TABLE PARAMETER FUNCTIONS CORRECTLY.

 EXECUTION:

 In the table format used by VLOOKUP and VIDS, a lookup table is made up
 of several independent channels, each of which is a "column" in the IBIS
 tabular format.  Most tables created by VIDS will have one (monochrome) or
 three (color or pseudocolor) channels.  Each channel defines a mapping or
 discrete transfer function to be applied to an input image. Some of these
 channels may be undefined depending on the application. 

 VLOOKUP also supports multi-band images in both input or output.  However,
 multi-band and single-band images may not be mixed, and only a single
 multi-band image (each) may be specified for input and output.  I.e., the
 user may supply 5 input images either as 5 separate files, or as one file
 with 5 bands -- NOT as one file with 3 bands and two files with one band
 (or one with 3 bands and one with 2.)

 The current limit on input and output images (or bands) is five.  This
 can easily be changed by revising one PARAMETER in the program and
 recompiling.

 All input images must have the same size.  All output images will have
 the size specified for the SIZE field, or if defaulted, will have the same
 size as the first input image.

 In the most straightforward use of VLOOKUP, the number of input images
 is equal to the number of output images and the default channel
 assignments are used.  In this case, the first channel in the table
 is used to map the first input image to the first output image, the
 second channel in the table is used to map the second input image to 
 the second output image, and so on.

 The user may select to use different channels (than the default) with
 the images by using the COLUMN parameter.  The user may also specify
 fewer input images than output images.  In this case, the last input
 image is mapped through the remaining channels to create the appropriate
 number of output images.  Thus, one input image could be mapped through
 three independent channels (transfer functions) to three output images.
 This feature allows simple production of Pseudo Color pictures.

 When the user specifies a lookup table in a file, VLOOKUP requires that
 the file be in the VIDS lookup table format, which is an IBIS tabular file
 made up of a number of columns with 256 entries per column, stored in REAL*4
 format.  See the VIDS documentation for details on the file format.
 TAE COMMAND LINE FORMAT

 The following command line shows the normal format:

 VLOOKUP INP=(a...) OUT=(b...) LUTFILE=c  [optional parameters]

  Here (a...) represents a list of one to five input image file names,
  (b...) is optional and represents a list of one to five output image
  file names, and c is an optional lookup table file (if omitted, then TABLE
  must be specified). 

EXAMPLES

1.    VLOOKUP INP=L1 OUT=L2 LUTFILE=T1 COLUMN=3

      In this example, channel 3 of file T1 is used to map
      image file L1 to image file L2.  

2.    VLOOKUP IN (RED,GREEN,BLUE) TABLE=3

      In this example, the standard pseudocolor transformation table 3 is
      used to map image file IN to files RED, GREEN, and BLUE.  (The color
      assignments must be in this order to get results corresponding to what
      is seen in IDX.)

 RESTRICTIONS
 1. The input and output images MUST BE BYTE data.
 2. Maximum number of samples is 1000000 per line.

 HISTORY:

  Aug.1989 --RGD-- original VLOOKUP, based on program LOOKUP
  Oct.1990 --LWK-- cleaned up the program, eliminating all paramters
		   except USE (renamed COLUMN) and PS (renamed TABLE);
		   also enabled multispectral file input.
  Feb.1993 --SP--- Made portable for UNIX.  Changed max samples to 80000.
                   The program has been fixed so that the TABLE parameter 
                   functions correctly.  Added message for case of a multiband
                   input and multiple outputs: "Bands beyond the first one are
                   ignored."  Used IBIS2 calls to access LUTFILE.

  Jan.2002 --FS_DLR--- Changed max samples to 1000000.

 COGNIZANT PROGRAMMER:  Steven Pohorsky


PARAMETERS:


INP

Input image file names

OUT

Output image file names

SIZE

Standard Vicar size field

SL

Starting line number

SS

Starting sample number

NL

Number of lines

NS

Number of samples

SB

Starting band

NB

Number of bands

LUTFILE


TABLE

Number of the pseudocolor table in lieu of LUTFILE

COLUMN

Nth value is the column for the nth output image.

See Examples:


Cognizant Programmer: