Image File Format

IPW Image Files

An IPW image constists of one or more image headers, followed by binary image data.

All IPW images begin with a "Basic Image Header" (BIH). This header contains information about the image - the number of lines (rows) and samples (columns), the number of bits and bytes per pixel and the number of bands (channels) in the image. The history of IPW commands that have been used to process the image is also contained in the BIH.

The following is an example of an IPW basic image header:

	!< header> basic_image_i -1 $Revision: 1.2 $
	byteorder = 3210
	nlines = 512
	nsamps = 512
	nbands = 1
	!< header> basic_image 0 $Revision: 1.2 $
	bytes = 1
	bits = 8
	annot = output from xv

Following the BIH, are optional headers containing ancillary information about the image required by certain programs, or generated by IPW programs. This currently includes satellite/sensor information, sun angle information, window specifications, geodetic coordinates, and linear quantization mappings. Additional headers may be created by IPW programmers.

Images are stored as a two dimensional array of samples by lines, (columns by rows) starting at the upper left corner. The upper left corner is refered to as line 0, sample 0.

Multi-band images are stored in band-interleaved by pixel format. The pixels for each band are stored sequentially, followed by the next sample. The first band is refered to as band 0. Figure 1 depicts this graphically.

Floating point images are stored as `linear quantizations'. While most machines store floating point values in 4 or 8 bytes, in a non-portable format, IPW can store floating point values in a single byte. If more precision is necessary, more bytes can be used. In this case, the data will still be portable between machine types. For more information about the floating point representation, consult the IPW manual (Frew, 1990).

Other IPW Files

Histograms are stored as one line, 4 byte IPW images where each sample is the frequency count of pixels at that value. The number of samples is 2 ^ nbits.

Look-up tables (LUT's) are used to remap the values in an image. They are stored as one line IPW images where each sample contains the output value to be applied to the image.