User's Guide

BANDARRAY

Concatenate a sequence of image bands into a one-band image

Function:

BANDARRAY creates a one-band image representing a rectangular array of successive bands of a multiband image. This facilitates display and hard-copy output of a sequence of bands representing, for example, model outputs at succesive times.

Parameters:

IN
Name of input image. Successive bands of this image will be mosaicked together to form the output image.

OUT
Name of output image. This image will contain a mosaic of all bands (or a band subset specified by IBAND and LBAND) of the input image.

NROW
Number of rows of input bands. The output image will contain an array of consecutive bands from the input image NCOL bands wide by NROW bands high.

NCOL
Number of columns of input bands. The output image will contain an array of consecutive bands from the input image NCOL bands wide by NROW bands high.

IBAND(1)
Initial image band to be included in concatenated output.

LBAND(0)
Last image band to be included in concatenated output. The default value of 0 indicates that successive bands should be used until either NROW * NCOL bands have been processed, or the last band in the input image is reached.

BNDYWID(2)
Width of boundary strip around each time slice. Each input band will be surrounded by a strip of fill pixels of this width.

FILL(0)
Value of pixels in boundary strips.

ZOOM(2)
Magnification factor for each output pixel. To facilitate display of individual pixels, each pixel will magnified by replicating it within a ZOOM by ZOOM square.

Examples:

  1. LAS> bandarray in=24hr_data out=24hr_merge nrow=4 ncol=6

    An image named "24HR_DATA" contains 24 bands, each corresponding to the output for one hour from a 24-hour model run. The 24 model outputs will be combined into a one-band image containing a 4 row by 6 column rectangular array of model outputs. All 24 input bands are used, with each one surrounded by a boundary of the default width and fill value, and the resulting image is "zoomed" (using ZOOM-EXPAND) by the default factor.

  2. LAS> bandarray in=24hr_data out=daytime_merge nrow=3 ncol=4 iband=7 lband=18 bndywid=4 fill=255 zoom=4

    Bands 7 through 18 of the same image as for example 1 are combined into a 3 row by 4 column array, with the data for each band surrounded by a 4-pixel-wide boundary strip all of whose values are set to 255. The resulting image is magnified by a factor of 4 in each direction.

Description/Algorithm:

To simplify setting up parmaeters to program CONCAT, which is used to perform the actual concatenation of bands, a set of intermediate images are created, each containing data for one horizontal row of input bands. These intermediate files are then concatenated into the final output.

According, BANDARRAY begins by getting the number of bands and size of each band of the input image, and uses these values to compute the dimensions of the intermediate images and to validate the input arguments which specify the geometry of the final image and the input bands to be used.

For each intermediate image, the input bands to be included in that image are determined and the position of each band in the image is computed. CONCAT is then used to create the intermediate image. BANDARRAY then determines the location of each intermediate image relative to the final concatenated image, and then calls CONCAT once more to complete the concatenation.

If magnification was requested (ZOOM > 1), the concatenated image is then expanded using ZOOM-EXPAND. Finally, all temporary files are deleted.

Nonfatal Error Messages:

    None.

Fatal Error Messages:

  1. [bandarray-badlband] "LBAND (ddd) exceeds bands in image (ddd)"

    The specified value of argument LBAND is greater than the number of bands in the input image. Rerun BANDARRAY with a corrected value.

  2. [bandarray-badiband] "IBAND greater than LBAND or total bands in image"

    The value specified by argument IBAND is greater than the value specified for LBAND or, if LBAND was not specified explicitly, than the number of bands in the input image. Rerun BANDARRAY with corrected values of IBAND and/or LBAND.

  3. [bandarray-badnrow] "Only ddd rows obtainable from ddd input bands"

    The number of input bands specified by arguments IBAND, LBAND, and/or the total number of bands in the input image is not sufficient to generate the number of rows specified by NROW with NCOL bands per row. Rerun BANDARRAY with corrected arguments.

User Notes:

    None.