Help for QSAR
PURPOSE:
Program QSAR is used to add or subtract values from the data numbers in
rectangular sections of an image. For each rectangle, the user specifies
the size and position of the rectangle and the (positive or negative) value
to be added to the data numbers of points in that rectangle. QSAR performs
the addition and writes the resulting image to an output file. QSAR is
primarily used to correct flaws in images or, in conjunction with program GEN,
to generate test images.
EXECUTION:
The input image may either be byte or halfword data. The position of the
rectangles are specified relative to the full input image.
The maximum number of rectangles that can be specified for QSAR is limited
by the TAE executive. As of this writing the limit is 60 rectangles.
If no rectangles are specified, QSAR copies the image without making any
changes. For each rectangle specified, the program adds the specified
value to the data numbers of the points of that rectangle. The resulting
data numbers are then checked for being valid for the data type (byte or
halfword) of the image and are adjusted if invalid. For byte data,
data numbers less than 0 are set to 0, and data numbers greater than 255
are set to 255. For halfword data, data numbers less than -32768 are set to
-32768, and data numbers greater than 32767 are set to 32767. Rectangles
are allowed to overlap. For points in more than one rectangle, the additions
are performed in the order they are entered by the user, and adjustments
required for validity are applied after each addition.
The output image has the same data format (byte or halfword) as the input
image.
TAE COMMAND LINE FORMAT
The following command line formats show the major allowable forms:
QSAR INP=a OUT=b SIZE=(sl,ss,nl,ns) optional parameters
QSAR INP=a OUT=b SL=sl SS=ss NL=nl NS=ns optional parameters
QSAR a b (sl,ss,nl,ns) optional parameters
QSAR a b optional parameters
Here 'a' represents the input image file name, and
'b' represents the output image file name.
EXAMPLES
1. GEN A NL=250 NS=250 IVAL=0 LINC=0 SINC=0
QSAR INP=A OUT=B AREA=( 1 1 250 50 50 1 51 250 50 100 1 101 250 50 150 1 151 250 50 200 1 201 250 50 250 )
In this example the output file B is a 250x250 byte image
consisting of five vertical strips of different shades of gray.
2. GEN QSARE NL=10 NS=10 'HALF
QSAR INP=QSARE OUT=QSAREO SIZE=(2,3,8,7) FORMAT=HALF AREA=(4,6,3,1,100)
In this example the output file QSAREO is a halfword image that has
eight lines with seven pixels per line. Data numbers for a three line
by 1 pixel rectangle are incremented by 100.
RESTRICTIONS
1. The input and output images must be byte or halfword data.
2. The maximum number of pixels per line is 64000.
3. The maximum number of rectangles that can be specified is 60, as of this
writing.
WRITTEN BY: Steve Pohorsky 24 Oct 1983
COGNIZANT PROGRAMMER: Joel Mosher 29 May 1980
REVISION: 1 29 May 1980
PARAMETERS:
INP
Input file name
OUT
Output file name
SIZE
Standard Vicar size field:
Same as - (SL,SS,NL,NS)
By default, the entire input
image is used if these
parameters are not entered.
SL
Starting line number
SS
Starting sample number
NL
Number of lines
NS
Number of samples
AREA
Specifies the rectangles and the
values to be added to data
numbers.
See Examples:
Cognizant Programmer: