IPPI -- Image to BSQ Intermediate Format

Moves image data from a PCIDSK image database to an intermediate Band Sequential file format. This intermediate format is useful for transferring data to the PAMAP software package.

NOTE: The programs IMAGERD and IMAGEWR are the more common methods of creating files for interchange of image data.

Progress of this program can be monitored. See MONITOR section.

See Also: IMAGERD, IMAGEWR

PARAMETERS

IPPI 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
DBIC     Database Input Channel List             1-16      Int
DBIW     Database Input Window                   0-4       Int
TEX1     Database Descriptive Text 1             0-48      Char
ORIGIN   Location of Origin (X,Y)                0-2       Real
FLSO     Image Scan Line Order                   0-1       Int

FILI

Specifies the name of the PCIDSK image file to be moved to a PCI-BSQ intermediate file format.

 EASI>FILI="filespec1"

FILO

Specifies the name of the PCI-BSQ file to receive the intermediate format image file.

 EASI>FILO="filespec2"
IPPI automatically creates this .PIP file and transfers data to it.

DBIC

Specifies the image channels to be transferred to PCI-BSQ intermediate format. Up to 16 channels can be specified.

 EASI>DBIC=i,j,...,p

DBIW

Specifies a rectangular window of the image to be transferred to PCI-BSQ format.

 EASI>DBIW=Xoffset,Yoffset,Xsize,Ysize
 EASI>DBIW=                     | use entire image
IPPI does not support transfers of greater than 8192 pixels per scan line.

TEX1

Specifies 1 to 48-characters of descriptive text that will be placed in the PCI-BSQ intermediate file header.

 EASI>TEX1="Descriptive text for PCI-BSQ file"

ORIGIN

Specifies the location of the origin (0,0) point of your image in units relative to your map projection. This may be the lower left corner in UTM.

 EASI>ORIGIN=UTMXorigin,UTMYorigin
This parameter is useful if transferring to third-party software.

FLSO

Specifies the ordering of the image scan lines.

 EASI>FLSO=0                    | from [N..1] (reverse BSQ order)
 EASI>FLSO=1                    | from [1..N] (forward/PCI order)

DETAILS

IPPI transfers PCIDSK image data from any image channel (DBIC) on the input file (FILI) to an intermediate PCI-BSQ format on the output file (FILO). This is useful when transferring data to third-party software.

Any arbitrary rectangular window on the input file (DBIW) can be transferred to the output file.

The input file must be a PCIDSK file. The output file will be created by this task with a default extension .PIP.

MONITOR

Program progress can be monitored by printing the percentage of completed processing in odometer fashion. A system parameter, MONITOR, controls this activity:

 EASI>MONITOR="ON"              | turn monitor ON  (default)
 EASI>MONITOR="OFF"             | turn monitor OFF (recommended if
                                | running in batch/background mode)

FORMAT

PCI-BSQ INTERMEDIATE file structure (M channels of N lines):

   Header                               Header
   line 1 (channel 1)                   line N   (channel 1)
   line 2       "                       line N-1     "
        :                                    :
   line N       "                       line 1       "
   line 1 (channel 2)                   line N   (channel 2)
   line 2       "                       line N-1     "
        :                                    :
   line N       "                       line 1       "
   line 1 (channel 3)                   line N   (channel 3)
        :                                    :
   line N (channel M)                   line 1   (channel M)

 PCI Format (FLSO=1)                    BSQ Reverse (FLSO=0)
The PCI-BSQ format consists of a 512 byte header followed by M channels of data. Each channel of data consists of N scan lines. Two variations exist: PCI format, where lines are ordered from 1 to N (i.e., first scan line first), and Reverse BSQ format, where lines are ordered from N to 1 (first scan line last). The type of format is indicated by the FLSO control field in the header record (1=PCI format, 0=BSQ Reverse).

This file is made up of 512 byte records.

HEADER format:

The header is the first record on the file and is 512 bytes long. The header layout and description is given below with example values for a 2 channel, 512 line by 640 pixel file.

  FIELD  TYPE  EXAMPLE       DESCRIPTION
 +-----  ----  ---------     ---------------------------
  1      I*4      512        Number of Lines in MAP
  2      I*4      640        Number of Pixels per Line
  3      I*4        2        Number of Image channels
  4      R*4      1.0        Pixel X-size in metres
  5      R*4      1.0        Pixel Y-size in metres
  6      C*4   "23  "        ASCII creation day
  7      C*4   "OCT "        ASCII creation month
  8      C*4   "87  "        ASCII creation year
  9      I*4      2          Number of 512 byte records/scan line
  10     C*48  "Example..."  Text string to Label file
  11     R*4    0.0          UTM X origin
  12     R*4    0.0          UTM Y origin
  13     I*4      8          Bits per pixel (=8)
  14     C*412               Reserved for future use
  15     I*4      1          FLSO Control

LINE format:

Each line of data consists of J pixels, where 0 < J < 32769. Each pixel must be 8-bits wide. For ease of disk access, each line on disk is a multiple of 512 bytes in length (512 bytes = one record). The line length can be calculated as follows:

             J + (512 - mod(J,512))
For example: if J = 1280, then each line on disk would be 1536 bytes (3 records) in length where the first 1280 bytes hold image data and the last 256 bytes are unused.

IMPORTING DATA

Use of the BSQ intermediate files for importing data from other sources is not recommended. For importing data, the user is asked to refer to the MINIMAL STRUCTURE section of the PCIDSK database manual.

EXAMPLE

Transfer a 100,100 window offset by 10,10 to the intermediate file.

 EASI>FILI="LANDSAT"
 EASI>FILO="GIS"
 EASI>DBIC=2                    | specify channel to transfer
 EASI>DBIW=10,10,100,100        | specify window to transfer
 EASI>FLSO=0                    | specify reverse BSQ ordering
 EASI>RUN IPPI

About PCI Help Gateway