Help for ZCIRCLE
PURPOSE:
"zcircle" is a VICAR2 applications program which removes
data in a circular or elliptical pattern from an image.
Data may be removed either inside or outside of the
specified pattern, and is either replaced with lowest
DN value (i.e., 0 for BYTE data, -32678 for HALF,
-214748638 for FULL and -1.7E38 for FULL data) or,
optionally, with a specified DN value.
OPERATION:
"zcircle" reads the input dataset line by line, modifying
each if necessary, and writes each line directly to the
output. The circle or ellipse defined by the parameters
may intercept any given line at most 2 times. If the
default mode of removing data outside the curve is in
effect, all data outside of these 2 points is replaced
with the desired DN value. If the IN (for inside) option
is used, all data between the two points is replaced.
The actual curve is replaced in both modes. If an ellipse
is desired, it is possible to generate the axis lengths
by various combinations of two parameters:
1) Known average radius and eccentricity, specify R and
ECC. If polar radius is larger that equatorial radius,
make ECC negative.
2) Known semimajor and semiminor axis lengths, specify
RPOL and REQ as desired. ECC will be calculated from
these two given values.
3) Known eccentricity and one axis length, specify ECC and
RPOL or REQ (as known). If the polar radius is to
be larger than the equatorial, make ECC negative.
The average radius of an ellipse is assumed to be
(NL+NS)/4.
EXECUTION:
EXAMPLES
zcircle A B (1 1 500 500)
--This replaces all pixels with zero which are outside
of a circle centered at line 250.5, sample 250.5, with
radius 250.
zcircle A B (1 1 500 500) 'IN
--This is similar to the above except that all pixels
inside the circle are replaces with zero.
zcircle A B DN=100 XCEN=-10 YCEN=200 R=50 'in
--This replaces all pixels with 100 DN which are iside
the circle centerd (off the picture) at line 200 and
sample -10 with radius 50 pixels.
zcircle A B (1 1 500 500) ECC=0.5
--This replaces all pixels with zero which are outside of
an ellipse centered at (250.5 250.5) and average semi-
axis length of 500. The major axis will be aligned
along the sample direction (horizontal).
zcircle A B (1 1 500 500) ECC=-0.5
--This is similar to the above, except that the major
axis is aligned along the line direction (vertical).
zcircle A B RPOL=25.3 ECC=0.9 ANG=35.7
--This replaces all pixels outside of the ellipse with
zero DN defines by an eccentricity of 0.9 and a polar
axis length of 50.6 pixels (2*RPOL), with the polar
axis pointing to an azimuthal angle of 35.7 degrees
clockwise from up. The major axis length (REQ) is
determined by RPOL and ECC to be 116.1 pixels.
PROGRAM HISTORY:
Made portable for UNIX by A. Scop (CRI) 1-JULY-1994
PARAMETERS:
INP
An input image
OUT
An output image
SIZE
VIACR size field (SL,SS,NL,NS)
SL
Integer, starting line number for output
SN
Integer, starting sample number for output
NL
Integer, number of lines in the output image
NS
Integer, number of samples in the output image
XCEN
Integer, center sample coordinate in pixels
YCEN
Integer, center line coordinate in pixels
R
Real, average radius of a circle or ellipse
RPOL
Real, "polar" radius of an ellipse and overrides the R value
REQ
Real, "equatorial" radius of a ellipse and overrides the R value
ECC
Real, eccentricity of the ellipse and may be -1<ECC<+1
ANG
Real, amizuth angle of rotation of the polar axis and may be -90<ANG<+90
DN
Integer, DN value to replace removed data for BYTE, HALF and FULL format data
RDN
Real, DN value to replace removed data for REAL*4 format data
IN
Keyword, specifies that all the pixels inside the limits of the defined
circle or ellipse are to be removed
See Examples:
Cognizant Programmer: