Help for LOOKUP
PURPOSE:
LOOKUP 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), by
entering the contents of the table as program parameters, or by naming an
IDX pseudocolor transformation. The user has the option of modifying the
table via the CHANGE and LTABLE parameters. The modified table may then be
saved by specifying the SAVE or TBLSAVE parameter.
EXECUTION:
In the table format used by LOOKUP, a lookup table is made up of four
independent 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. The lookup
table is limited to four channels because LOOKUP allows at most
four output images. LOOKUP allows at most four input images.
In the most straightforward use of LOOKUP, 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 USE 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, LOOKUP requires that
the file have a particular format. The file must contain a VICAR label
followed by one or more tables, each table being stored as one 1024-byte
record. A table record contains 1024 output data number values in the
following order:
d(0,1), d(0,2), d(0,3), d(0,4),... d(255,1), d(255,2), d(255,3), d(255,4),
where d(i,j) is the output data number to which the data number i is mapped
by channel j. The user specifies the location of the table by giving the
name of the file and the number (ordinal) of the table within the file.
In general, such a file is built using another VICAR program or using
LOOKUP itself.
TAE COMMAND LINE FORMAT
The following command line formats show the major allowable forms:
LOOKUP INP=(a...) OUT=(b...) SIZE=(sl,ss,nl,ns) optional parameters
LOOKUP INP=(a...) OUT=(b...) SL=sl SS=ss NL=nl NS=ns optional parameters
LOOKUP (a...) (b...) (sl,ss,nl,ns) optional parameters
LOOKUP (a...) (b...) optional parameters
Here (a...) represents a list of one to five file names which includes
from one to four input image file names optionally followed by the
name of a file containing the lookup table to be used by this program.
(b...) represents a list of one to four output image file names
optionally followed by an output lookup table file.
LOOKUP also accepts command lines without the INP or OUT fields.
This allows the user to use LOOKUP just for working with tables.
EXAMPLES
1. LOOKUP INP=(L1 T1) OUT=L2 'LIST TABNO=2 USE=3
In this example, channel 3 of table 2 of file T1 is used to map
image file L1 to image file L2.
2. LOOKUP IN (RED,GREEN,BLUE) PS=3
In this example, the IDX pseudocolor transformation PS 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.
3. LOOKUP INP=(L1) OUT=(L3,L4,L5,T2) 'NEWTBLF LTABLE=( 0 0 1 2 1 -98 2 3 4 99 -255 5 6 7 )
In this example, the three channels of the table defined through the
LTABLE parameter are used to map the input file to the three output
files. T2 is the output table file, in which the table is saved.
RESTRICTIONS
1. The input and output images and the table file must be byte data.
2. Maximum number of samples is 20000 per line.
WRITTEN BY: Steven Pohorsky 2 Aug 1983
COGNIZANT PROGRAMMER: Steven Pohorsky
REVISION: 3 24 April 1986
PARAMETERS:
INP
Input file name(s);
includes input images
optionally followed by
table file.
OUT
Output file name(s)
SIZE
Standard Vicar size field:
(SL,SS,NL,NS)
SL
Starting line number
SS
Starting sample number
NL
Number of lines
NS
Number of samples
LIST
Enter to get the lookup
table listed to your terminal.
TABNO
Number (ordinal) of the lookup
table if the table is in a file.
This parameter is required
if the table is in a file.
PS
Number of the IDX pseudocolor
table, if the table is a
standard IDX pseudocolor.
Valid: 1-11.
NEWTBLF
Enter to have the
lookup table saved if the
table file is new.
SAVE
Enter to have the
lookup table saved in the next
available location in an
existing table file.
TBLSAVE
To have the lookup table saved
in an exactly specified
location in an existing table
file, enter the table number
(location).
USE
Specifies which channel of the
table corresponds to which
output image. The nth value
entered is the channel for
the nth output image.
CHANGE
One or more of the following
type of changes can be entered
using the following format:
CHANGE=(n1,m1 n2,m2 ...)
The table entries for data
number ni are, for each channel,
replaced with the table entries
for data number mi, for
i=1,2,...
NCHAN
The number of channels for which
data is entered under the LTABLE
parameter. The default for
NCHAN is the number of output
images.
LTABLE
Specifies values for the lookup
table. If a table from a file
is not used, then the table
must be defined through LTABLE
values.
See Examples:
Cognizant Programmer: