c_upddr - Updates the output DDR fields based on the input DDRs

SYNTAX

#include "las.h"

FUNCTION c_upddr (parblk,host_in,host_out,nmrimg,window,bands, nbands, line_inc,samp_inc,out_nbands,cflag)

     struct              PARBLK *parblk;
     char                host_in[][CMLEN];
     char               *host_out;
     long               *nmrimg;
     long                window[][4];
     long                bands[][MAXBND +1];
     long                nbands[];
     double             *line_inc;
     double             *samp_inc;
     long               *out_nbands;
     long               *cflag;

PARAMETERS

parblk (input, PARBLK)

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

host_in (input, character, length(imglimit)(CMLEN))

Image host filename(s) from which the DDR values are to be retrieved and used to calculate the output DDR values.

host_out (input, character, length(CMLEN))

Output image host filename for which the DDR values are calculated and written to.

nmrimg (input, integer)

Total number of input image(s).

window (input, integer, length(imglimit)(4))

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

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

Two-dimensional array containing the band numbers of each of the input images. The first dimension is imglimit and the second is MAXBAND + 1.

nbands (input, integer, length(imglimit))

Number of bands specified for each input image.

line_inc (input, double)

Number of pixels of the input image(s) that one output pixel will represent in the line direction. A positive fractional value greater than 0 and less than 1 specifies that the input image(s) have been expanded. A positive integer value greater than 1 specifies that the input image(s) have been subsampled. If no replication or subsampling of pixels was completed enter a value of 1.

samp_inc (input, double)

Number of pixels of the input image(s) that one output pixel will represent in the sample direction. A positive fractional value greater than 0 and less than 1 specifies that the input image(s) have been expanded. A positive integer value greater than 1 specifies that the input image(s) have been subsampled. If no replication or subsampling of pixels was completed enter a value of 1.

out_nbands (input, integer)

Total number of bands the output image will contain.

cflag (input, integer)

Flag indicating whether the input images will be combined into one band of the output image. This value should be set to COMB for functions like CONCAT, MATH where the number of output bands is not the same as the number of input bands. Valid values are:

          COMB   (1) > images will be combined 
          NOCOMB (0) > images will not be combined

DESCRIPTION

The c_upddr() call reads nmrimg DDR files associated with the image host filenames specified in host_in. Based upon the values of window, bands, nbands, line_inc, samp_inc, out_nbands, cflag, and the values contained in the input DDR, the DDR associated with host_out will contain values that are copied from the input DDRs, recalculated from the input DDRs, or invalidated. See DDR Implementation Guidelines section for more details.

RETURN VALUE

c_upddr() returns

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

SPECIAL CONSIDERATIONS

This function call must be placed after the call to c_eopens()/c_eopenr() and before the call to c_svmnmx().