Classes | Defines | Functions | Variables
core/vil/file_formats/vil_tiff.cxx File Reference

See vil_tiff.h for a description of this file. More...

#include "vil_tiff.h"
#include <vcl_cassert.h>
#include <vcl_cstring.h>
#include <vcl_iostream.h>
#include <vcl_algorithm.h>
#include <vcl_sstream.h>
#include <vil/vil_stream.h>
#include <vil/vil_property.h>
#include <vil/vil_image_view.h>
#include <vil/vil_memory_chunk.h>
#include <vil/vil_copy.h>
#include <vil/vil_image_list.h>
#include "vil_tiff_header.h"
#include <vil/vil_exception.h>

Go to the source code of this file.

Classes

struct  tif_stream_structures

Defines

#define GET_BLOCK_CASE(FORMAT, T)
#define GET_LINE_CASE(FORMAT, T)
#define GET_VIEW_PTR(FORMAT, T)

Functions

bool vil_tiff_file_format_probe (vil_stream *is)
template<>
bool * tiff_byte_align_data< bool > (bool *in_data, unsigned num_samples, unsigned in_bits_per_sample, bool *out_data)
bool integral_type (unsigned bits_per_sample)
template<class T >
vil_memory_chunk_sptr tiff_maybe_byte_align_data (vil_memory_chunk_sptr in_data, unsigned num_samples, unsigned in_bits_per_sample, unsigned bytes_per_block)
template<>
vil_memory_chunk_sptr tiff_maybe_byte_align_data< float > (vil_memory_chunk_sptr in_data, unsigned, unsigned, unsigned)
template<>
vil_memory_chunk_sptr tiff_maybe_byte_align_data< double > (vil_memory_chunk_sptr in_data, unsigned, unsigned, unsigned)

Variables

char const * vil_tiff_format_tag = "tiff"

Detailed Description

See vil_tiff.h for a description of this file.

Author:
awf@robots.ox.ac.uk
    Modifications:
     2001-11-09 K.Y.McGaul  Use dflt value for orientation when it can't be read
     2005-12-xx J.L. Mundy  Essentially a complete rewrite to support blocking.
                            Cleaner struct: hdr params moved to vil_tiff_header
   

Definition in file vil_tiff.cxx.


Define Documentation

#define GET_BLOCK_CASE (   FORMAT,
 
)
Value:
case FORMAT: { \
    vil_image_view_base_sptr view; \
    buf_out = tiff_maybe_byte_align_data<T>(buf, samples_per_block, \
                                            bits_per_sample, \
                                            samples_per_block*vil_pixel_format_sizeof_components(fmt)); \
    view = new vil_image_view<T>(buf_out, reinterpret_cast<T*>(buf_out->data()), \
                                 size_block_i(), size_block_j(), \
                                 spp, spp, size_block_i()*spp, 1); \
    return view; }
#define GET_LINE_CASE (   FORMAT,
 
)
Value:
case FORMAT:\
        out_line_buf = \
          tiff_maybe_byte_align_data<T>(line_buf,\
                                        spl, h_->bits_per_sample.val,\
                                        bytes_expanded_line); \
        break
#define GET_VIEW_PTR (   FORMAT,
 
)
Value:
case FORMAT: { \
    vil_image_view<T> view = static_cast<const vil_image_view<T>& >(im);\
    view_istep = view.istep(); view_jstep = view.jstep(); view_pstep = view.planestep(); \
    view_buf = reinterpret_cast<vxl_byte*>(view.top_left_ptr());\
   } break

Function Documentation

bool integral_type ( unsigned  bits_per_sample)

Definition at line 462 of file vil_tiff.cxx.

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

Definition at line 442 of file vil_tiff.cxx.

template<class T >
vil_memory_chunk_sptr tiff_maybe_byte_align_data ( vil_memory_chunk_sptr  in_data,
unsigned  num_samples,
unsigned  in_bits_per_sample,
unsigned  bytes_per_block 
)

Definition at line 476 of file vil_tiff.cxx.

template<>
vil_memory_chunk_sptr tiff_maybe_byte_align_data< double > ( vil_memory_chunk_sptr  in_data,
unsigned  ,
unsigned  ,
unsigned   
)

Definition at line 512 of file vil_tiff.cxx.

template<>
vil_memory_chunk_sptr tiff_maybe_byte_align_data< float > ( vil_memory_chunk_sptr  in_data,
unsigned  ,
unsigned  ,
unsigned   
)

Definition at line 505 of file vil_tiff.cxx.

bool vil_tiff_file_format_probe ( vil_stream is)

Definition at line 47 of file vil_tiff.cxx.


Variable Documentation

char const* vil_tiff_format_tag = "tiff"

Definition at line 32 of file vil_tiff.cxx.