KPG1_BADBX

Obtains an NDF section containing all good data in the supplied NDF

Description:

This routine finds the pixel bounding box that encloses all good data values in the DATA array of supplied NDF. It then either creates and returns an NDF section corresponding to this bounding box, or sets the pixel bounds of the supplied NDF to match the bounding box.

Invocation

CALL KPG1_BADBX( INDF1, OPER, INDF2, NGOOD, STATUS )

Arguments

INDF1 = INTEGER (Given)
The input NDF identifier. Note, if OPER is 1 or 2 then any mapped access to the NDF will be unmapped on exit. In addition, if OPER is 2 then any mapped access to NDFs that are located within an extension of the supplied NDF will be unmapped on exit. Also, for OPER 1 and 2, " UPDATE" access is required to the NDF, and (for OPER 2) any extension NDFs.
OPER = INTEGER (Given)
Indicates how the box should be used.

1 - the bounds of the supplied NDF will be modified to match the bounding box enclosing the good data.

2 - the bounds of the supplied NDF will be modified to match the bounding box enclosing the good data. In addition, any NDFs found within the MORE component of the supplied NDF, which have bounds equal to those of the supplied NDF, are changed to match the bounds of the bounding box.

If any other value is supplied for OPER, INDF2 will be returned holding an NDF identifier for a section of the supplied NDF matching the bounding box.

INDF2 = INTEGER (Returned)
An identifier for the smallest NDF section that contains all good DATA values in the the input NDF. Returned equal to NDF__NOID if OPER is 1, or if an error occurs.
NGOOD = INTEGER (Returned)
The number of good DATA values in the supplied NDF. Returned equal to zero if an error occurs.
STATUS = INTEGER (Given and Returned)
The global status.