Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vil_nitf2_image.cxx File Reference


Detailed Description

Definition in file vil_nitf2_image.cxx.

#include "vil_nitf2_image.h"
#include <vcl_cassert.h>
#include <vcl_cstring.h>
#include <vcl_algorithm.h>
#include <vil/vil_stream_fstream.h>
#include <vil/vil_image_view.h>
#include <vil/vil_property.h>
#include "vil_nitf2_data_mask_table.h"
#include "vil_nitf2_des.h"

Go to the source code of this file.

Defines

#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< vcl_complex< float > > (vil_memory_chunk_sptr in_data, unsigned int, unsigned int, vcl_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 vcl_left justified.
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< vcl_complex< float > > (vcl_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


Define Documentation

#define GET_BLOCK_CASE FORMAT,
 ) 
 

Value:

case FORMAT:{ \
    T t= (T)0; \
    return get_block_vcl_internal(\
       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


Function Documentation

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

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

Definition at line 448 of file vil_nitf2_image.cxx.

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 577 of file vil_nitf2_image.cxx.

template<class T>
unsigned int get_index in_val  ) 
 

Definition at line 570 of file vil_nitf2_image.cxx.

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

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 523 of file vil_nitf2_image.cxx.

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< float > vil_memory_chunk_sptr  in_data,
unsigned  int,
unsigned  int,
float 
 

template<>
vil_memory_chunk_sptr maybe_byte_align_data< vcl_complex< float > > vil_memory_chunk_sptr  in_data,
unsigned  int,
unsigned  int,
vcl_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 vcl_left justified.

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

Definition at line 555 of file vil_nitf2_image.cxx.

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

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

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

template<>
void right_justify< vcl_complex< float > > vcl_complex< float > *  ,
unsigned  int,
unsigned  int
 


Variable Documentation

int debug_level = 0
 

Definition at line 23 of file vil_nitf2_image.cxx.


Generated on Thu Jan 10 14:40:02 2008 for core/vil by  doxygen 1.4.4