Perform a piecewise linear transformation on an input image
Performs a piecewise linear transformation on an input image. The input image data type may be BYTE, INTEGER*2, INTEGER*4, or REAL*4 and may be a single- or multi-band image. Two through one thousand separate mapping ranges may be specified through the combination of the FROM and TO parameters, or the values may be entered via a text file.
- 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.
NOTE: If the data type of the output image is to be the same as the input image(s), all input images are required to be of the same data type. The window size of all input images are required to be the same.
- 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. 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 ROUNDOPT.
= 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 2147483648) = R*4: REAL*4 (32-bit signed real) (System dependent)
- ROUNDOPT(ROUND)
- Round option. If the input data is REAL*4 and the output data type is INTEGER*4, INTEGER*2, or BYTE, the input data values are either rounded or truncated when converted.
= ROUND: Round the input data. = TRUNC: Truncate the input data.
- FROM(--)
- Input pixel values. Specifies the input values of the mapping pairs. At least two and no more than one hundred values may be given. FROM must contain the same number of values as specified in TO. When FROM and INFILE are both defaulted to NULL, a single FROM pair is created containing the min and max values of the input image(s).
- TO(--)
- Output pixel values. Specifies the output values of the mapping pairs. At least two and no more than one hundred values may be given. TO must contain the same number of values as specified in FROM. When TO and INFILE are both defaulted to NULL, a single TO pair is created containing the min and max values of the output data type.
- INFILE(--)
- Input file. INFILE may be either an ASCII text file of FROM/TO pairs or a display and look-up table file (DLTF). When this file name is specified, the values in FROM and TO are ignored and the contents of the file are used.
If it is an ASCII file, it contains the input and output pixel values normally found in FROM and TO. The file may be created by a text editor, FORTRAN program, or a C program using unbuffered I/O and variable length, carriage-return control. The values in the file must be placed in two columns: one for the FROM values and one for the TO values. Up to 1,000 pairs may be specified. If it is a DLTF file, the look-up table that is needed to map the input image(s) is read from this file, rather than calculated from FROM/TO pairs. INDLTF must contain the key field of this DLTF entry. When INDLTF contains the key field of the DLTF but no file name has been specified in INFILE, INFILE is assumed to be the same name as the image name in IN as long as only one image file name was specified as input to IN. The default extension for INFILE is ";txt".
- INDLTF(--)
- Input display and look up-table file entry. The DLTF entry from a previously created look-up table stored on disk in DLTF format. The number of look-up tables in the INDLTF entry must equal the total number of input bands in IN, must be a single entry that is used to map all input bands, or a multiple entry if the input image is a single band. INDLTF is required if INFILE contains a DLTF file name and must have the default value if INFILE cannot be defaulted to the input image name (see INFILE).
- OUTFILE(--)
- Output display and look-up table file. The look-up table used by MAP is only stored on disk if OUTFILE is specified, or the output DLTF key field is specified in OUTDLTF. In the latter case, OUTFILE is given the same root name as the output image name in OUT with an extension of ";dltf". The data type of the DLTF may be BYTE or INTEGER*2. There can be only one OUTFILE for each output image.
- OUTDLTF(--)
- Display and look-up table file entry. The name of the entry in the images' associated DLTF specified by OUTFILE. OUTDLTF is required if the look-up table used to map the image(s) is to be saved to disk in DLTF format. OUTDLTF must be NULL if OUTFILE is NULL.
- TEXT(--)
- Text string. This contains the contents of the COMMENT field of the DLTF entry.
The input image DC is transformed and output to the REAL*4 image MAPPED as follows:
o Gray levels less than 1.0 are set to 20.0. o Gray levels greater than or equal to 1.0 and less than 20.0 are linearly mapped into the range (20.0:110.0). o Gray levels greater than or equal to 20.0 and less than 200.0 are linearly mapped into the range (110.0:190.0). o Gray levels greater than or equal to 200.0 and less than 255.0 are linearly mapped into the range (190.0:250.0). o Gray levels greater than 255.0 are set to 250.0.
MAP computes the transformation coefficients needed to map the input image over the user-specified ranges. Once these values are computed, they are applied to each input band in a line-by-line fashion.
A nonfatal error was encountered during processing. The image data is probably valid and therefore saved. The message that is displayed immediately preceding this message is the specific error that was encountered. Processing continues.
An output DLTF was specified but will not be created. The input or output image were either INTEGER*4 or REAL, but a DLTF may only be BYTE or INTEGER*2.
A fatal error was encountered during processing. The output image is not deleted, and processing is terminated. The error message that is displayed immediately preceding this message is the specific error that was encountered.
The images in the input image specification must have the same window size.
The output image's data type was to be the same as the input image, but the input images are not of the same data type. The user can either ensure all input images have the same data type or specify the data type of the output image by assigning a value to ODTYPE.
When OUTFILE is specified, user input is required for OUTDLTF and TEXT, which are used for the key of the output DLTF and comment fields.
When a DLTF entry name is specified in INDLTF and more than one image file name was specified in the IN, the input DLTF file name in INFILE cannot be defaulted to that of the input image file name. The input DLTF file name must be specified in INFILE.
FROM and TO cannot be specified with only one value. Each parameter must have at least two values specified for it.
The FROM and TO parameters work as a pair and must contain the same number of values.
The values specified for FROM must be in ascending order.
The values specified for TO must be in the range of the output data type.
An error was encountered while attempting to open the file specified in INFILE.
The file specified in INFILE is required to be an ASCII file containing a single FROM and TO pair per line, separated by a blank(s).
The file of FROM and TO values specified by the INFILE can have a maximum of 1,000 pairs of values.
The input DLTF entry must have: the same number of look-up tables as the number of input image bands specified; only one look-up table, which will be used for all image bands; a multiple entry if the input image is a single band.
The first FROM/TO pair specified contains a value that is less than the range of the data type of the look-up table required to map the image.
The last FROM/TO pair specified contains a value that is greater than the range of the data type of the look-up table required to map the image.
An error was encountered attempting to allocate enough memory to read in the input DLTF data.
The starting point and ending point of the input DLTF entry data are outside of the range of the data type of the lookup table required to map the image.
The minimum and/or maximum values of the input DLTF entry data are outside of the range allowed by its data type.