Public Member Functions | Static Public Member Functions | Protected Attributes
vil_nitf2_data_mask_table Class Reference

This class is responsible for parsing a NITF 2.1 data mask table. More...

#include <vil_nitf2_data_mask_table.h>

List of all members.

Public Member Functions

 vil_nitf2_data_mask_table (unsigned int numBlocksX, unsigned int numBlocksY, unsigned int numBands, const vcl_string imode)
bool parse (vil_stream *stream)
bool has_offset_table () const
 If this function returns true, then you may call.
bool has_pad_pixel_table () const
 If this function returns true, then you may call.
vxl_uint_32 blocked_image_data_offset () const
vxl_uint_32 block_band_present (unsigned int block_x, unsigned int block_y, int band=-1) const
 Returns true iff this block is present in the data. False otherwise.
vxl_uint_32 block_band_offset (unsigned int block_x, unsigned int block_y, int band=-1) const
 if imode == "S", then the band argument is used and I will return the offset to 'band' if imode != "S", then the band argument is ignored, and I will return the offset to the beginning of the requested block
vxl_uint_32 pad_pixel (unsigned int block_x, unsigned int block_y, int band) const
 band argument is ignored if imode != "S"...
vxl_uint_32 block_band_has_pad (unsigned int block_x, unsigned int block_y, int band=-1) const

Static Public Member Functions

static void maybe_endian_swap (char *a, unsigned sizeOfAInBytes, vil_pixel_format pixFormat)
static void maybe_endian_swap (char *a, unsigned sizeOfAInBytes, unsigned int bytesPerSample)

Protected Attributes

vxl_uint_32 IMDATOFF
vxl_uint_16 BMRLNTH
vxl_uint_16 TMRLNTH
vxl_uint_16 TPXCDLNTH
vxl_uint_32 TPXCD
vcl_vector< vcl_vector
< vcl_vector< vxl_uint_32 > > > 
BMR_n_BND_m
vcl_vector< vcl_vector
< vcl_vector< vxl_uint_32 > > > 
TMR_n_BND_m
unsigned int num_blocks_x
unsigned int num_blocks_y
unsigned int num_bands
vcl_string i_mode

Detailed Description

This class is responsible for parsing a NITF 2.1 data mask table.

When present, a vil_nitf2_image_subheader() will use this class to extract the table from the file. It reads a vil_stream, via the parse() method and will return false if it failed.

Definition at line 21 of file vil_nitf2_data_mask_table.h.


Constructor & Destructor Documentation

vil_nitf2_data_mask_table::vil_nitf2_data_mask_table ( unsigned int  numBlocksX,
unsigned int  numBlocksY,
unsigned int  numBands,
const vcl_string  imode 
)

Definition at line 12 of file vil_nitf2_data_mask_table.cxx.


Member Function Documentation

vxl_uint_32 vil_nitf2_data_mask_table::block_band_has_pad ( unsigned int  block_x,
unsigned int  block_y,
int  band = -1 
) const

Definition at line 210 of file vil_nitf2_data_mask_table.cxx.

vxl_uint_32 vil_nitf2_data_mask_table::block_band_offset ( unsigned int  block_x,
unsigned int  block_y,
int  band = -1 
) const

if imode == "S", then the band argument is used and I will return the offset to 'band' if imode != "S", then the band argument is ignored, and I will return the offset to the beginning of the requested block

Definition at line 108 of file vil_nitf2_data_mask_table.cxx.

vxl_uint_32 vil_nitf2_data_mask_table::block_band_present ( unsigned int  block_x,
unsigned int  block_y,
int  band = -1 
) const

Returns true iff this block is present in the data. False otherwise.

If this returns false, then there is not sense calling block_band_offset for this band/block combination. It will return 0xFFFFFFFF. If this returns false, then this entire block/band is considered to be blank.

Definition at line 199 of file vil_nitf2_data_mask_table.cxx.

vxl_uint_32 vil_nitf2_data_mask_table::blocked_image_data_offset ( ) const

Definition at line 103 of file vil_nitf2_data_mask_table.cxx.

bool vil_nitf2_data_mask_table::has_offset_table ( ) const [inline]

If this function returns true, then you may call.

See also:
block_band_offset().

Definition at line 29 of file vil_nitf2_data_mask_table.h.

bool vil_nitf2_data_mask_table::has_pad_pixel_table ( ) const [inline]

If this function returns true, then you may call.

See also:
pad_pixel().

Definition at line 32 of file vil_nitf2_data_mask_table.h.

void vil_nitf2_data_mask_table::maybe_endian_swap ( char *  a,
unsigned  sizeOfAInBytes,
vil_pixel_format  pixFormat 
) [static]

Definition at line 169 of file vil_nitf2_data_mask_table.cxx.

void vil_nitf2_data_mask_table::maybe_endian_swap ( char *  a,
unsigned  sizeOfAInBytes,
unsigned int  bytesPerSample 
) [static]

Definition at line 181 of file vil_nitf2_data_mask_table.cxx.

vxl_uint_32 vil_nitf2_data_mask_table::pad_pixel ( unsigned int  block_x,
unsigned int  block_y,
int  band 
) const

band argument is ignored if imode != "S"...

i.e. all bands have the same pad pixel in that case

Definition at line 121 of file vil_nitf2_data_mask_table.cxx.

bool vil_nitf2_data_mask_table::parse ( vil_stream stream)

Definition at line 21 of file vil_nitf2_data_mask_table.cxx.


Member Data Documentation

vcl_vector< vcl_vector< vcl_vector< vxl_uint_32 > > > vil_nitf2_data_mask_table::BMR_n_BND_m [protected]

Definition at line 76 of file vil_nitf2_data_mask_table.h.

vxl_uint_16 vil_nitf2_data_mask_table::BMRLNTH [protected]

Definition at line 60 of file vil_nitf2_data_mask_table.h.

vcl_string vil_nitf2_data_mask_table::i_mode [protected]

Definition at line 85 of file vil_nitf2_data_mask_table.h.

vxl_uint_32 vil_nitf2_data_mask_table::IMDATOFF [protected]

Definition at line 58 of file vil_nitf2_data_mask_table.h.

unsigned int vil_nitf2_data_mask_table::num_bands [protected]

Definition at line 84 of file vil_nitf2_data_mask_table.h.

unsigned int vil_nitf2_data_mask_table::num_blocks_x [protected]

Definition at line 82 of file vil_nitf2_data_mask_table.h.

unsigned int vil_nitf2_data_mask_table::num_blocks_y [protected]

Definition at line 83 of file vil_nitf2_data_mask_table.h.

vcl_vector< vcl_vector< vcl_vector< vxl_uint_32 > > > vil_nitf2_data_mask_table::TMR_n_BND_m [protected]

Definition at line 80 of file vil_nitf2_data_mask_table.h.

vxl_uint_16 vil_nitf2_data_mask_table::TMRLNTH [protected]

Definition at line 62 of file vil_nitf2_data_mask_table.h.

vxl_uint_32 vil_nitf2_data_mask_table::TPXCD [protected]

Definition at line 70 of file vil_nitf2_data_mask_table.h.

vxl_uint_16 vil_nitf2_data_mask_table::TPXCDLNTH [protected]

Definition at line 64 of file vil_nitf2_data_mask_table.h.


The documentation for this class was generated from the following files: