The Kappa package contains a set of four typical IRQ applications, which give an indication of the benefits which IRQ can provide for the user. The A-TASK documentation for these four applications is included in SUN/95, and they are briefly described in this section.
SETQUAL creates quality name definitions and stores them within a specified extension of an NDF. It
also assigns a specified quality to a sub-set of the pixels with the NDF. In its simplest mode, the user
provides an NDF, and a string to use as a quality name (such as SATURATED
). If this quality name is not
already defined within the NDF, then it is added to the list of defined quality names, together with a
user-supplied comment describing the quality. The user also provides another NDF to be used as a
‘mask’. The ‘bad’ pixels within the mask NDF define the pixels which are to be assigned the
given quality. For instance, a user may have an image containing saturated pixels. If he
wants these pixels flagged without being permanently destroyed, he could proceed as
follows.
SATURATED
, and
specifying the mask created in the previous step. This leaves the DATA component of
the original NDF unchanged, but assigns the quality SATURATED
to all the pixels which
correspond to ‘bad’ pixels in the mask.
Alternatively, instead of using a mask, the pixels to which the quality is assigned may be specified by an explicit list of pixel indices stored in a text file.
The REMQUAL application removes quality name definitions from an NDF. This may be necessary if there is no room for any more quality name definitions within an NDF. In this case the user may choose to remove some unimportant quality name definitions to make room for new, more-important quality names. REMQUAL can also remove all quality names information from an NDF. This can be useful if for any reason the quality-name information becomes corrupted.
The SHOWQUAL application displays all currently defined quality names within an NDF, together with the associated descriptive comments. Optionally, the number of pixels that hold each quality can be displayed.
The QUALTOBAD application sets selected pixels within an NDF to the ‘bad’ value on the basis of the
pixel’s quality. In effect, QUALTOBAD performs the reverse operation of SETQUAL For instance,
using the example of saturated data described above, the user may remove some varying
background surface from his original data, and then want to set pixels which were saturated in
the original data to the ‘bad’ value . In this case he would run QUALTOBAD specifying
the background removed NDF as input, and specifying a quality expression of SATURATED
.
This would cause all pixels which hold the quality SATURATED
to be set bad in the output
NDF.
The ‘quality expression’ can be more complex than a single quality name. In fact, a quality expression
can consist of several quality names combined together using the usual operators of Boolean algebra.
For instance, if the quality expression SATURATED.AND..NOT.(SOURCE_A .OR. SOURCE_B)
was given to
QUALTOBAD, then pixels would be set ‘bad’ only if they had the quality SATURATED
, but did not have
either of the qualities SOURCE_A
or SOURCE_B
.