utils.h File Reference

functions to manage ROI's More...

#include <hugin_math/hugin_math.h>
#include <vigra/rgbvalue.hxx>
#include <vigra/transformimage.hxx>
#include <cmath>

Include dependency graph for utils.h:

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

Go to the source code of this file.

Namespaces

namespace  vigra
namespace  vigra_ext

Classes

struct  vigra::PromoteTraits< RGBValue< T1, R, G, B >, T2 >
struct  vigra_ext::PointPairT< VALUE >
struct  vigra_ext::ValueTypeTraits< T1 >
struct  vigra_ext::OverlapSizeCounter
 count pixels that are > 0 in both images More...
struct  vigra_ext::NestFunctor< F1, F2 >
 functor to combine two functors: result = f1( f2(v) ) More...
struct  vigra_ext::MaskPixelCounter
 count pixels that are > 0 in a single image More...
struct  vigra_ext::PassThroughFunctor< T >
 does nothing More...
struct  vigra_ext::LinearTransform< DestValueType >
struct  vigra_ext::ApplyLogFunctor
struct  vigra_ext::ApplyGammaFunctor< TIn, TOut >
struct  vigra_ext::ApplyGammaFunctor< vigra::UInt16, vigra::UInt8 >

Defines

#define LUT_TRAITS(T1, S)
 Traits to define the maximum value for all types.
#define VT_TRAITS_VEC(T1)
#define VT_TRAITS(T1)

Typedefs

typedef PointPairT< float > vigra_ext::PointPair
typedef PointPairT< vigra::RGBValue<
float > > 
vigra_ext::PointPairRGB

Functions

 vigra_ext::LUT_TRAITS (unsigned char, UCHAR_MAX)
 vigra_ext::LUT_TRAITS (signed char, SCHAR_MAX)
 vigra_ext::LUT_TRAITS (unsigned short, USHRT_MAX)
 vigra_ext::LUT_TRAITS (signed short, SHRT_MAX)
 vigra_ext::LUT_TRAITS (unsigned int, UINT_MAX)
 vigra_ext::LUT_TRAITS (signed int, INT_MAX)
 vigra_ext::LUT_TRAITS (float, 1.0)
 vigra_ext::LUT_TRAITS (double, 1.0)
double vigra_ext::getMaxValForPixelType (const std::string &v)
 vigra_ext::VT_TRAITS (vigra::UInt8)
 vigra_ext::VT_TRAITS (vigra::Int16)
 vigra_ext::VT_TRAITS (vigra::UInt16)
 vigra_ext::VT_TRAITS (vigra::Int32)
 vigra_ext::VT_TRAITS (vigra::UInt32)
 vigra_ext::VT_TRAITS (float)
 vigra_ext::VT_TRAITS (double)
float vigra_ext::pow (float a, double b)
template<class T, unsigned int R, unsigned int G, unsigned int B>
vigra::RGBValue< T, R, G, B > vigra_ext::pow (vigra::RGBValue< T, R, G, B > const &v, double e)
 component-wise absolute value
template<class V1, unsigned int R, unsigned int G, unsigned int B, class V2>
vigra::RGBValue< V1, R, G,
B > & 
vigra_ext::operator+= (vigra::RGBValue< V1, R, G, B > &l, V2 const &r)
 add a scalar to all components
template<class T, unsigned int RIDX, unsigned int GIDX, unsigned int BIDX>
vigra::RGBValue< T, RIDX,
GIDX, BIDX > 
vigra_ext::log (vigra::RGBValue< T, RIDX, GIDX, BIDX > const &v)
 component-wise logarithm
template<class T, unsigned int RIDX, unsigned int GIDX, unsigned int BIDX>
vigra::RGBValue< T, RIDX,
GIDX, BIDX > 
vigra_ext::log10 (vigra::RGBValue< T, RIDX, GIDX, BIDX > const &v)
 component-wise logarithm
template<class V1, unsigned int R, unsigned int G, unsigned int B, class V2>
vigra::PromoteTraits< vigra::RGBValue<
V1, R, G, B >, V2 >::Promote 
vigra_ext::operator+ (vigra::RGBValue< V1, R, G, B > const &r1, V2 const &r2)
 add a scalar to all components
template<class V, int SIZE, class D1, class D2>
vigra::TinyVector< V, SIZE > vigra_ext::pow (vigra::TinyVector< V, SIZE > const &v, double e)
 Apply pow() function to each vector component.
template<class V, int SIZE, class D1, class D2>
vigra::TinyVector< V, SIZE > vigra_ext::log (vigra::TinyVector< V, SIZE > const &v, double e)
 Apply log() function to each vector component.
template<class V>
vigra_ext::getMaxComponent (vigra::RGBValue< V > const &v)
 get the maximum component of a vector (also works for single pixel types.
template<class V>
vigra_ext::getMaxComponent (V v)
 get the maximum component of a vector (also works for single pixel types.
template<class V>
vigra_ext::getMinComponent (vigra::RGBValue< V > const &v)
 get the maximum component of a vector (also works for single pixel types.
template<class V>
vigra_ext::getMinComponent (V v)
 get the maximum component of a vector (also works for single pixel types.
template<class SrcImageIterator, class SrcAccessor>
void vigra_ext::circularCrop (vigra::triple< SrcImageIterator, SrcImageIterator, SrcAccessor > img, hugin_utils::FDiff2D middle, double radius)
 Apply a circular crop to img.
template<class T>
vigra::NumericTraits< T
>::RealPromote 
vigra_ext::normalizeValue (T v, vigra::VigraTrueType)
 normalize a pixel to 0.
template<class T>
vigra::NumericTraits< T
>::RealPromote 
vigra_ext::normalizeValue (T v, vigra::VigraFalseType)
template<class SrcIterator, class SrcAccessor, class DestIterator, class DestAccessor, class T>
void vigra_ext::applyMapping (vigra::triple< SrcIterator, SrcIterator, SrcAccessor > img, vigra::pair< DestIterator, DestAccessor > dest, T min, T max, int mapping)
template<class SrcImageIterator, class SrcAccessor, class DestImageIterator, class DestAccessor, class Functor>
void vigra_ext::transformImageSpatial (SrcImageIterator src_upperleft, SrcImageIterator src_lowerright, SrcAccessor sa, DestImageIterator dest_upperleft, DestAccessor da, Functor const &f, vigra::Diff2D ul)
template<class SrcImageIterator, class SrcAccessor, class DestImageIterator, class DestAccessor, class Functor>
void vigra_ext::transformImageSpatial (vigra::triple< SrcImageIterator, SrcImageIterator, SrcAccessor > src, vigra::pair< DestImageIterator, DestAccessor > dest, Functor const &f, vigra::Diff2D ul)


Detailed Description

functions to manage ROI's

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 utils.h.


Define Documentation

#define LUT_TRAITS ( T1,
 ) 

Value:

template<> \
struct LUTTraits<T1> \
{ \
    static T1 max() \
{ \
    return S; \
} \
}; \
template<> \
struct LUTTraits<vigra::RGBValue<T1> > \
{ \
    static T1 max() \
{ \
    return S; \
} \
};
Traits to define the maximum value for all types.

The case of float and double differs from vigra::NumericTraits::max()

Definition at line 48 of file utils.h.

#define VT_TRAITS ( T1   ) 

Value:

template<> \
struct ValueTypeTraits<T1> \
{ \
    typedef T1 value_type; \
};

Definition at line 134 of file utils.h.

#define VT_TRAITS_VEC ( T1   ) 

Value:

template<> \
struct ValueTypeTraits<vigra::RGBValue<T1, 0u, 1u, 2u> > \
{ \
    typedef vigra::RGBValue<T1, 0u, 1u, 2u>::value_type value_type; \
};

Definition at line 127 of file utils.h.


Generated on 5 Dec 2014 for Hugintrunk by  doxygen 1.4.7