Go to the USGS Home Page

USGS MIPS Import Documentation






This program converts a binary image  into a MIPS image format. The program accepts several different image formats as input, including RAW, BMP, GIF and TIFF. The several data types that can be accepted using the RAW format, are:

Unsigned 8-bit
Signed 16-bit lsb
Signed 16-bit msb
IEEE float lsb
IEEE float msb
Vax float
where,

lsb is least significant byte
msb is most significant byte
It can also handle a variety of file interleaved formats including:

Band sequential
Band interleaved by line
Band interleaved by pixel 
The program can also skip header information at the beginning of a file and header and/or trailer information within each individual record/image line.

Input Format Parameters

RAW, BMP, GIF or TIFF

These options are used to select the image format of the input file. As a default, IMPORT attempts to identify the format of the input file and sets the appropriate parameter; otherwise the format is not recognized and the RAW option is set as the default.

Input File

This program requires as input one file that has been created in any one of a variety of different image formats including the RAW, BMP, GIF and TIFF formats.

RAW File

Under the RAW option this program has as input a raw binary unsigned 8-bit , or one signed 16-bit , or one 32-bit  floating point image file. The 16-bit image can be the least or most significant byte and the 32-bit image can be IEEE or Vax format. The output image will be converted to the same type (8, 16, or 32) but will be appropriate for the computer type being used(e.g., IEEE for Suns, DGs and Alpha/Osf and Vax for Vax/Vms or Alpha/Vms).

BMP File

Under the BMP option this program has as input a Microsoft Window's Bitmap File Format(BMP) image file. As output, depending on the BMP format, one or three unsigned 8-bit images will be generated. If there was only one output file, a stretch file  may also be created. This stretch file will contain the stretch parameters created from the colormap found in the BMP file. The program APPLYSTR could then be used to apply the stretch parameters to the imported image. The following BMP formats are currently handled:

old Windows/OS2 and new Windows formats
1, 4, 8 and 24 bits per pixel
4 and 8-bit run-length-encoded compression

GIF File

Under the GIF option this program has as input a CompuServe's Graphics Interchange Format(GIF) image file. As output, an unsigned 8-bit image will be generated and possibly a stretch file. This stretch file will contain the stretch parameters created from the colormap found in the GIF file. The program APPLYSTR could then be used to apply the stretch parameters to the imported image. The following GIF formats are currently handled:

gif87 and gif89 formats
interleaved and non-interleaved
single image GIFs

TIFF File

Under the TIFF option this program has as input a Tagged Image File Format(TIFF) image file. As output, depending on the TIF format, one or three unsigned 8-bit images will be generated. If there was only one output file a stretch file may also be created. This stretch file will contain the stretch parameters created from the colormap found in the TIFF file. The program APPLYSTR could then be used to apply the stretch parameters to the imported image. The following TIFF formats are currently handled:

grayscale, paletter color and rgb color formats
noncompressed images
nontiled images

RAW Format Parameters

The following parameters are needed only when importing a RAW file.

UBYTE, SWORDLSB, SWORDMSB, IEEELSB, IEEEMSB or FLOATVAX

These options are used to select whether the input image type is an unsigned 8-bit, signed 16-bit or 32-bit floating point. The user also needs to specify whether the input image file came off a VAX or IEEE machine and whether that machine was a least or most significant byte ordered. The default input image type is unsigned byte.

NBANDS, NL and NS

These parameters select the number of bands, as well as the number of lines and samples in the image. The default number of bands is one, with no defaults for NL and NS.

BIF, BIL or BIP

These options are used to select the format Import should use in extracting the image. BIF, BIL and BIP stand for band interleaving by file, line and pixel, respectively.

SBYTE, RECLEN and SBREC

SBYTE is used to specify where the image starts in the input file. It is used to skip over header data that could be stored at the beginning of the file. The default starting byte is one. RECLEN is used to define the number of bytes in a record and SBREC is used to define where the image starts within the record. For example, a 16-bit image with 7 bytes of header data in each record and 500 samples could be imported using the following parameters: RECLEN=1007 and SBREC=8. The default for SBREC is 1 and there is no default for RECLEN.

See Also

Applystr 
Export 
Xtfin

U.S. Department of the Interior | U.S. Geological Survey | Jobs
Home | Search | Disclaimers & Privacy Web Rings
Send comments to webman@TerraWeb.wr.usgs.gov
URL:
Last Modified: Thu Oct 31 15:08:23 MST 2002
FirstGov: Your First Click to the U.S. Gov ernment