c_getin - Parses an input image specification

SYNTAX

#include "las.h"

FUNCTION c_getin (block, param, element, tnames, hnames, nmrimg, window, bands, nbands, totbnd, imglimit, same_window, qflag)

     struct PARBLK      *block;
     char               *param;
     long               *element;
     char                tnames[][CMLEN];
     char                hnames[][CMLEN];
     long               *nmrimg;
     long              (*window)[WINDOW];
     long              (*bands)[MAXBND+1];
     long               *nbands;
     long               *totbnd;
     long               *imglimit;
     long               *same_window;
     long              (*qflag)[2];

PARAMETERS

block (input, PARBLK)

TAE parameter block passed by reference. It is assumed that TAE has been initialized prior to calling c_getin().

param (input, character, length(*))

Defines the parameter name in the proc which contains the input image(s) specification. In most cases the value of this parameter is IN.

element (input, long)

Defines which element of the input parameter array specified by param is needed. This value will be 0 (zero) in 'C' or 1 (one) in FORTRAN for input parameters that contain only a single element.

tnames (output, character, length (imglimit)(CMLEN))

Array of character strings dimensioned to be the same size as parameter imglimit contains the TAE names of the images specified in parameter param.

hnames (output, character, length (imglimit)(CMLEN))

Array of character strings dimensioned to be the same size as parameter imglimit contains the host names of the images specified in parameter param.

nmrimg (output, integer)

Number of images defined in the image specification.

window (output, integer, length(imglimit)(WINDOW)

Two-dimensional array containing the window specification for each image specified. The first dimension is imglimit and the second is 4. The four elements of the window are SL, SS, NL, NS.

bands (output, integer, length (imglimit)(MAXBND+1))

Two-dimensional array containing the band numbers selected for each image specified. The first dimension is imglimit and the second is MAXBND+1. One is added to maxbnd in order to allow for the zero terminator which is needed by c_eopens().

nbands (output, integer, length (imglimit))

Number of bands specified for each input image. This array is useful when calling the function c_eopens() or c_eopenr() to open the input images.

totbnd (output, integer)

Total number of bands to be processed. This value is useful for the processing message utility c_inittm().

imglimit (input, integer)

Maximum number of images the calling routine can handle when c_getin() is called.

same_window (output, integer)

Signals whether or not multiple images have the same window size. A value of 0 (zero) means that the images do not all have the same window size while a value of 1 (one) indicates that all windows are of the same size.

qflag (output, integer, length(imglimit)(2))

Two-dimensional array which will contain flags for each image indicating whether the user specified a window or band option or if window and band options were allowed to default to the full image. A 1 (one) in the first element indicates that the user specified a window option and a 1 in the second element indicates that the user specified a band option. A 0 (zero) in either element indicates the default option has been supplied. The first dimension is imglimit second dimension is 2.

DESCRIPTION

The c_getin() routine is used to parse an input image specification.

NOTE: No error message is printed if the user specifies multiple images with different window sizes. Although most programs will typically consider this an error, there may be some modules which will want to allow multiple images to be specified with different windows. Thus, it is up to the individual program to decide whether images with different window sizes are valid or not. If not, the program will need to do its own error handling.

RETURN VALUE

c_getin() returns

     E_SUCC (0)  --> successful completion
     E_FAIL (-1) --> operation failed

The routine may output other informational error messages.

SPECIAL CONSIDERATIONS

To access this routine, you will also need to link to:

     $LASLIB/geolib.a --> unix object library