User's Guide

MAKEIMG

Creates a LAS image from a user defined ASCII or text file.

Function:

Creates an image from values specified in a user-generated ASCII or text file. The values in the input file may be entered in any format desired as long as they are separated from one another by at least one blank.

The input file may contain either all the values or a subset of the values required for the output image. If it contains a subset, the remaining lines of the image are filled with the same data as the last line written to the image.

Parameters:

INFILE
Input file. The text file containing the values to be used to create the LAS image. If the input file does not exist in the default directory, INFILE must include the directory name along with the file name.

OUT
Output image. The output image can be BYTE, INTEGER*2, INTEGER*4, or REAL*4 data.

NL
Number of lines. The number of lines in the output image.

NS
Number of samples. The number of samples per line to be processed by the module. (The number of values entered in the input file must be evenly divisible by the number of samples per line.)

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


  = 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)

Examples:

  1. LAS> makeimg infile=infile.txt out=test.image nl=10 ns=10 odtype=i*4

    In the above example, MAKEIMG creates a 10 x 10 image called TEST.IMAGE, using the values given in the file INFILE.TXT.

  2. LAS> makeimg infile=[user.test]test.txt out=image nl=512 ns=512

    In the above example, MAKEIMG creates a 512 x 512 image called IMAGE using the default data type BYTE and the values given in the file TEST.TXT located in the directory [USER.TEST].

Description/Algorithm:

MAKEIMG creates an image from values specified in a user-generated ASCII or text file. The values in the input file are read in one at a time. Each line is written to the output image according to the user-specified image size. Only one band is created.

If the number of values in the input file is not divisible by the number of samples specified for the output image, an error message is written and the program terminates.

If the input file does not contain values for all the lines in the output image, the remaining lines are filled with the same data as the last line written to the image. Any extra values in the input file are ignored.


  INPUT FILE:

    27 28 30  35  38 40 42 45 51 
    52 60 65 67 68 70 80 82 80 
    81 90

  IMAGE CREATED:

    27 28 30 35 38 
    40 42 45 51 52 
    60 65 67 68 70 
    80 82 80 81 90 
    80 82 80 81 90

Nonfatal Error Messages:

  1. [makeimg-type] Output data invalid

    The user entered a value in the input file that is less than or greater than the valid range for the data type which was specified. Therefore, the output data may be invalid. If the data is less than the minimum, it is reset to the minimum value allowed. If the data is greater than the maximum, it is reset to the maximum. See the User's Guide for program COPY for a further description.

  2. [makeimg-warn] Nonfatal error encountered -- Image data saved

    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.

  3. [makeimg-samples] Invalid number of samples

    The end of file was reached leaving a partially filled image line. The user should verify that the total number of values entered is divisible by the number of samples per line specified by the parameter NS.

Fatal Error Messages:

  1. [makeimg-open] Error opening input file

    An error was detected while attempting to open the input file. The user should verify that the input file name was entered correctly.

  2. [makeimg-read] Error reading input file

    An error was detected while attempting to read from the input file.

  3. [makeimg-get] Invalid output image name

    The image name specified in the OUT parameter is invalid.

  4. [makeimg-write] Error writing output image

    An error was detected in attempting to write to the output image.

  5. [makeimg-nl] NL must be greater than or equal to 1

    The value of NL must be greater than or equal to 1. Respecify NL and rerun.

  6. [makeimg-ns] NS must be greater than or equal to 1

    The value of NS must be greater than or equal to 1. Respecify NS and rerun.

User Notes:

  1. The output image will be a single band of type BYTE, INTEGER*2, INTEGER*2, or REAL*4. The ASCII or text file can contain either integer values, real values, or both. Each value must be separated by a blank space.

  2. The ASCII or text file containing the values to be used to create the image may be created with the VMS or UNIX editor before MAKEIMG is executed.

  3. The number of values entered in the input file must be divisible by the number of samples per line.

  4. The processing time will vary depending upon the size of the image being created.