IMB -- General Database to Tape Image Transfer

Writes image data to a magnetic tape in band sequential (BSQ), band interleaved by line (BIL), or band interleaved by pixel (BIP) ordering from image channel(s) in a PCIDSK database file.

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

See Also: MIB, MAGSTRU

PARAMETERS

IMB is controlled by the following global parameters:

Name     Prompt                                  Count     Type
FILE     Database File Name                      1-64      Char
DBIW     Database Input Window                   0-4       Int
DBIC     Database Input Channel List             1-16      Int
RECL     Record Length                           0-1       Int
STRUCTUR File Structure Information              2-4       Int
STARTFIL Start File on Tape                      1         Int
DATATYPE Data Type: 8U/16S/16U/32R               2-3       Char
SWAPFL   Byte Swap Data Flag:YES/NO              0-3       Char

FILE

FILE is the filename of the PCIDSK image database.

 EASI>FILE="...filename..."

DBIW

DBIW specifies a rectangular subset of the image channel in the input image database file to be written to tape.

 EASI>DBIW=Xoffset,Yoffset,Xsize,Ysize
 EASI>DBIW=                     | defaults to entire image
Note: The offset + size must not exceed the image size.

DBIC

DBIC represents the image channel(s) on the database file to be written to tape, and their ordering:

 EASI>DBIC=i,...j,k                     | integer

RECL

Specify the record length to be used for the data on the tape. If this is not specified, it will be set to (pixels * bands) for pixel interleaved, or line interleaved tapes. For band sequential tapes it will default to the number of pixels.

 EASI> RECL=1536
If the selected record length is greater than the amount of data in one line, as many lines as possible will be packed on the record, without having any lines split across records. If the selected record length is less that required for one line, the line will be split across as many records as are required to hold the data, with each line of data starting on a new record.

The record length must be less than 65534 and should be greater than 18. The record length should also be a factor or multiple of the number of pixels, to allow convenient packing of data. Many tape systems also require tape record lengths to be a multiple of 2 (even).

STRUCTUR

Specify the structure of the output file:

 EASI> STRUCTUR = pixels,lines,bands,interleaving mode
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,
           default is one.

 Interleaving Mode: 
    0: band sequential (default)
    1: line interleaved
    2: pixel interleaved
    3: band sequential by file, each band has an EOF
       marker placed after it.

STARTFIL

Specifies the start file number on tape from which to start writing image data. If STARTFIL is greater than one, the program rewinds the tape and advances to the specified file.

 EASI>STARTFIL=1              | write first file on tape
 EASI>STARTFIL=n              | write nth file on tape

DATATYPE

Specifies image data type being written to magnetic tape:

 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 the tape should be written in byte swapped form or not. This is independent of machine local byte ordering, and defaults to SWAPFL="NO". This flag has no effect with 8 bit data. If SWAPFL="YES" for 16 or 32 bit data, the data is written out least significant byte (LSB) first, otherwise it is written most significant byte (MSB) first.

 EASI>SWAPFL="YES"                      | Data written LSB first.
 EASI>SWAPFL="NO"                       | Data written MSB first.

DETAILS

Any arbitrary rectangular window on the database (DBIW) can be transferred to tape. If no input window is specified, then the window is defaulted to the full size window of the database channel. Shrinking and/or zooming is automatically performed to fit the size of the tape file as specified by STRUCTUR.

The file written to tape can positioned on the tape using the STARTFIL parameter. The tape will be positioned to the desired file on tape before writing begins.

IMB is capable of writing tapes with multiple lines of data per record or multiple records per line. Which case (if either) applies is determined by the record length selected (RECL) and the amount of data per line. In no case will a line of data be broken across multiple records unless in can not be contained in one whole record. This is the same technique used by MIB, but in general it is advisable to use a record length that is an exact multiple or factor of the amount of data on one line.

 A TAPE MUST BE MOUNTED ON THE TAPE DRIVE BEFORE IMB CAN BE
 RUN.  CLEANING THE TAPE HEADS IS RECOMMENDED TO MINIMIZE THE
 CHANCE OF TAPE READ ERRORS.

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)

EXAMPLE

In order to send a RGB photo-map to be printed by a commercial print shop, IMB is used to write a band sequential (BSQ) tape. The receiving site has no special software to read tapes, and must use the Unix 'dd' command to read from the tape.

 EASI>FILE = "irvine.pix
 EASI>STARTFIL = 1                      | Place at start of tape
 EASI>DBIW =
 EASI>DBIC = 3,2,1
 EASI>STRUCTUR = 512,512,3,0            | 3 bands written BSQ
 EASI>DATATYPE="8U"
 EASI>RECL = 512                        | Factor of 2048 bytes
 EASI>run imb
This tape can now be read at the receiving site with a command such as the following, which specifies that a file should be read from device '/dev/rmt0' to file 'irvine.RGB' with an input record length of 512. The output file will be a 1.5 Meg band sequential raw image file on disk.

 % dd if=/dev/rmt0 of=irvine.RGB ibs=512

About PCI Help Gateway