reader for strip data in a TIFF file
#include <strip_reader.hpp>
|
| template<typename IT , typename CTYPE > |
| void | _read_interlace (size_t c, std::ifstream &stream, CTYPE &data) const |
| | template to read interlace data More...
|
| |
| pni::io::tiff::strip_reader::strip_reader |
( |
| ) |
|
| pni::io::tiff::strip_reader::strip_reader |
( |
const strip_reader & |
r | ) |
|
| pni::io::tiff::strip_reader::strip_reader |
( |
strip_reader && |
r | ) |
|
| pni::io::tiff::strip_reader::strip_reader |
( |
const std::vector< size_t > & |
offsets, |
|
|
const std::vector< size_t > & |
byte_counts, |
|
|
const std::vector< size_t > & |
bits_per_channel, |
|
|
const std::vector< pni::core::type_id_t > & |
channel_types |
|
) |
| |
Standard constructor for this class.
- Parameters
-
| offsets | vector with strip offsets |
| byte_counts | vector with byte counts for every strip |
| bits_per_channel | vector with number of pits per channel |
| channel_types | vector with TypeIDs for each channel |
| pni::io::tiff::strip_reader::~strip_reader |
( |
| ) |
|
template<typename IT , typename CTYPE >
| void pni::io::tiff::strip_reader::_read_interlace |
( |
size_t |
c, |
|
|
std::ifstream & |
stream, |
|
|
CTYPE & |
data |
|
) |
| const |
|
private |
This template method reads image data distributed over several strips. The first template parameter determines the type of the image data to read while T is the type of the target array. The remaining template parameters belong to the array itself and are not of importance here.
- Template Parameters
-
| IT | data type used in the image file |
| CTYPE | container type where the data shoule be stored |
- Parameters
-
| c | number of the channel to read |
| stream | input stream from which to read data |
| data | target container where to store the data |
This static factory method creates a StripReader object from the IFD of an image and its ImageInfo structure.
- Parameters
-
| stream | input stream from which to read data |
| image_dir | IFD of the image for which the reader should be created |
| info | ImageInfo object for the image |
- Returns
- instance of type StripReader
template<typename CTYPE >
| void pni::io::tiff::strip_reader::read |
( |
size_t |
c, |
|
|
std::ifstream & |
stream, |
|
|
CTYPE & |
data |
|
) |
| |
|
inline |
Template method to read image data stored as strips from a file. The template parameter determines the type of the output array. The method assumes that the shape of the array is already set properly.
- Exceptions
-
| type_error | if the image data type is unkown |
- Parameters
-
| c | number of the channel to read |
| stream | input stream from which to read data |
| data | reference to the container where to store the data |
| std::ostream& operator<< |
( |
std::ostream & |
o, |
|
|
const strip_reader & |
r |
|
) |
| |
|
friend |
| std::vector<size_t> pni::io::tiff::strip_reader::_bits_per_channel |
|
private |
| std::vector<size_t> pni::io::tiff::strip_reader::_byte_cnts |
|
private |
| std::vector<pni::core::type_id_t> pni::io::tiff::strip_reader::_channel_types |
|
private |
| std::vector<size_t> pni::io::tiff::strip_reader::_offsets |
|
private |
The documentation for this class was generated from the following files: