User's Guide

COPY

Copy and convert an image.

Function:

Copies a LAS image into another LAS image. It allows the input image(s) to be sub-windowed and sub-banded when copied to the output image. By default the output image is the same data type as the input image(s).

Parameters:

IN
Input image. IN may be a single- or multi-band image and may contain BYTE, INTEGER*2, INTEGER*4, or REAL*4 pixel data. Window and/or band options may be specified. The window size of all input images are required to be the same.

If the data type of the output image is to be the same as the input images (i.e., ODTYPE = SAME) and the input images do not have the same data type, the output image is the same data type as the first image specified.

OUT
Output image. The output image is the same size as the input image specification. Output data type is determined by ODTYPE.

ODTYPE(SAME)
Output data type. The data type of the output image.


  = SAME:  Same as input
  = BYTE:  BYTE      (8-bit unsigned integer)
                     (0 through 255)
  = I*2:   INTEGER*2 (16-bit signed integer)
                     (-32768 through 32767)
  = I*4:   INTEGER*4 (32-bit signed integer)
                     (-2147483648 through 2147483647)
  = R*4:   REAL*4    (32-bit signed real)
                     (System dependent)

ROUNDOPT(TRUNC)
Round option. If the input data is REAL*4 and the output data type is INTEGER or BYTE, the input data values are either rounded or truncated when converted. NOTE: Truncation of data is faster than rounding.


  = ROUND:  Round the input data.
  = TRUNC:  Truncate the input data.

COMPFLG(--)
Compression flag. The output image will be compressed if COMPFLG is YES. The output image will not be compressed if COMPFLG is set to NO. If COMPFLG is specified, it will override the unix variable COMPRES. If COMPFLG is not specified, compression will be based on the TAE global $COMPFLG.

Examples:

  1. LAS> copy in=ny.dat out=out.dat odtype=same

    The user has requested to copy image NY.DAT into image OUT.DAT. The image OUT.DAT is the same size and data type as NY.DAT because the window and band options were not specified on the input image and the parameter ODTYPE is set to SAME indicating no data conversion is to take place.

  2. LAS> copy in="image1(:1,3) + image2(100,200,500,512:4)" out=out.dat odtype=i*4

    The user has requested to copy bands 1 and 3 of image IMAGE1 and band 4 of image IMAGE2 to image OUT.DAT. It is assumed that IMAGE1 is a 500 line by 512 sample image; otherwise, an error would result because the window sizes are not the same. Image OUT.DAT is a three-band, 500 line by 512 sample image with data type of 32-bit signed integer.

  3. LAS> copy in="image1(:1,3)" out=out.dat odtype=i*2 roundopt=round

    The user has requested to copy bands 1 and 3 of image IMAGE1 to image OUT.DAT. It is assumed that IMAGE1 is a REAL*4 image since ROUNDOPT has been set. Image OUT.DAT is a two-band image with data type of 16-bit signed integer. The values of IMAGE1 are rounded to the nearest integer as they are being converted to OUT.DAT.

  4. LAS> copy in(1)=ny.dat in(2)=img.dat out=out.dat odtype=same

    The user has requested to copy image NY.DAT and IMG.DAT into the image OUT.DAT. The image OUT.DAT is the same size and data type as NY.DAT and IMG.DAT because the window and band options were not specified on the input images and the parameter ODTYPE is set to SAME indicating no data conversion is to take place.

Description/Algorithm:

The TAE input parameters are retrieved. Error checking is done on the input image(s) to ensure that they all have equal window sizes. Once the TAE parameters are input, the input image is copied to the output image. If the input image is REAL*4 and the output data type is INTEGER or BYTE, the data is rounded or truncated depending on the value set for the parameter ROUNDOPT.

Nonfatal Error Message:

  1. [copy-warn] Nonfatal error encountered

    A nonfatal error was encountered during processing. The image data is probably valid and therefore saved. The error message that is displayed immediately preceding this message is the specific error that was encountered. Processing continues.

Fatal Error Messages:

  1. [copy-fatal] Fatal error encountered

    A fatal error was encountered during processing. Processing is terminated. The error message that is displayed immediately preceding this message is the specific error that was encountered.

  2. [copy-window] Input images do not have same window sizes

    Error occurs if multiple input images are specified with different window sizes.

  3. [copy-maximg] Number of images exceeds maximum of XX

    The system will only allow XX number of images into a program at one time. Reduce the number of images you are using.

User Notes:

  1. When subsampling an image, the output image origin is reset to (1,1).

  2. COPY may also be used to combine several separate LAS images into a single image.

  3. COPY truncates when converting from a higher (REAL*4) to lower (BYTE) data type using the ODTYPE parameter. The MAP module should be used to rescale images.

  4. Some images may not compress and may actually expand when the COMPFLG is set to YES. Some example images that do this are created by TESTGEN-RAN. Images that expand generally are random and use most of the possible intensities.

  5. COPY may be used to combine images of different data types as well. If the output data type is SAME, then the data type of the first input image will be used.