Overlay input images to generate gray level permutation codes
Overlays corresponding pixels from multiple input images to generate a permutation table and optional single-band output image. The permutation table is created as a labeled table. Each entry in the permutation table stores a permutation code, a count of the number of pixels in the output image that have been assigned that permutation code, and a list of the input image pixel values that comprise that permutation. Each pixel value in the optional output image stores the permutation code assigned to the collection of pixel values from the input image(s).
- IN
- Input images. Input images or image bands for processing. These images may be any combination of BYTE, INTEGER*2, or INTEGER*4 data types. While separate window specifications are allowed for each image, the resulting window specifications must be the same size. Any combination of single or multi-band images may be used.
- OUTLT
- Output labeled table file. This labeled table will contain a permutation code, a count of the number of pixels in the output image that have been assigned that permutation code, and a list of the input image pixel values that comprise that permutation.
- OUT(--)
- Output image. The output image name. The data type of this image depends on the number of unique permutations found in the input image.
Range of Permutation Codes Data Type __________________ __________ 0 - 255 BYTE 0 - 32767 INTEGER*2 0 - 2147483647 INTEGER*4
- LTTYPE
- Labeled table type. This is the type of labeled table file to be created.
- ATRNAME
- Attribute names. This is the attribute name(s) given to each of the field(s) in the labeled table file.
- MASKVAL(-- )
- Mask values. Mask values for all bands . This allows mask values to be specified for each input image band. A mask value must be specified for each image band, and it may lie outside the data range for its associated image band. INTERSECT assigns a permutation code of 0 when a pixel value from any band matches the mask value specified for that band. The first data record in the labeled table contains the number of mask values found. If the mask value lies outside the data range for its associated image band, the mask value is ignored.
IN specifies two single-band input images--COUNTY and TOWNSHIP. The labeled table will be named COUNTY, and the output image name will be COUNTY.TWNSHP. The type of the labeled table will be PERMUTATION with attribute names of COUNTY and TWNSHP. MASKVAL is defaulted to NULL. This causes INTERSECT to seek permutation codes for each pixel of the input image.
IN specifies nine input bands: the single-band classified vegetation image VEGCLASS, the 4-band MSS multiband image MSS.APR, and the 4-band MSS multi-band image MSS.AUG. MASKVAL specifies that masking is to take place in this run. VEGCLASS pixel values of 73 denote pixels that are to be masked out during this run. The output pixel values in VEGCLASS.INTRSCT are assigned the value 0 when a pixel value from the VEGCLASS image is 73. The -1 mask values fall out of the data range for the MSS image bands and do not contribute to the masking. The first data record in the labeled table VEG will contain the number of mask values found.
INTERSECT compares corresponding pixels from each input image band and creates a permutation table as a labeled table. Each entry in the permutation table stores a permutation code, a count of the pixels in the output image that are assigned to the permutation code, and a list of the gray levels that compose the permutation. The user has the option of creating a single-band output image representing the permutations of grey levels from the input images.The image bands are read simultaneously. A table of run-length codes is created for each input image line. Each run-length code consists of an integer pair (X,Y), where X is the number of consecutive pixels with gray value Y. Intersections are determined by noting common runs of run-length codes. Permutations are defined by the intersection of run-length codes from each input image band. Each intersection of pixel values is compared to entries in the table of permutations that is being generated. When no match is found, the next consecutive permutation code is assigned to the permutation defined by that intersection. The run length of the intersection is assigned to the count for the permutation code. The permutation code is assigned to pixels of the temporary image corresponding to the run-length code of the input images. When the attributes of an intersection match the attributes that define a permutation code, the number of pixels in the current intersection is added to the count for the matching permutation. The permutation code is assigned to pixels of the temporary image corresponding to the run-length code of the input images.
Only a fixed number of permutations can be stored in memory. When the number of permutations defined exceeds the number that can be stored, room for the new permutation is made in memory by writing the least-recently used permutation table entry to a temporary file. This may result in the generation of duplicate definitions for permutation codes. After the "intersection pass" through the input image(s), remaining permutation table entries are written to the temporary file. The temporary file is sorted by component gray codes to group duplicate permutation definitions together. Consecutive records of the temporary file are then compared to determine if they share the same permutation definition. Records sharing a common definition are merged with the first record that defines that permutation, and the permutation codes are sequentially reassigned. The resulting permutation record is written to the labeled table.
If an output image is requested, a translation table is generated that maps initial permutation codes to resulting permutation codes. The temporary image is read and pixel values are passed through the translation table to generate the output image. If the translation table cannot be stored in memory, it is created as a temporary file.
The labeled table and, optionally, the translation table are being created. The processing time will vary depending on the number of permutations found and the number of image bands being processed.
The host system sort is being used to sort the permutation file. The processing time will vary depending on the number of permutations found and the number of image bands being processed.
The host system sorts could not be used to sort the permutation file. The processing time will vary depending on the number of permutations found and the number of image bands being processed. See User Note 2.
The temporary image used by INTERSECT already exists, probably from an unsuccessful run. The image will be deleted and processing will continue.
A nonfatal error was encountered during processing. The data is probably valid and therefore saved. The error message that is displayed preceding this message is the specific error that was encountered.
This error occurs only on a VAX/VMS system. Since the VMS system sort will not handle negative data values, an offset value is added to all pixel values when creating the permutation table, thus enabling the use of the system sort. This error occurs if the offset value plus the maximum pixel value is greater than the value that I*4 can handle. Processing will continue, but the internal bubble sort will be used to sort the permutation file. See User Note 2.
The number of MASKVAL values must be 0 or match the number of input image bands. The user should specify the correct number of MASKVAL values and rerun INTERSECT.
INTERSECT will not process REAL input images. The user should convert the REAL input images to an appropriate data type and rerun INTERSECT.
INTERSECT was not able to open the temporary file. This system error is normally out of the user's control. The user should rerun INTERSECT. If the error occurs again, contact the system manager.
INTERSECT was not able to sort the temporary permutation file or translation table. This system error is normally out of the user's control. The user should rerun INTERSECT. If the error occurs again, contact the system manager.
An error occurred allocating memory. Rerun INTERSECT, and if the error reoccurs, contact the system manager.
The input images are specified with different window sizes. Rerun INTERSECT and respecify the window sizes.
A fatal error was encountered during processing. Processing is terminated. The error message that is displayed preceding this message is the specific error that was encountered.
The number of ATRNAME values must match the number of input image bands. The user should specify the correct number of ATRNAME values and rerun INTERSECT.