Help for POLYSCRB
PURPOSE:
Program "polyscrb" takes the data from a standard IBIS graphics-1 vector
input file and produces from it an output image file of polygon borders
(line segments) that are scribed (drawn) against a uniform
background. The input file consists of the coordinates of points in
the output image that are to be connected with line segments. The output
image that is produced forms a raster base containing polygon outlines.
Program options allow the user to specify both the data number values for the
polygon borders and the background areas. "polyscrb" is used in conjunction
with programs "polyreg" and "polygeom" to produce a scribed image for input to
program "paint".
EXECUTION:
The input file consists of the coordinates of sequences of points in
the output image space. Each sequence of points is to be connected
with line segments in sequential order. The coordinates of points
are given in floating point (REAL*4) form with the line location first,
followed by the pixel location in the line. The program rounds
the coordinate locations to the nearest pixel in the output image space.
The records in the input file consist of an integral number of coordinate
pairs, or in other words, an integral number of points. Sequences of points
are packed into the records end to end and may cross record boundaries.
The end of a sequence of points can either be marked by a null point or the
end of the input file, or can be implied by means of a polygon closure option.
By default a null point is a point with the coordinates (0.0,0.0). A null
point can be defined otherwise, though, by means of the IGNOR option. When
a polygon closure option (EXCLOSE or APCLOSE) is used, the program saves the
coordinates of the first point in a sequence and checks if this point
occurs again exactly (EXCLOSE) or approximately (APCLOSE). If this point
does occur again, (a closed polygon has been found, and) the sequence
ends with the second occurrence of the point. When a polygon closure option
is used, the program interprets either a closed polygon or a null point as
an end of sequence.
In "polyscrb", the size field does not refer to the input file, but instead
determines a window (in the output image space) which will be written
out to the output file. The program finds the line segments or portions
of line segments that lie within the window and assigns to the pixels along
these segments the data number value for line segments (polygon borders).
All pixels in the window area that are not part of a line segment are
assigned the data number for background areas.
The output image may either be byte or halfword data. The output
file must be allocated with AL or a similar program before
running "polyscrb".
TAE COMMAND LINE FORMAT
The following command line formats show the major allowable forms:
polyscrb INP=a OUT=b SIZE=(sl,ss,nl,ns) optional parameters
polyscrb INP=a OUT=b SL=sl SS=ss NL=nl NS=ns optional parameters
polyscrb a b (sl,ss,nl,ns) optional parameters
Here 'a' represents the input file name,
'b' represents the output image file name.
EXAMPLES
1. polyscrb INP=OLINES OUT=SCRIB SIZE=(600,600,100,360) 'EXCLOSE
In this example a byte-data image is produced for the window which
starts at line 600, pixel 600 and which is 100 lines long and 360
pixels wide. The program will check for polygons which close
exactly in determining the end of sequences of points in the
input file.
2. polyscrb INP=OLINES OUT=SCRIBH SIZE=(600,600,100,360) 'EXCLOSE 'HALF
In this example a halfword-data image is produced for the same window
which was used in example 1.
3. polyscrb IN.GRA OUT.IMG DIM=3
In this example IN.GRA is a 3-dimensional file; the output line
segments will have the dn values specified by the z-value of the
initial point. All other actions are the same.
4. polyscrb IN.GRA OUT.IMG DIM=3 DN = 255
Specifying the DN value in the case of a 3-dimensional input will
override the z-value in the graphics file; all polygons will have
the specified DN value.
RESTRICTIONS
1. The output image can be byte or halfword data.
2. Maximum number of samples is 500,000 per line. The TAE/VICAR executive
may impose further size limitations.
OPERATION:
Because the size of output images can be larger than the size of the
program's work buffer, "polyscrb" builds the output image in strips.
Each strip contains as many (of the remaining) lines of the window area
as will fit in the work buffer. For each strip, "polyscrb" processes each
line segment one at a time. When a line segment intersects the strip,
the slope of the segment is used in determining exactly which pixels to
use in scribing the line.
WRITTEN BY: A. L. Zobrist 1 Dec 1975
COGNIZANT PROGRAMMER: Niles Ritter 2 Jun 1988
REVISION: 1 22 Sep 1978
AMS (CRI) Made portable for UNIX 2 Jan 1995
PARAMETERS:
INP
Input file name
OUT
Output file name
SIZE
Standard Vicar size field:
(SL,SS,NL,NS)
You can enter SL,SS,NL,
and NS together as SIZE, OR
enter the SL,SS,NL, and NS
parameters separately.
SL
Starting line number
SS
Starting sample number
NL
Number of lines
NS
Number of samples
DIM
2 or 3 dim file?
HALF
Enter HALF=HALF (or abbreviate)
for halfword output.
DN
Data number for polygon borders
BDN
Data number for background areas
PDN
Data number for polygon corners
(endpoints of line segments)
EXCLOSE
Enter to check for
polygons which close exactly
when determining the end of
sequences of points in the
input file.
APCLOSE
Distances in checking for
polygons which close
approximately.
OUTSIDE
Enter to expand the polygon
border by one pixel around
the outside of the polygon.
NOPRINT
Suppresses program messages
IGNOR
Defines coordinates of a
null point.
See Examples:
Cognizant Programmer: