Macros | Functions | Variables
vil_nitf2_image.cxx File Reference
#include <cstring>
#include <algorithm>
#include <cstdlib>
#include "vil_nitf2_image.h"
#include <cassert>
#include <vil/vil_stream_fstream.h>
#include <vil/vil_image_view.h>
#include <vil/vil_property.h>
#include <vil/vil_config.h>
#include "vil_nitf2_data_mask_table.h"
#include "vil_nitf2_des.h"

Go to the source code of this file.

Macros

#define GET_BLOCK_CASE(FORMAT, T)
 

Functions

void compute_block_and_offset (unsigned j0, unsigned long block_size, unsigned int &block, unsigned int &offset)
 
template<class T >
vil_memory_chunk_sptr maybe_byte_align_data (vil_memory_chunk_sptr in_data, unsigned int num_samples, unsigned int in_bits_per_sample, T)
 
template<>
vil_memory_chunk_sptr maybe_byte_align_data< float > (vil_memory_chunk_sptr in_data, unsigned int, unsigned int, float)
 
template<>
vil_memory_chunk_sptr maybe_byte_align_data< double > (vil_memory_chunk_sptr in_data, unsigned int, unsigned int, double)
 
template<>
vil_memory_chunk_sptr maybe_byte_align_data< std::complex< float > > (vil_memory_chunk_sptr in_data, unsigned int, unsigned int, std::complex< float >)
 
template<class T >
void right_justify (T *data, unsigned int num_samples, unsigned int bitsToMove)
 This function handles the case where the actual bits per pixel per band is less then the actual bpppb AND where the data is std::left justified. More...
 
template<>
void right_justify< bool > (bool *, unsigned int, unsigned int)
 
template<>
void right_justify< float > (float *, unsigned int, unsigned int)
 
template<>
void right_justify< double > (double *, unsigned int, unsigned int)
 
template<>
void right_justify< std::complex< float > > (std::complex< float > *, unsigned int, unsigned int)
 
template<class T >
unsigned int get_index (T in_val)
 
template<>
unsigned int get_index< bool > (bool in_val)
 
template<class T >
vil_image_view_base_sptr get_block_vcl_internal (vil_pixel_format pix_format, vil_memory_chunk_sptr image_memory, unsigned int pixels_per_block_x, unsigned int pixels_per_block_y, unsigned int nplanes, unsigned int i_step, unsigned int j_step, unsigned int plane_step, bool need_to_right_justify, unsigned int extra_bits, unsigned int bits_per_pixel_per_band, bool data_is_all_blank, const vil_nitf2_image_subheader *, T dummy)
 
template<>
bool * byte_align_data< bool > (bool *in_data, unsigned int num_samples, unsigned int in_bits_per_sample, bool *out_data)
 

Variables

int debug_level = 0
 

Macro Definition Documentation

◆ GET_BLOCK_CASE

#define GET_BLOCK_CASE (   FORMAT,
 
)
Value:
case FORMAT:{ \
T t= (T)0; \
FORMAT, image_memory, size_block_i(),size_block_j(), nplanes(),\
i_step, j_step, plane_step, need_to_right_justify, extra_bits, bits_per_pixel_per_band,\
data_is_all_blank, current_image_header(), t);\
} break
vil_image_view_base_sptr get_block_vcl_internal(vil_pixel_format pix_format, vil_memory_chunk_sptr image_memory, unsigned int pixels_per_block_x, unsigned int pixels_per_block_y, unsigned int nplanes, unsigned int i_step, unsigned int j_step, unsigned int plane_step, bool need_to_right_justify, unsigned int extra_bits, unsigned int bits_per_pixel_per_band, bool data_is_all_blank, const vil_nitf2_image_subheader *, T dummy)

Function Documentation

◆ byte_align_data< bool >()

template<>
bool* byte_align_data< bool > ( bool *  in_data,
unsigned int  num_samples,
unsigned int  in_bits_per_sample,
bool *  out_data 
)

Definition at line 794 of file vil_nitf2_image.cxx.

◆ compute_block_and_offset()

void compute_block_and_offset ( unsigned  j0,
unsigned long  block_size,
unsigned int &  block,
unsigned int &  offset 
)

Definition at line 467 of file vil_nitf2_image.cxx.

◆ get_block_vcl_internal()

template<class T >
vil_image_view_base_sptr get_block_vcl_internal ( vil_pixel_format  pix_format,
vil_memory_chunk_sptr  image_memory,
unsigned int  pixels_per_block_x,
unsigned int  pixels_per_block_y,
unsigned int  nplanes,
unsigned int  i_step,
unsigned int  j_step,
unsigned int  plane_step,
bool  need_to_right_justify,
unsigned int  extra_bits,
unsigned int  bits_per_pixel_per_band,
bool  data_is_all_blank,
const vil_nitf2_image_subheader ,
dummy 
)

Definition at line 601 of file vil_nitf2_image.cxx.

◆ get_index()

template<class T >
unsigned int get_index ( in_val)

Definition at line 594 of file vil_nitf2_image.cxx.

◆ get_index< bool >()

template<>
unsigned int get_index< bool > ( bool  in_val)

Definition at line 597 of file vil_nitf2_image.cxx.

◆ maybe_byte_align_data()

template<class T >
vil_memory_chunk_sptr maybe_byte_align_data ( vil_memory_chunk_sptr  in_data,
unsigned int  num_samples,
unsigned int  in_bits_per_sample,
 
)

Definition at line 547 of file vil_nitf2_image.cxx.

◆ maybe_byte_align_data< double >()

template<>
vil_memory_chunk_sptr maybe_byte_align_data< double > ( vil_memory_chunk_sptr  in_data,
unsigned int  ,
unsigned int  ,
double   
)

Definition at line 563 of file vil_nitf2_image.cxx.

◆ maybe_byte_align_data< float >()

template<>
vil_memory_chunk_sptr maybe_byte_align_data< float > ( vil_memory_chunk_sptr  in_data,
unsigned int  ,
unsigned int  ,
float   
)

Definition at line 559 of file vil_nitf2_image.cxx.

◆ maybe_byte_align_data< std::complex< float > >()

template<>
vil_memory_chunk_sptr maybe_byte_align_data< std::complex< float > > ( vil_memory_chunk_sptr  in_data,
unsigned int  ,
unsigned int  ,
std::complex< float >   
)

Definition at line 567 of file vil_nitf2_image.cxx.

◆ right_justify()

template<class T >
void right_justify ( T *  data,
unsigned int  num_samples,
unsigned int  bitsToMove 
)

This function handles the case where the actual bits per pixel per band is less then the actual bpppb AND where the data is std::left justified.

This shifts the data so that it is right justified. As of now, this function is untests as I don't have any std::left justified data (the NITF spec discourages using it – probably because it is such a PITA)

Definition at line 579 of file vil_nitf2_image.cxx.

◆ right_justify< bool >()

template<>
void right_justify< bool > ( bool *  ,
unsigned int  ,
unsigned int   
)

Definition at line 587 of file vil_nitf2_image.cxx.

◆ right_justify< double >()

template<>
void right_justify< double > ( double *  ,
unsigned int  ,
unsigned int   
)

Definition at line 589 of file vil_nitf2_image.cxx.

◆ right_justify< float >()

template<>
void right_justify< float > ( float *  ,
unsigned int  ,
unsigned int   
)

Definition at line 588 of file vil_nitf2_image.cxx.

◆ right_justify< std::complex< float > >()

template<>
void right_justify< std::complex< float > > ( std::complex< float > *  ,
unsigned int  ,
unsigned int   
)

Definition at line 590 of file vil_nitf2_image.cxx.

Variable Documentation

◆ debug_level

int debug_level = 0

Definition at line 28 of file vil_nitf2_image.cxx.