#include "vil_nitf2_image.h"
#include <vcl_cassert.h>
#include <vcl_cstring.h>
#include <vcl_algorithm.h>
#include <vcl_cstdlib.h>
#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.
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 |
Definition in file vil_nitf2_image.cxx.
#define GET_BLOCK_CASE | ( | FORMAT, | |
T | |||
) |
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
bool* byte_align_data< bool > | ( | bool * | in_data, |
unsigned int | num_samples, | ||
unsigned int | in_bits_per_sample, | ||
bool * | out_data | ||
) |
Definition at line 788 of file vil_nitf2_image.cxx.
void compute_block_and_offset | ( | unsigned | j0, |
unsigned long | block_size, | ||
unsigned int & | block, | ||
unsigned int & | offset | ||
) |
Definition at line 464 of file vil_nitf2_image.cxx.
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 | ||
) |
Definition at line 595 of file vil_nitf2_image.cxx.
unsigned int get_index | ( | T | in_val | ) |
Definition at line 588 of file vil_nitf2_image.cxx.
unsigned int get_index< bool > | ( | bool | in_val | ) |
Definition at line 591 of file vil_nitf2_image.cxx.
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 | |||
) |
Definition at line 541 of file vil_nitf2_image.cxx.
vil_memory_chunk_sptr maybe_byte_align_data< double > | ( | vil_memory_chunk_sptr | in_data, |
unsigned | int, | ||
unsigned | int, | ||
double | |||
) |
Definition at line 557 of file vil_nitf2_image.cxx.
vil_memory_chunk_sptr maybe_byte_align_data< float > | ( | vil_memory_chunk_sptr | in_data, |
unsigned | int, | ||
unsigned | int, | ||
float | |||
) |
Definition at line 553 of file vil_nitf2_image.cxx.
vil_memory_chunk_sptr maybe_byte_align_data< vcl_complex< float > > | ( | vil_memory_chunk_sptr | in_data, |
unsigned | int, | ||
unsigned | int, | ||
vcl_complex< float > | |||
) |
Definition at line 561 of file vil_nitf2_image.cxx.
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 is 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 573 of file vil_nitf2_image.cxx.
void right_justify< bool > | ( | bool * | , |
unsigned | int, | ||
unsigned | int | ||
) |
Definition at line 581 of file vil_nitf2_image.cxx.
void right_justify< double > | ( | double * | , |
unsigned | int, | ||
unsigned | int | ||
) |
Definition at line 583 of file vil_nitf2_image.cxx.
void right_justify< float > | ( | float * | , |
unsigned | int, | ||
unsigned | int | ||
) |
Definition at line 582 of file vil_nitf2_image.cxx.
void right_justify< vcl_complex< float > > | ( | vcl_complex< float > * | , |
unsigned | int, | ||
unsigned | int | ||
) |
Definition at line 584 of file vil_nitf2_image.cxx.
int debug_level = 0 |
Definition at line 25 of file vil_nitf2_image.cxx.