[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

hugin_base/vigra_ext/utils.h File Reference

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

Include dependency graph for utils.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
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 > PointPair
typedef PointPairT< vigra::RGBValue<
float > > 
PointPairRGB

Functions

 LUT_TRAITS (unsigned char, UCHAR_MAX)
 LUT_TRAITS (signed char, SCHAR_MAX)
 LUT_TRAITS (unsigned short, USHRT_MAX)
 LUT_TRAITS (signed short, SHRT_MAX)
 LUT_TRAITS (unsigned int, UINT_MAX)
 LUT_TRAITS (signed int, INT_MAX)
 LUT_TRAITS (float, 1.0)
 LUT_TRAITS (double, 1.0)
double getMaxValForPixelType (const std::string &v)
 VT_TRAITS (vigra::UInt8)
 VT_TRAITS (vigra::Int16)
 VT_TRAITS (vigra::UInt16)
 VT_TRAITS (vigra::Int32)
 VT_TRAITS (vigra::UInt32)
 VT_TRAITS (float)
 VT_TRAITS (double)
float pow (float a, double b)
template<class T, unsigned int R, unsigned int G, unsigned int B>
vigra::RGBValue< T, R, G, B > 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 > & 
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 > 
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 > 
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 
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 > 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 > log (vigra::TinyVector< V, SIZE > const &v, double e)
 Apply log() function to each vector component.
template<class V>
getMaxComponent (vigra::RGBValue< V > const &v)
 get the maximum component of a vector (also works for single pixel types...)
template<class V>
getMaxComponent (V v)
 get the maximum component of a vector (also works for single pixel types...)
template<class V>
getMinComponent (vigra::RGBValue< V > const &v)
 get the maximum component of a vector (also works for single pixel types...)
template<class V>
getMinComponent (V v)
 get the maximum component of a vector (also works for single pixel types...)
template<class SrcImageIterator, class SrcAccessor>
void 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 
normalizeValue (T v, vigra::VigraTrueType)
 normalize a pixel to 0..1 Only has an effect on integer pixel types
template<class T>
vigra::NumericTraits< T
>::RealPromote 
normalizeValue (T v, vigra::VigraFalseType)
template<class SrcIterator, class SrcAccessor, class DestIterator, class DestAccessor, class T>
void 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 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 transformImageSpatial (vigra::triple< SrcImageIterator, SrcImageIterator, SrcAccessor > src, vigra::pair< DestImageIterator, DestAccessor > dest, Functor const &f, vigra::Diff2D ul)


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()

#define VT_TRAITS T1   ) 
 

Value:

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

#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; \
};


Typedef Documentation

typedef PointPairT<float> vigra_ext::PointPair
 

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


Function Documentation

template<class SrcIterator, class SrcAccessor, class DestIterator, class DestAccessor, class T>
void applyMapping vigra::triple< SrcIterator, SrcIterator, SrcAccessor >  img,
vigra::pair< DestIterator, DestAccessor >  dest,
min,
max,
int  mapping
 

template<class SrcImageIterator, class SrcAccessor>
void circularCrop vigra::triple< SrcImageIterator, SrcImageIterator, SrcAccessor >  img,
hugin_utils::FDiff2D  middle,
double  radius
 

Apply a circular crop to img.

Sets all pixels that are outside of the circle specified by middle and radius to zero.

template<class V>
V getMaxComponent v  )  [inline]
 

get the maximum component of a vector (also works for single pixel types...)

template<class V>
V getMaxComponent vigra::RGBValue< V > const &  v  )  [inline]
 

get the maximum component of a vector (also works for single pixel types...)

double getMaxValForPixelType const std::string &  v  )  [inline]
 

template<class V>
V getMinComponent v  )  [inline]
 

get the maximum component of a vector (also works for single pixel types...)

template<class V>
V getMinComponent vigra::RGBValue< V > const &  v  )  [inline]
 

get the maximum component of a vector (also works for single pixel types...)

template<class V, int SIZE, class D1, class D2>
vigra::TinyVector<V, SIZE> log vigra::TinyVector< V, SIZE > const &  v,
double  e
[inline]
 

Apply log() function to each vector component.

template<class T, unsigned int RIDX, unsigned int GIDX, unsigned int BIDX>
vigra::RGBValue<T, RIDX, GIDX, BIDX> log vigra::RGBValue< T, RIDX, GIDX, BIDX > const &  v  )  [inline]
 

component-wise logarithm

template<class T, unsigned int RIDX, unsigned int GIDX, unsigned int BIDX>
vigra::RGBValue<T, RIDX, GIDX, BIDX> log10 vigra::RGBValue< T, RIDX, GIDX, BIDX > const &  v  )  [inline]
 

component-wise logarithm

LUT_TRAITS double  ,
1.  0
 

LUT_TRAITS float  ,
1.  0
 

LUT_TRAITS signed  int,
INT_MAX 
 

LUT_TRAITS unsigned  int,
UINT_MAX 
 

LUT_TRAITS signed  short,
SHRT_MAX 
 

LUT_TRAITS unsigned  short,
USHRT_MAX 
 

LUT_TRAITS signed  char,
SCHAR_MAX 
 

LUT_TRAITS unsigned  char,
UCHAR_MAX 
 

template<class T>
vigra::NumericTraits<T>::RealPromote normalizeValue v,
vigra::VigraFalseType 
 

template<class T>
vigra::NumericTraits<T>::RealPromote normalizeValue v,
vigra::VigraTrueType 
 

normalize a pixel to 0..1 Only has an effect on integer pixel types

template<class V1, unsigned int R, unsigned int G, unsigned int B, class V2>
vigra::PromoteTraits<vigra::RGBValue<V1, R, G, B>, V2 >::Promote operator+ vigra::RGBValue< V1, R, G, B > const &  r1,
V2 const &  r2
[inline]
 

add a scalar to all components

template<class V1, unsigned int R, unsigned int G, unsigned int B, class V2>
vigra::RGBValue<V1, R, G, B>& operator+= vigra::RGBValue< V1, R, G, B > &  l,
V2 const &  r
[inline]
 

add a scalar to all components

template<class V, int SIZE, class D1, class D2>
vigra::TinyVector<V, SIZE> pow vigra::TinyVector< V, SIZE > const &  v,
double  e
[inline]
 

Apply pow() function to each vector component.

template<class T, unsigned int R, unsigned int G, unsigned int B>
vigra::RGBValue<T, R, G, B> pow vigra::RGBValue< T, R, G, B > const &  v,
double  e
[inline]
 

component-wise absolute value

float pow float  a,
double  b
[inline]
 

template<class SrcImageIterator, class SrcAccessor, class DestImageIterator, class DestAccessor, class Functor>
void transformImageSpatial vigra::triple< SrcImageIterator, SrcImageIterator, SrcAccessor >  src,
vigra::pair< DestImageIterator, DestAccessor >  dest,
Functor const &  f,
vigra::Diff2D  ul
 

template<class SrcImageIterator, class SrcAccessor, class DestImageIterator, class DestAccessor, class Functor>
void transformImageSpatial SrcImageIterator  src_upperleft,
SrcImageIterator  src_lowerright,
SrcAccessor  sa,
DestImageIterator  dest_upperleft,
DestAccessor  da,
Functor const &  f,
vigra::Diff2D  ul
 

VT_TRAITS double   ) 
 

VT_TRAITS float   ) 
 

VT_TRAITS vigra::UInt32   ) 
 

VT_TRAITS vigra::Int32   ) 
 

VT_TRAITS vigra::UInt16   ) 
 

VT_TRAITS vigra::Int16   ) 
 

VT_TRAITS vigra::UInt8   ) 
 


Generated on Mon Sep 20 01:01:28 2010 for Hugintrunk by doxygen 1.3.9.1