If a zero or negative value is supplied for REGVAL, then the array of pixel values supplied to ARD_WORK in argument MASK is examined and the maximum value found. This value is incremented by one and used to represent the first keyword in the ARD description (if the incremented value is less than 2, then 2 is used instead). Successive values are assigned to the remaining keywords.
There is one exception to these rules; pixels selected using an INPUT keyword
(see section
) are assigned the values of the corresponding pixels
in the input mask supplied to ARD_WORK, irrespective of the position of the
INPUT keyword in the ARD description. The inclusion of INPUT keywords within an
ARD description does not effect the integer values used to represent other
keywords. Thus if REGVAL is supplied equal to 2 and the ARD description is:
CIRCLE( 0, 0, 10 ) .AND. ( INPUT .OR. CIRCLE( 0, 10, 10 ) )
then the CIRCLE(0,0,10) region is assigned the value 2 and the CIRCLE(0,10,10) region is assigned the value 3 (i.e. the INPUT keyword is not included in the count of keywords).
On return from ARD_WORK the REGVAL argument will hold a value one larger than the value assigned to the last keyword in the ARD description.
ARD A Textual Language for Describing Regions within a Data Array