|  3DSoftware.com > Programming > File Formats > FIN > Page 9 |
|
FIN File Format
Page 9
Data Storage If tiling is used, use the file header's Pointer to Tile Addresses to find the file data (grid nodes). If blocks are used, use the Pointer to Block Addresses to find the data. If bands are used, use the Pointer to Band Addresses to find the data. If tiling, blocks and bands are not used, the file header is immediately followed with the file data (grid nodes), uncompressed in raster order, beginning with the top scan line, without any pad bytes between scan lines. If there are multiple channels (more than one matrix), the data for the first channel is followed with the data for the second channel, etc., without any pad bytes between the channels. Blocks and bands are stored like tiles. In the rest of this page, discussion of tiles also applies to blocks and bands. Single Channel This section covers storage of tiles (or blocks and/or bands) in files that have only one channel. If the file has more than one channel, see the next section. The first byte of a tile is the tile lead byte that specifies the type of tile. If the tile lead byte is 0x00, the tile is uncompressed and that lead byte is immediately followed with grid nodes in raster order. Each node is stored intact, with most significant byte first if it is a multi-byte number. If the tile lead byte is 0x01, all the grid nodes in the tile are the same value, and that value immediately follows. Nothing else is stored in the tile (the tile is only Note: If compression is turned OFF for the file, the tile lead byte must be 0x00 or 0x01. If the tile lead byte is 0x02, the tile is compressed and the |
||
|
||
|
If all 4 compression stages are 0x00 (No Compression), the rest of the tile simply consists of uncompressed grid nodes. Each compression stage takes the output of the previous stage as input. The output of a DIFF_ENC, BIAS_ENC, DYN_RAN, PRE_STRIP or POST_STRIP stage is a DIFF_ENC, BIAS_ENC, DYN_RAN, PRE_STRIP or POST_STRIP stream respectively. The output of a ZLIB or JPEG_2000 stage is an unsigned int For example, a tile that is DIFF_ENC encoded and then compressed with ZLIB is stored as a stream with tile lead byte 0x20, followed with the four bytes Multiple Channels This section covers storage of tiles (or blocks and/or bands) in files that have multiple channels. If the file has only one channel, see the previous section. In files that have more than one channel, each tile consists of one or more streams. Each The first byte of a tile channel stream is the TCS lead byte. If the TCS lead byte is 0x00, the tile channel is uncompressed and that lead byte is immediately followed with grid nodes in raster order. Each node is stored intact, with most significant byte first if it is a multi-byte number. If the TCS lead byte is 0x01, all the grid nodes in the tile channel are the same value, and that value immediately follows. Nothing else is stored in the tile channel stream (the TCS is only Note: If compression is turned OFF for the file, the TCS lead byte must be 0x00 or 0x01. If the TCS lead byte is 0x02, the tile channel is compressed and the |
||
|
||
|
If all 4 compression stages are 0x00 (No Compression), the rest of the tile channel stream simply consists of uncompressed grid nodes. Each compression stage takes the output of the previous stage as input. The output of a DIFF_ENC, BIAS_ENC, DYN_RAN, PRE_STRIP or POST_STRIP stage is a DIFF_ENC, BIAS_ENC, DYN_RAN, PRE_STRIP or POST_STRIP stream respectively. The output of a ZLIB or JPEG_2000 stage is an unsigned int For example, a tile channel that is DIFF_ENC encoded and then compressed with ZLIB is stored as a stream with TCS lead byte 0x20, followed with the four bytes |
| Page 9 | ||||
|
|
Copyright © 2008 by 3D Software. All rights reserved. 3D Software, P.O. Box 221190, Sacramento CA 95822 USA www.3DSoftware.com Contact us |
| Tuesday, 06-Jan-2009 02:29:17 GMT |