sif_file Struct Reference

A struct for storing necessary data for the processing of an open file. More...

#include <sif-io.h>


Data Fields

FILE * fp
 The handle to the internal file pointer.
sif_headerheader
 The header corresponding to the target file.
sif_tiletiles
 An array of tiles to store.
sif_meta_data ** meta_data
 The meta-data for the file. This structure is a linked list of (key, value) pairs. Meta-data in SIF can be null-terminated strings or binary data blocks.
int read_only
 A flag indicating whether the file is open in read-only mode.
long * blocks_to_tiles
 An array where the i'th value is the tile index of the tile stored in data block i.
long * dirty_tiles
 An array of booleans where the i'th value is one iff the i'th tile has been written and no uniformity check was made during the write. In this future, the type of the values contained in the array will be changed to char*, pending confirmation that the change does not break regression tests.
void * buffer [2]
 Two buffers with enough memory to each store one block. The number of bytes for one block is computed by,.
LONGLONG base_location
 Stores the byte offset of the first block in the file.
int error
 An error code for the last error that occurred. The value is non-zero if an error occurred during the last sif-io call.
long sys_error_no
 When the C standary library is used, it represents the last errno encountered when executing a libc function in a sif-io function. Otherwise, it represents the WIN32 error code returned by the GetLastErr function.
long units_per_slice
 The number of pixels per band in a tile (slice). This value is simply tile_width * tile_height. The term slice differs slightly from the term band, it is a band within a tile.
long units_per_tile
 The number of pixels per tile. This value is simply the number of units_per_slice times the number of bands in the image. This number is also the number of units in a block.
long header_bytes
 The number of bytes to store the header.
u_char ubuf [8]
 A character buffer with enough bytes to store a 64-bit integer.
long use_file_version
 A integer representing the SIF file version to use when writing the file. This is used to ensure that the file is written with an earlier version so that it can be read by previous versions of this library.
void * simple_region_buffer
 A buffered only used by the SIF "simple" interface for byte swapping prior to writing to a file. It is initially holds the number of bytes needed to store a tile slice but grows as larger regions are written.
long simple_region_bytes
 The size of the simple region buffer (in bytes).
int error_line_no
 The line number of sif-io.c where the last SIF error occurred.


Detailed Description

A struct for storing necessary data for the processing of an open file.

Warning:
Do not modify this data structure directly.


Field Documentation

LONGLONG sif_file::base_location

Stores the byte offset of the first block in the file.

long* sif_file::blocks_to_tiles

An array where the i'th value is the tile index of the tile stored in data block i.

If no tile is stored in data block i, the block is unused, and the corresponding value in this array is set to -1. Unused blocks can be reclaimed for use or truncated when the file is consolidated or defragmented.

void* sif_file::buffer[2]

Two buffers with enough memory to each store one block. The number of bytes for one block is computed by,.

    tile_width * tile_height * n_bands * data_unit_size .

long* sif_file::dirty_tiles

An array of booleans where the i'th value is one iff the i'th tile has been written and no uniformity check was made during the write. In this future, the type of the values contained in the array will be changed to char*, pending confirmation that the change does not break regression tests.

int sif_file::error

An error code for the last error that occurred. The value is non-zero if an error occurred during the last sif-io call.

int sif_file::error_line_no

The line number of sif-io.c where the last SIF error occurred.

FILE* sif_file::fp

The handle to the internal file pointer.

sif_header* sif_file::header

The header corresponding to the target file.

long sif_file::header_bytes

The number of bytes to store the header.

sif_meta_data** sif_file::meta_data

The meta-data for the file. This structure is a linked list of (key, value) pairs. Meta-data in SIF can be null-terminated strings or binary data blocks.

int sif_file::read_only

A flag indicating whether the file is open in read-only mode.

void* sif_file::simple_region_buffer

A buffered only used by the SIF "simple" interface for byte swapping prior to writing to a file. It is initially holds the number of bytes needed to store a tile slice but grows as larger regions are written.

long sif_file::simple_region_bytes

The size of the simple region buffer (in bytes).

long sif_file::sys_error_no

When the C standary library is used, it represents the last errno encountered when executing a libc function in a sif-io function. Otherwise, it represents the WIN32 error code returned by the GetLastErr function.

sif_tile* sif_file::tiles

An array of tiles to store.

u_char sif_file::ubuf[8]

A character buffer with enough bytes to store a 64-bit integer.

long sif_file::units_per_slice

The number of pixels per band in a tile (slice). This value is simply tile_width * tile_height. The term slice differs slightly from the term band, it is a band within a tile.

long sif_file::units_per_tile

The number of pixels per tile. This value is simply the number of units_per_slice times the number of bands in the image. This number is also the number of units in a block.

long sif_file::use_file_version

A integer representing the SIF file version to use when writing the file. This is used to ensure that the file is written with an earlier version so that it can be read by previous versions of this library.


The documentation for this struct was generated from the following file:
Generated on Tue Dec 4 11:02:10 2007 for SIF by  doxygen 1.4.7