tiffUtils.h File Reference

Some functions to create tiff images with masks. More...

#include <vigra/tiff.hxx>
#include <vigra/imageinfo.hxx>
#include <vigra/transformimage.hxx>
#include <vigra/functorexpression.hxx>
#include <vigra_ext/FunctorAccessor.h>
#include <tiffio.h>

Include dependency graph for tiffUtils.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Namespaces

namespace  vigra_ext

Classes

struct  vigra_ext::CreateAlphaTiffImage< vigra::RGBValue< unsigned char > >
struct  vigra_ext::CreateAlphaTiffImage< vigra::RGBValue< short > >
struct  vigra_ext::CreateAlphaTiffImage< vigra::RGBValue< unsigned short > >
struct  vigra_ext::CreateAlphaTiffImage< vigra::RGBValue< int > >
struct  vigra_ext::CreateAlphaTiffImage< vigra::RGBValue< unsigned int > >
struct  vigra_ext::CreateAlphaTiffImage< vigra::RGBValue< float > >
struct  vigra_ext::CreateAlphaTiffImage< vigra::RGBValue< double > >
struct  vigra_ext::CreateAlphaTiffImage< unsigned char >
struct  vigra_ext::CreateAlphaTiffImage< short >
struct  vigra_ext::CreateAlphaTiffImage< unsigned short >
struct  vigra_ext::CreateAlphaTiffImage< int >
struct  vigra_ext::CreateAlphaTiffImage< unsigned int >
struct  vigra_ext::CreateAlphaTiffImage< float >
struct  vigra_ext::CreateAlphaTiffImage< double >

Functions

void createTiffDirectory (vigra::TiffImage *tiff, const std::string &pagename, const std::string &documentname, const std::string comp, uint16 page, uint16 nImg, vigra::Diff2D offset, vigra::Size2D fullSize, const vigra::ImageExportInfo::ICCProfile &icc)
 write a new Tiff directory, for a new layer
template<class ImageIterator, class ImageAccessor, class AlphaIterator, class AlphaAccessor>
void createScalarATiffImage (ImageIterator upperleft, ImageIterator lowerright, ImageAccessor a, AlphaIterator alphaUpperleft, AlphaAccessor alphaA, vigra::TiffImage *tiff, int sampleformat)
 internal function to create a scalar tiff image with alpha channel
template<class ImageIterator, class ImageAccessor, class AlphaIterator, class AlphaAccessor>
void createRGBATiffImage (ImageIterator upperleft, ImageIterator lowerright, ImageAccessor a, AlphaIterator alphaUpperleft, AlphaAccessor alphaA, vigra::TiffImage *tiff, int sampleformat)
 internal function to create a RGB tiff image with alpha channel
template<class ImageIterator, class ImageAccessor, class AlphaIterator, class AlphaAccessor>
void createAlphaTiffImage (ImageIterator upperleft, ImageIterator lowerright, ImageAccessor a, AlphaIterator alphaUpperleft, AlphaAccessor alphaA, vigra::TiffImage *tiff)
template<class ImageIterator, class ImageAccessor, class AlphaIterator, class BImageAccessor>
void createAlphaTiffImage (vigra::triple< ImageIterator, ImageIterator, ImageAccessor > src, vigra::pair< AlphaIterator, BImageAccessor > alpha, vigra::TiffImage *tiff)
 save an image and an alpha channel to a tiff file.


Detailed Description

Some functions to create tiff images with masks.

Author:
Pablo d'Angelo <pablo.dangelo@web.de>
$Id$

This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU General Public License along with this software; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Definition in file tiffUtils.h.


Function Documentation

template<class ImageIterator, class ImageAccessor, class AlphaIterator, class BImageAccessor>
void createAlphaTiffImage vigra::triple< ImageIterator, ImageIterator, ImageAccessor >  src,
vigra::pair< AlphaIterator, BImageAccessor >  alpha,
vigra::TiffImage *  tiff
 

save an image and an alpha channel to a tiff file.

so far, only gray and RGB images are supported. the alpha channel is stored with the same type as the color channels.

If the alpha channels uses a different type as the color channel (for example 8 bit alpha channel, float color channels), they are converted to a sensible value. (0..1 for float alpha).

Definition at line 544 of file tiffUtils.h.

template<class ImageIterator, class ImageAccessor, class AlphaIterator, class AlphaAccessor>
void createAlphaTiffImage ImageIterator  upperleft,
ImageIterator  lowerright,
ImageAccessor  a,
AlphaIterator  alphaUpperleft,
AlphaAccessor  alphaA,
vigra::TiffImage *  tiff
[inline]
 

Definition at line 520 of file tiffUtils.h.

Referenced by HuginBase::Nona::TiffMultiLayerRemapper< ImageType, AlphaImageType >::saveRemapped().

template<class ImageIterator, class ImageAccessor, class AlphaIterator, class AlphaAccessor>
void createRGBATiffImage ImageIterator  upperleft,
ImageIterator  lowerright,
ImageAccessor  a,
AlphaIterator  alphaUpperleft,
AlphaAccessor  alphaA,
vigra::TiffImage *  tiff,
int  sampleformat
 

internal function to create a RGB tiff image with alpha channel

Definition at line 191 of file tiffUtils.h.

Referenced by vigra_ext::CreateAlphaTiffImage< vigra::RGBValue< double > >::exec(), vigra_ext::CreateAlphaTiffImage< vigra::RGBValue< float > >::exec(), vigra_ext::CreateAlphaTiffImage< vigra::RGBValue< unsigned int > >::exec(), vigra_ext::CreateAlphaTiffImage< vigra::RGBValue< int > >::exec(), vigra_ext::CreateAlphaTiffImage< vigra::RGBValue< unsigned short > >::exec(), vigra_ext::CreateAlphaTiffImage< vigra::RGBValue< short > >::exec(), and vigra_ext::CreateAlphaTiffImage< vigra::RGBValue< unsigned char > >::exec().

template<class ImageIterator, class ImageAccessor, class AlphaIterator, class AlphaAccessor>
void createScalarATiffImage ImageIterator  upperleft,
ImageIterator  lowerright,
ImageAccessor  a,
AlphaIterator  alphaUpperleft,
AlphaAccessor  alphaA,
vigra::TiffImage *  tiff,
int  sampleformat
[static]
 

internal function to create a scalar tiff image with alpha channel

Definition at line 130 of file tiffUtils.h.

Referenced by vigra_ext::CreateAlphaTiffImage< double >::exec(), vigra_ext::CreateAlphaTiffImage< float >::exec(), vigra_ext::CreateAlphaTiffImage< unsigned int >::exec(), vigra_ext::CreateAlphaTiffImage< int >::exec(), vigra_ext::CreateAlphaTiffImage< unsigned short >::exec(), vigra_ext::CreateAlphaTiffImage< short >::exec(), and vigra_ext::CreateAlphaTiffImage< unsigned char >::exec().

void createTiffDirectory vigra::TiffImage *  tiff,
const std::string pagename,
const std::string documentname,
const std::string  comp,
uint16  page,
uint16  nImg,
vigra::Diff2D  offset,
vigra::Size2D  fullSize,
const vigra::ImageExportInfo::ICCProfile &  icc
[inline]
 

write a new Tiff directory, for a new layer

Parameters:
tiff tiff struct
pagename pagename for tiff layer
documentname for tiff layer
page page number
nImg total number of pages, needed for "image page/nImg" display
offset layer offset in pixels (must be positive)

Definition at line 57 of file tiffUtils.h.

References DEBUG_ASSERT.

Referenced by HuginBase::Nona::TiffMultiLayerRemapper< ImageType, AlphaImageType >::saveRemapped().


Generated on Fri Sep 19 01:25:42 2014 for Hugintrunk by  doxygen 1.3.9.1