Public Types | Public Member Functions | Public Attributes | List of all members
iimg::TPixelConversion< SourcePixel, DestPixel, CalcPixel > Class Template Reference

A generic pixel conversion. More...

#include <TPixelConversion.h>

Public Types

typedef SourcePixel SourcePixelType
 
typedef DestPixel DestPixelType
 
typedef CalcPixel CalcPixelType
 

Public Member Functions

 TPixelConversion ()
 Default constructor. More...
 
DestPixel operator() (const SourcePixel &pixel) const
 Casting operator. More...
 
CalcPixel GetCalc (const SourcePixel &pixel) const
 
DestPixel GetDest (const CalcPixel &pixel) const
 
double GetWeight (const CalcPixel &pixel) const
 Get weight of pixel value. More...
 
double GetIntensity (const CalcPixel &pixel) const
 Get intensity of pixel value. More...
 
template<>
 TPixelConversion ()
 
template<>
float operator() (const quint8 &pixel) const
 
template<>
float GetCalc (const quint8 &pixel) const
 
template<>
quint8 operator() (const float &pixel) const
 
template<>
quint8 GetDest (const float &pixel) const
 

Public Attributes

double whiteIntensity
 

Detailed Description

template<typename SourcePixel, typename DestPixel, typename CalcPixel = DestPixel>
class iimg::TPixelConversion< SourcePixel, DestPixel, CalcPixel >

A generic pixel conversion.

Template Parameters
SourcePixelType of the source pixel.
DestPixelType of the destination pixel.
DestPixelType of the destination pixel.

Definition at line 21 of file TPixelConversion.h.

Member Typedef Documentation

template<typename SourcePixel , typename DestPixel , typename CalcPixel = DestPixel>
typedef CalcPixel iimg::TPixelConversion< SourcePixel, DestPixel, CalcPixel >::CalcPixelType

Definition at line 26 of file TPixelConversion.h.

template<typename SourcePixel , typename DestPixel , typename CalcPixel = DestPixel>
typedef DestPixel iimg::TPixelConversion< SourcePixel, DestPixel, CalcPixel >::DestPixelType

Definition at line 25 of file TPixelConversion.h.

template<typename SourcePixel , typename DestPixel , typename CalcPixel = DestPixel>
typedef SourcePixel iimg::TPixelConversion< SourcePixel, DestPixel, CalcPixel >::SourcePixelType

Definition at line 24 of file TPixelConversion.h.

Constructor & Destructor Documentation

template<typename SourcePixel , typename DestPixel , typename CalcPixel >
iimg::TPixelConversion< SourcePixel, DestPixel, CalcPixel >::TPixelConversion ( )
inline

Default constructor.

Definition at line 66 of file TPixelConversion.h.

template<>
iimg::TPixelConversion< quint8, quint8, quint8 >::TPixelConversion ( )
inline

Definition at line 108 of file TPixelConversion.h.

Member Function Documentation

template<typename SourcePixel , typename DestPixel , typename CalcPixel >
CalcPixel iimg::TPixelConversion< SourcePixel, DestPixel, CalcPixel >::GetCalc ( const SourcePixel &  pixel) const
inline

Definition at line 80 of file TPixelConversion.h.

template<>
float iimg::TPixelConversion< quint8, float, float >::GetCalc ( const quint8 &  pixel) const
inline

Definition at line 122 of file TPixelConversion.h.

template<typename SourcePixel , typename DestPixel , typename CalcPixel >
DestPixel iimg::TPixelConversion< SourcePixel, DestPixel, CalcPixel >::GetDest ( const CalcPixel &  pixel) const
inline

Definition at line 87 of file TPixelConversion.h.

template<>
quint8 iimg::TPixelConversion< float, quint8, float >::GetDest ( const float &  pixel) const
inline

Definition at line 136 of file TPixelConversion.h.

template<typename SourcePixel , typename DestPixel , typename CalcPixel >
double iimg::TPixelConversion< SourcePixel, DestPixel, CalcPixel >::GetIntensity ( const CalcPixel &  pixel) const
inline

Get intensity of pixel value.

This value is used for grayscale algorithms to operate with pixels with additional than intensity information.

Definition at line 101 of file TPixelConversion.h.

template<typename SourcePixel , typename DestPixel , typename CalcPixel >
double iimg::TPixelConversion< SourcePixel, DestPixel, CalcPixel >::GetWeight ( const CalcPixel &  pixel) const
inline

Get weight of pixel value.

Weight is value, typically between 0 and 1, describing importance of pixel. For normal pixels it is always 1. For alpha-channeled pixels or weight pixels it can differ. Values above 1 and negative are also possible for some algorithmical reasons.

Definition at line 94 of file TPixelConversion.h.

template<typename SourcePixel , typename DestPixel , typename CalcPixel >
DestPixel iimg::TPixelConversion< SourcePixel, DestPixel, CalcPixel >::operator() ( const SourcePixel &  pixel) const
inline

Casting operator.

Returns
The result of the pixel conversion.

Definition at line 73 of file TPixelConversion.h.

template<>
float iimg::TPixelConversion< quint8, float, float >::operator() ( const quint8 &  pixel) const
inline

Definition at line 115 of file TPixelConversion.h.

template<>
quint8 iimg::TPixelConversion< float, quint8, float >::operator() ( const float &  pixel) const
inline

Definition at line 129 of file TPixelConversion.h.

Member Data Documentation

template<typename SourcePixel , typename DestPixel , typename CalcPixel = DestPixel>
double iimg::TPixelConversion< SourcePixel, DestPixel, CalcPixel >::whiteIntensity

Definition at line 59 of file TPixelConversion.h.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy