KPG1_GETIM

Gets locators to an IMAGE-type structure and structure holding the data array for data input

Description:

Returns a locator to an IMAGE-type data-structure associated with a supplied parameter name, if a valid locator is not supplied. The DATA_ARRAY component is examined to determine whether it is primitive or a structure. Given the former, the second locator returned is the same as that to the IMAGE structure; on the other hand, DATA_ARRAY is tested for being a simple ARRAY, if it is not an error status is set, if it is the second locator returned points to the DATA_ARRAY structure. The simple ARRAY structure is searched for origin and bad-pixel information. Should the origin be not at 0 for each dimension, and/or the bad-pixel flag be set to false, warning messages are made.

It will not handle other NDF variants save report an error.

Invocation

CALL KPG1_GETIM( PARNAM, LOCAT, DATLOC, DNAME, ORIGIN, STATUS )

Arguments

PARNAM = CHARACTER ∗ ( ∗ ) (Given)
Parameter name associated with the input IMAGE-type structure. If this is blank, the supplied locator, LOCAT, will be assumed to be the locator to the top-level of an NDF (IMAGE-type) structure.
LOCAT = CHARACTER ∗ ( DAT__SZLOC ) (Given & Returned)
On input when PARNAM is blank, there will be no association with a parameter; the locator is assumed to point at the top level of an NDF, and will be unchanged on exit.

If PARNAM is non blank, the input value of LOCAT is ignored. On exit LOCAT is the locator to the object associated with the given parameter name, unless status is bad, whereupon this locator is annulled.

DATLOC = CHARACTER ∗ ( DAT__SZLOC ) (Returned)
The locator to the structure containing the primitive form of the data array. If it is the top-level of the NDF (IMAGE) structure, it will be a clone of LOCAT. Either way it will require annulment. If status is bad on exit this locator is annulled.
DNAME = CHARACTER ∗ ( DAT__SZNAM ) (Returned)
The name of the data array as this will be needed for access, and it is different depending on its location.
ORIGIN( DAT__MXDIM ) = INTEGER (Returned)
The origin of the data array for each dimension. It is set to 1 for non-existent dimensions. This argument returned so that if an output NDF is being created is will not be invalidated because of different origins in its ARRAY-type components.
STATUS = INTEGER (Given and Returned)
The global status.

Notes: