|
For writing images in basic TIFF format. Reading not supported currently. More...
#include <FileTIFF.h>
Public Types | |
typedef drain::SingleFlagger< unsigned int >::dict_t | dict_t |
Public Member Functions | |
FileTIFF (const std::string &path="", const std::string &mode="w") | |
virtual void | open (const std::string &path, const std::string &mode="w") |
virtual bool | isOpen () const |
virtual void | close () |
int | setField (int tag, const std::string &value) |
template<class T > | |
int | setField (int tag, const std::vector< T > &value) |
template<class T > | |
int | setField (int tag, T value) |
void | useDefaultTileSize () |
void | setTileSize (int tileWidth, int tileHeight=0) |
void | setTime (const drain::Time &time) |
void | setDefaults () |
void | writeImageData (const drain::image::Image &src) |
Static Public Member Functions | |
static const dict_t & | getCompressionDict () |
static void | write (const std::string &path, const drain::image::Image &src) |
Default implementation. More... | |
Static Public Attributes | |
static const drain::FileInfo | fileInfo |
static dict_t::value_t | defaultCompression |
static drain::Frame2D< int > | defaultTile |
Protected Attributes | |
TIFF * | tif |
drain::Frame2D< int > | tile |
For writing images in basic TIFF format. Reading not supported currently.
|
static |
Default implementation.
Practically, on should develop own method for adding metadata.
Writes drain::Image to a png image file applying G,GA, RGB or RGBA color model. Writes in 8 or 16 bits, according to template class. Floating point images will be scaled as 16 bit integral (unsigned short int).
void writeImageData | ( | const drain::image::Image & | src | ) |
The number of components per pixel. SamplesPerPixel is usually 1 for bilevel, grayscale, and palette-color images. SamplesPerPixel is usually 3 for RGB images. https://www.awaresystems.be/imaging/tiff/tifftags/samplesperpixel.html
current tile-widths
Address each ŕow directly
Copy each ŕow to buffer