Hugin trunk 0.1
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
vigra_ext::LUTFunctor< VTIn, LUT > Struct Template Reference

functor to apply a LUT to gray and color images. More...

#include <lut.h>

Inheritance diagram for vigra_ext::LUTFunctor< VTIn, LUT >:
Inheritance graph

Public Types

typedef vigra_ext::ValueTypeTraits< VTIn >::value_type VT1
 
typedef LUT::value_type lut_type
 the functor's first argument type
 

Public Member Functions

 LUTFunctor ()
 the functor's result type
 
 LUTFunctor (LUT &lut)
 create a LUT functor.
 
lut_type applyLutInteger (VT1 v) const
 
lut_type applyLutFloat (double v) const
 
vigra::RGBValue< lut_typeapplyVector (vigra::RGBValue< VT1 > v, vigra::VigraFalseType) const
 
vigra::RGBValue< lut_typeapplyVector (vigra::RGBValue< VT1 > v, vigra::VigraTrueType) const
 
lut_type applyScalar (VT1 v, vigra::VigraFalseType) const
 
lut_type applyScalar (VT1 v, vigra::VigraTrueType) const
 
lut_type apply (VT1 v, vigra::VigraTrueType) const
 
vigra::RGBValue< lut_typeapply (vigra::RGBValue< VT1 > v, vigra::VigraFalseType) const
 
template<class T >
vigra::NumericTraits< T >::RealPromote operator() (T v) const
 

Public Attributes

LUT m_lut
 

Detailed Description

template<class VTIn, class LUT>
struct vigra_ext::LUTFunctor< VTIn, LUT >

functor to apply a LUT to gray and color images.

This is a safe, and iterpolatating table lookup.

if the argument has a higher bit count than lut.size(), interpolation will take place.

This is slower, because there is a size check at runtime, which might be placed in a template parameter.

floating point values between 0..1 are mapped to min and max of the lookup table.

Definition at line 118 of file lut.h.

Member Typedef Documentation

◆ lut_type

template<class VTIn , class LUT >
typedef LUT::value_type vigra_ext::LUTFunctor< VTIn, LUT >::lut_type

the functor's first argument type

Definition at line 126 of file lut.h.

◆ VT1

template<class VTIn , class LUT >
typedef vigra_ext::ValueTypeTraits<VTIn>::value_type vigra_ext::LUTFunctor< VTIn, LUT >::VT1

Definition at line 120 of file lut.h.

Constructor & Destructor Documentation

◆ LUTFunctor() [1/2]

template<class VTIn , class LUT >
vigra_ext::LUTFunctor< VTIn, LUT >::LUTFunctor ( )
inline

the functor's result type

Definition at line 132 of file lut.h.

◆ LUTFunctor() [2/2]

template<class VTIn , class LUT >
vigra_ext::LUTFunctor< VTIn, LUT >::LUTFunctor ( LUT &  lut)
inline

create a LUT functor.

Definition at line 138 of file lut.h.

Member Function Documentation

◆ apply() [1/2]

template<class VTIn , class LUT >
vigra::RGBValue< lut_type > vigra_ext::LUTFunctor< VTIn, LUT >::apply ( vigra::RGBValue< VT1 v,
vigra::VigraFalseType   
) const
inline

Definition at line 226 of file lut.h.

References vigra_ext::LUTFunctor< VTIn, LUT >::applyVector(), and threshold().

◆ apply() [2/2]

template<class VTIn , class LUT >
lut_type vigra_ext::LUTFunctor< VTIn, LUT >::apply ( VT1  v,
vigra::VigraTrueType   
) const
inline

◆ applyLutFloat()

template<class VTIn , class LUT >
lut_type vigra_ext::LUTFunctor< VTIn, LUT >::applyLutFloat ( double  v) const
inline

◆ applyLutInteger()

template<class VTIn , class LUT >
lut_type vigra_ext::LUTFunctor< VTIn, LUT >::applyLutInteger ( VT1  v) const
inline

◆ applyScalar() [1/2]

template<class VTIn , class LUT >
lut_type vigra_ext::LUTFunctor< VTIn, LUT >::applyScalar ( VT1  v,
vigra::VigraFalseType   
) const
inline

◆ applyScalar() [2/2]

template<class VTIn , class LUT >
lut_type vigra_ext::LUTFunctor< VTIn, LUT >::applyScalar ( VT1  v,
vigra::VigraTrueType   
) const
inline

Definition at line 215 of file lut.h.

References vigra_ext::LUTFunctor< VTIn, LUT >::applyLutInteger(), and threshold().

◆ applyVector() [1/2]

template<class VTIn , class LUT >
vigra::RGBValue< lut_type > vigra_ext::LUTFunctor< VTIn, LUT >::applyVector ( vigra::RGBValue< VT1 v,
vigra::VigraFalseType   
) const
inline

◆ applyVector() [2/2]

template<class VTIn , class LUT >
vigra::RGBValue< lut_type > vigra_ext::LUTFunctor< VTIn, LUT >::applyVector ( vigra::RGBValue< VT1 v,
vigra::VigraTrueType   
) const
inline

◆ operator()()

template<class VTIn , class LUT >
template<class T >
vigra::NumericTraits< T >::RealPromote vigra_ext::LUTFunctor< VTIn, LUT >::operator() ( v) const
inline

Definition at line 233 of file lut.h.

References vigra_ext::LUTFunctor< VTIn, LUT >::apply(), and threshold().

Member Data Documentation

◆ m_lut

template<class VTIn , class LUT >
LUT vigra_ext::LUTFunctor< VTIn, LUT >::m_lut

The documentation for this struct was generated from the following file: