IMAGELN -- Live Link to BSQ/BIL/BIP Image File

Creates a PCIDSK database file header allowing indirect access to imagery on a non-PCIDSK file given the file's structure is known.

This allows most PACE programs to operate on imagery stored in non-PCIDSK files.

See Also: IMAGERD, CIM, PCIADD2, FIMPORT, LINK

PARAMETERS

IMAGELN is controlled by the following global parameters:

Name     Prompt                                  Count     Type
FILI     Database Input File Name                1-64      Char
FILO     Database Output File Name               1-64      Char
STRUCTUR File Structure Information              2-5       Int
DATATYPE Data Type 8U/16S/16U/32R                1-4       Char
SWAPFL   Byte Swap Data Flag: YES/NO             0-3       Char

FILI

Specifies the name of the non-PCIDSK imagery file for which a PCIDSK link is to be created.

 EASI>FILI="file_spec"
It is suggested that full pathnames from the root be used for the target file, as this is the filename that is placed into the PCIDSK file to later allow programs to find the original imagery file.

FILO

Specifies the name of the PCIDSK file to be created. This file must not exist before IMAGELN is run.

EASI>FILO="file_spec"

STRUCTUR

Specifies the structure of the non-PCIDSK file.

 EASI>STRUCTUR=pixels,lines,bands,interleaving mode,header length
Each value has the following meaning:

 Pixels                 Number of pixels (width) per line.

 Lines                  Number of lines in the image.

 Bands                  Number of bands (Channels) of imagery.

 Interleaving           Mode of interleaving:
                        0: band sequential (default)
                        1: line interleaved
                        2: pixel interleaved

 Header                 Number of bytes of header information to skip
                        before first byte of imagery data.
                        Default is 0 bytes.

DATATYPE

Specifies the data type of the image channels within the non-PCIDSK file that are to be read.

 EASI>DATATYPE="8U"           |  8-bit unsigned integer
 EASI>DATATYPE="16S"          | 16-bit   signed integer
 EASI>DATATYPE="16U"          | 16-bit unsigned integer
 EASI>DATATYPE="32R"          | 32-bit real

SWAPFL

Specifies whether 16-bit and 32-bit image data should be byte swapped when read from the file. For 32-bit real data, the first and last bytes are swapped and the second and third bytes are swapped. For 16-bit integer data (signed or unsigned) the first and second bytes are swapped.

 EASI>SWAPFL="NO"               | Do not swap bytes
 EASI>SWAPFL="YES"              | Swap bytes
 EASI>SWAPFL=                   | Defaults to "NO"

DETAILS

IMAGELN is used to create a live link to a raw non-PCIDSK image file of a user-specified format (given by STRUCTUR parameter). Compressed files can not be linked.

When IMAGELN is run, a PCIDSK file is created, and links point to the input image file.

The PCIDSK file created by IMAGELN is FILE interleaved, like PCIDSK files created by CIM with DBLAYOUT="FIE" and LINK. This means that the actual image data are stored in a separate file (FILI). No additional copies of the imagery are created. The FILE interleaved PCIDSK file created by IMAGELN contains a description of the data stored in the non-PCIDSK file similar to that which has to be specified when running PCIADD2.

Only a raw data files that is organized as band sequential, band interleaved by line, or band interleaved by pixel can be linked. Compressed imagery, or image data that are not 8-bit, 16-bit unsigned, 16-bit signed or 32-bit real can not be linked.

SWAPFL (swap flag) specifies whether 16-bit and 32-bit image data should be byte swapped when data are read from the file. For 32-bit real data, the first and last bytes are swapped and the second and third bytes are swapped. For 16-bit integer data (signed or unsigned) the first and second bytes are swapped.

IMAGELN prints information regarding the imagery size and number of channels.

EXAMPLE

The user wishes to create a PCIDSK file which is linked to a large hyperspectral 512 pixel by 512 line and 224 channel image file. This file stores channels in line interleaved (BIL) format, the image data are 16-bit signed integer, and the file has no header.

 EASI>FILI="avhrr.hyp"
 EASI>FILO="avhrr.pix"
 EASI>STRUCTUR=512,512,224,1
 EASI>DATATYPE="16S"
 EASI>SWAPFL=
 EASI>RUN IMAGELN

About PCI Help Gateway