User's Guide

Generates test images

Function:

Allows the user to create test images of specified size and characteristics. The image may be one of four types:

   UNIFORM  - All pixels have the same specified value.
   RANDOM   - Pixel values are randomly distributed
              within a specified range.
   GAUSSIAN - Pixel values are normally distributed
              with a specified mean and standard
              deviation.
   WEDGE    - Pixel values are generated as grey 
              level wedge.

Parameters:

Subcommand -UNI:
Uniform image generation. All pixels in the output image will have the same specified value.

OUT
Output image. Output name to be assigned to the image.

NBANDS(1)
Number of bands. Number of bands in the output image.

NL(512)
Number of lines. Specifies the number of lines per output image.

NS(512)
Number of samples. Specifies the number of samples in each output image line.

PIXVAL(0)
Pixel values. Specifies the pixel values to be used to generate a uniform image. Each entry corresponds to an output image band. If only one value is specified, the same value is used for all the bands. If NBANDS is greater than the number of values in PIXVAL, the program will abort; in addition, if the number of values specified by PIXVAL is greater than the number of output bands specified with NBANDS, the program will abort.

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 2147483648)
  = R*4:  REAL*4     (32-bit signed real)
		     (System dependent)
Subcommand -RAN:
Random image generation. Pixel values in the output image are randomly distributed within a specified range.

OUT
Output image. Output name to be assigned to the image.

NBANDS(1)
Number of bands. Number of bands in the output image.

NL(512)
Number of lines. Specifies the number of lines per output image.

NS(512)
Number of samples. Specifies the number of samples in each output image line.

MAXVAL(255)
Maximum pixel value. Specifies the upper bound of the range of pixel values to be used in generating a random image.

MINVAL(0)
Minimum pixel value. Specifies the lower bound of the range of pixel values to be used in generating a random image.

SEEDVAL(1)
Seed value. This value is used in generation of sequences of random numbers. It must be positive integer or zero.

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 2147483648)
  = R*4:  REAL*4     (32-bit signed real)
		     (System dependent)
Subcommand -GAU:
Gaussian image generation. Pixel values are normally distributed around a user-specified mean and standard deviation.

OUT
Output image. Output name to be assigned to the image.

NBANDS(1)
Number of bands. Number of bands in the output image.

NL(512)
Number of lines. Specifies the number of lines per output image.

NS(512)
Number of samples. Specifies the number of samples in each output image line.

MEANVAL(127.0)
Mean value. Specifies the average pixel value in the Gaussian output image to be generated.

STDEV(30)
Standard deviation. Specifies the standard deviation of pixel values in output Gaussian image to be generated.

SEEDVAL(1)
Seed value. This value is used in generation of sequences of random numbers. It must be positive integer or zero.

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 2147483648)
  = R*4:  REAL*4     (32-bit signed real)
		     (System dependent)
Subcommand -WED:
Wedge image generation. Generates a horizontal or vertical grey level wedge.

OUT
Output image. Output name to be assigned to the image.

NBANDS(1)
Number of bands. Number of bands in the output image.

NL(512)
Number of lines. Specifies the number of lines per output image.

NS(512)
Number of samples. Specifies the number of samples in each output image line.

WEDDIR(H)
Wedge direction.


  = H:  Horizontal wedge
  = V:  Vertical wedge.

Specifies the direction of the wedge. If horizontal (vertical), the first (top) pixel of each row (column) will have LTGREY as its value and the last (bottom) pixel will have RBGREY as its value with NLEVELS grey levels in between.

LTGREY(0.0)
Left side and top grey level. Grey level for the first (top) pixel when the direction is horizontal (vertical).

RBGREY(255.0)
Right side and bottom grey level. Grey level for the last (bottom) pixel when the direction is horizontal (vertical).

NLEVELS(16)
Number of levels. NLEVELS has to be less than or equal to ABS (RBGREY - LTGREY + 1) for images other than REAL*4. For REAL*4 output images, NLEVELS may exceed this constraint.

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 2147483648)
  = R*4:  REAL*4     (32-bit signed real)
		     (System dependent)

Examples:

  1. LAS> testgen-uni out=out.dat pixval=(10,11,20,30) nbands=4

    This creates OUT.DAT, a 512 x 512 BYTE image with four bands consisting of the uniform pixel values of 10, 11, 20, and 30, respectively.

  2. LAS> testgen-ran out=r.out maxval=25 seedval=2 nbands=2 nl=128 ns=128

    This creates R.OUT, a two-band BYTE output image with pixel values randomly distributed between a minimum of 0 and a maximum of 25. A seed of 2 is used for the random number generator.

  3. LAS> testgen-gau out=g.dat nbands=1 odtype=r*4

    This creates G.DAT, an output image with a Gaussian distribution, with a mean of 127 and a standard deviation of 30. The output is a single-band image with a dimension of 512 x 512. The output image is in REAL*4 values.

  4. LAS> testgen-wed ltgrey=0.0 rbgrey=255.0 nlevels=10 odtype=i*2

    This creates WEDGE.DAT, a two-band INTEGER*2 output image with a vertical wedge and ten grey-level steps. The value at the top of the wedge is 0 and the value at the bottom is 255.

Description/Algorithm:

TESTGEN generates multi-band images of four types: uniform, random, Gaussian, and wedge. The -UNI subcommand generates an image of uniform values. The -GAU subcommand enables the user to generate an image with a normal (Gaussian) distribution of intensity values. The user may also specify the image standard deviation and mean and may assign the seed value to be used in the random number generation. The -RAN subcommand generates random images that can be restricted to a range specified with the MINVAL and MAXVAL parameters. The seed value used in the random number generation can be assigned by the user. The -WED subcommand generates a grey-level wedge image. The wedge orientation may be horizontal or vertical. NLEVELS grey-level values are generated between levels LTGREY and RBGREY (inclusive).

Nonfatal Error Messages:

  1. [testgen-warn] Nonfatal error encountered

    A nonfatal error was encountered during processing. The first error message that is displayed preceding this message is the specific error that was encountered. Processing continues.

Fatal Error Messages:

  1. [testgen-alloc] Error allocating dynamic memory

    Cannot access dynamic memory buffer.

  2. [testgen-grey] Too many grey levels specified

    NLEVELS do not fit within data type range.

  3. [testgen-ltgrey] Left/top grey level is out of the data type range

    LTGREY does not fit within data type range.

  4. [testgen-max] Maximum value out of data type range

    MAXVAL does not fit within data type range.

  5. [testgen-mean] Mean value is out of the data type range

    MEANVAL does not fit within data type range.

  6. [testgen-min] Minimum value out of data type range

    MINVAL does not fit within data type range.

  7. [testgen-minmax] Minimum value greater than Maximum value

    MINVAL cannot be greater than MAXVAL.

  8. [testgen-nl] NLEVELS cannot be greater than number of lines

    If WEDDIR is "V," NLEVELS cannot be greater than the number of lines.

  9. [testgen-nlevels] NLEVELS too large

    NLEVELS cannot be greater than the absolute value of (RBGREY-LTGREY+1) for output image data types other than REAL*4.

  10. [testgen-nomatch] Number of PIXVAL values does not match NBANDS

    Number of PIXVAL values must be null, one, or match the number of bands specified by NBANDS.

  11. [testgen-ns] NLEVELS cannot be greater than number of pixels per line

    If WEDDIR is "H," NLEVELS must be less than the number of pixels per line.

  12. [testgen-rbgrey] Right/bottom grey level is out of the data type range

    RBGREY does not fit within data type range.

  13. [testgen-seed] Seed value is out of data type range

    SEEDVAL does not fit within data type range.

  14. [testgen-stdev] Standard Deviation is out of data type range

    STDEV does not fit within data type range.

  15. [testgen-values] Band values are out of the data type range

    PIXVAL values do not fit within data type range.

  16. [testgen-fatal] Fatal error encountered

    A fatal error was encounterd. The first error message displayed preceding this message is the specific error that was encountered.

User Notes:

  1. In the case of uniform images, if only one value is specified in PIXVAL, the same value is used for all the bands. Otherwise, if the number of values in PIXVAL does not match with NBANDS, the program aborts.

  2. In the case of the Gaussian images, the user has to specify parameters so that the values generated by the program do not overflow the range permitted by the specified data type.

  3. When entering values for the MAXVAL and MINVAL parameters, the user must be aware that the precision of the values entered is limited to 6 or 7 digits (these values are entered as real numbers). Thus the effective limits for integer*4 data are more like -2147483000 and 2147483000 rather than -2147483648 and 2147483647.

  4. When using the RAN subcommand to generate a real valued random image, values for MAXVAL and MINVAL that are very near the limits of the real data type can cause erroneous results due to numeric overflow. This problem occurs on the Gould when the limits are specified in scientific notation with exponents of 75, and on the Vax with exponents of 38.