Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
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>

Public Member Functions

 vil_nitf2_data_mask_table (unsigned int numBlocksX, unsigned int numBlocksY, unsigned int numBands, const std::string &imode)
 
bool parse (vil_stream *stream)
 
bool has_offset_table () const
 If this function returns true, then you may call. More...
 
bool has_pad_pixel_table () const
 If this function returns true, then you may call. More...
 
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. More...
 
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 More...
 
vxl_uint_32 pad_pixel (unsigned int block_x, unsigned int block_y, int band) const
 band argument is ignored if imode != "S"... More...
 
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
 
std::vector< std::vector< std::vector< vxl_uint_32 > > > BMR_n_BND_m
 
std::vector< std::vector< std::vector< vxl_uint_32 > > > TMR_n_BND_m
 
unsigned int num_blocks_x
 
unsigned int num_blocks_y
 
unsigned int num_bands
 
std::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 24 of file vil_nitf2_data_mask_table.h.

Constructor & Destructor Documentation

◆ vil_nitf2_data_mask_table()

vil_nitf2_data_mask_table::vil_nitf2_data_mask_table ( unsigned int  numBlocksX,
unsigned int  numBlocksY,
unsigned int  numBands,
const std::string &  imode 
)

Definition at line 15 of file vil_nitf2_data_mask_table.cxx.

Member Function Documentation

◆ block_band_has_pad()

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 213 of file vil_nitf2_data_mask_table.cxx.

◆ block_band_offset()

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 111 of file vil_nitf2_data_mask_table.cxx.

◆ block_band_present()

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 202 of file vil_nitf2_data_mask_table.cxx.

◆ blocked_image_data_offset()

vxl_uint_32 vil_nitf2_data_mask_table::blocked_image_data_offset ( ) const

Definition at line 106 of file vil_nitf2_data_mask_table.cxx.

◆ has_offset_table()

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 32 of file vil_nitf2_data_mask_table.h.

◆ has_pad_pixel_table()

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 35 of file vil_nitf2_data_mask_table.h.

◆ maybe_endian_swap() [1/2]

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

Definition at line 172 of file vil_nitf2_data_mask_table.cxx.

◆ maybe_endian_swap() [2/2]

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

Definition at line 184 of file vil_nitf2_data_mask_table.cxx.

◆ pad_pixel()

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 124 of file vil_nitf2_data_mask_table.cxx.

◆ parse()

bool vil_nitf2_data_mask_table::parse ( vil_stream stream)

Definition at line 24 of file vil_nitf2_data_mask_table.cxx.

Member Data Documentation

◆ BMR_n_BND_m

std::vector< std::vector< std::vector< vxl_uint_32 > > > vil_nitf2_data_mask_table::BMR_n_BND_m
protected

Definition at line 79 of file vil_nitf2_data_mask_table.h.

◆ BMRLNTH

vxl_uint_16 vil_nitf2_data_mask_table::BMRLNTH
protected

Definition at line 63 of file vil_nitf2_data_mask_table.h.

◆ i_mode

std::string vil_nitf2_data_mask_table::i_mode
protected

Definition at line 88 of file vil_nitf2_data_mask_table.h.

◆ IMDATOFF

vxl_uint_32 vil_nitf2_data_mask_table::IMDATOFF
protected

Definition at line 61 of file vil_nitf2_data_mask_table.h.

◆ num_bands

unsigned int vil_nitf2_data_mask_table::num_bands
protected

Definition at line 87 of file vil_nitf2_data_mask_table.h.

◆ num_blocks_x

unsigned int vil_nitf2_data_mask_table::num_blocks_x
protected

Definition at line 85 of file vil_nitf2_data_mask_table.h.

◆ num_blocks_y

unsigned int vil_nitf2_data_mask_table::num_blocks_y
protected

Definition at line 86 of file vil_nitf2_data_mask_table.h.

◆ TMR_n_BND_m

std::vector< std::vector< std::vector< vxl_uint_32 > > > vil_nitf2_data_mask_table::TMR_n_BND_m
protected

Definition at line 83 of file vil_nitf2_data_mask_table.h.

◆ TMRLNTH

vxl_uint_16 vil_nitf2_data_mask_table::TMRLNTH
protected

Definition at line 65 of file vil_nitf2_data_mask_table.h.

◆ TPXCD

vxl_uint_32 vil_nitf2_data_mask_table::TPXCD
protected

Definition at line 73 of file vil_nitf2_data_mask_table.h.

◆ TPXCDLNTH

vxl_uint_16 vil_nitf2_data_mask_table::TPXCDLNTH
protected

Definition at line 67 of file vil_nitf2_data_mask_table.h.


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