PixelsTypes.H File Reference

#include "Util/MathFunctions.H"
#include "Image/PixelsBase.H"
#include "Image/PixelsCommonDef.H"
#include "Util/Promotions.H"
#include "Util/TypeTraits.H"
#include "Util/Assert.H"
#include "Util/Types.H"
#include "Util/log.H"
#include "Image/colorDefs.H"
#include <cmath>
Include dependency graph for PixelsTypes.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TypeTraits< PixRGB< T > >
 Specialize TypeTraits to indicate that PixRGB is a "trivial" type. More...
struct  TypeTraits< PixHSV< T > >
 Specialize TypeTraits to indicate that PixHSV is a "trivial" type. More...
struct  TypeTraits< PixJpegYUV< T > >
 Specialize TypeTraits to indicate that PixJpegYUV is a "trivial" type. More...
struct  TypeTraits< PixVideoYUV< T > >
 Specialize TypeTraits to indicate that PixVideoYUV is a "trivial" type. More...
struct  TypeTraits< PixYIQ< T > >
 Specialize TypeTraits to indicate that PixYIQ is a "trivial" type. More...
struct  TypeTraits< PixHSL< T > >
 Specialize TypeTraits to indicate that PixHSL is a "trivial" type. More...
struct  TypeTraits< PixLab< T > >
 Specialize TypeTraits to indicate that PixLab is a "trivial" type. More...
struct  TypeTraits< PixXYZ< T > >
 Specialize TypeTraits to indicate that PixXYZ is a "trivial" type. More...
struct  TypeTraits< PixH2SV1< T > >
 Specialize TypeTraits to indicate that PixH2SV1 is a "trivial" type. More...
struct  TypeTraits< PixH2SV2< T > >
 Specialize TypeTraits to indicate that PixH2SV2 is a "trivial" type. More...
struct  TypeTraits< PixH2SV3< T > >
 Specialize TypeTraits to indicate that PixH2SV3 is a "trivial" type. More...
struct  TypeTraits< PixHyper< T, dim > >
 Specialize TypeTraits to indicate that PixHyper is a "trivial" type. More...
struct  TypeTraits< PixDKL< T > >
 Specialize TypeTraits to indicate that PixDKL is a "trivial" type. More...
struct  ops::plus
struct  ops::minus
struct  ops::multiplies
struct  ops::divides
struct  ops::modulo
struct  ops::bitwise_and
struct  ops::bitwise_or
struct  ops::bitwise_xor
struct  rebind< C, T >
 Helper struct to provide a generic way to "rebind" template parameters. More...
struct  rebind< C< T >, U >
struct  rebind< C< T1, T2 >, U1 >
struct  pix_ops_mixin< pixtype, T >
 A "mix-in" class that injects all arithmetic operators into the class that inherits it. More...
struct  pix_ops_mixin_hyper< pixtype, T, dim >
class  PixRGB< T >
 This is the basic RGB pixel class. More...
class  PixHSV< T >
 This is the basic HSV pixel class. More...
class  PixJpegYUV< T >
 This is the basic jpeg-YUV pixel class. More...
class  PixVideoYUV< T >
 This is the basic video-YUV pixel class. More...
class  PixYIQ< T >
 This is the basic YIQ pixel class. More...
class  PixHSL< T >
 This is the basic HSL pixel class. More...
class  PixLab< T >
 This is the basic Lab pixel class. More...
class  PixXYZ< T >
 This is the basic XYZ pixel class. More...
class  PixH2SV1< T >
 This is the H2SV1 pixel class. More...
class  PixH2SV2< T >
 This is the H2SV2 pixel class. More...
class  PixH2SV3< T >
 This is the H2SV3 pixel class. More...
class  PixHyper< T, dim >
 This is the hyper pixel class. More...
class  PixDKL< T >
 This is the basic DKL pixel class. More...

Defines

#define PIX_MATH_OPS_EQ(OPSYM, FUNCTYPE)   template <class T2> inline pixtype<T>& operator OPSYM (const pixtype<T2>& A) { return pix_helper::pix_pix_op_eq(static_cast<pixtype<T>&>(*this), A, FUNCTYPE()); }
#define PIX_OPERATOR_EQ(OPSYM, FUNCTYPE)
#define PIX_MATH_OPS(OPSYM, FUNCTYPE)
#define PIX_OP(T2, OPSYM, FUNC)
#define PIX_OPERATOR(OPSYM, FUNCTYPE)
#define PIX_MATH_OPS_EQ(OPSYM, FUNCTYPE)   template <class T2> inline pixtype<T, dim>& operator OPSYM (const pixtype<T2, dim>& A) { return pix_helper::pix_pix_op_eq(static_cast<pixtype<T, dim>&>(*this), A, FUNCTYPE()); }
#define PIX_OPERATOR_EQ(OPSYM, FUNCTYPE)
#define PIX_MATH_OPS(OPSYM, FUNCTYPE)
#define PIX_OP(T2, OPSYM, FUNC)
#define PIX_OPERATOR(OPSYM, FUNCTYPE)
#define LIST_2(p1, p2)   p1, p2
 Quickie macro for escaping the comma out of a macro argument.

Functions

template<class pix1 , class pix2 >
void pix_helper::clamped_assign_3 (pix1 &lhs, const pix2 &rhs)
template<class pix1 , class pix2 >
void pix_helper::clamped_assign_4 (pix1 &lhs, const pix2 &rhs)
template<class pix1 , class pix2 >
void pix_helper::clamped_assign_n (pix1 &lhs, const pix2 &rhs)
template<class insttype , class T2 , class functype >
insttype & pix_helper::pix_scalar_op_eq (insttype &lhs, const T2 rhs, functype func)
 helper for adding a base type with a pixel where basic type T != T2
template<class T , class insttype , class T2 , class functype >
rebind< insttype, typename
promote_trait< T, T2 >::TP >
::type 
pix_helper::pix_scalar_op (const insttype &lhs, const T2 rhs, functype func)
 helper for adding a base type with a pixel where basic type T != T2
template<class lhstype , class rhstype , class functype >
lhstype & pix_helper::pix_pix_op_eq (lhstype &lhs, const rhstype &rhs, functype func)
 Apply a x= operation between two pixels where the base type are the same.
template<template< class > class pixtype, class T , class T2 , class functype >
pixtype< typename
promote_trait< T, T2 >::TP > 
pix_helper::pix_pix_op (const pixtype< T > &lhs, const pixtype< T2 > &rhs, functype func)
 Apply a x operation between two pixels where the base type are the same.
template<template< class, size_t > class pixtype, class T , class T2 , size_t dim, class functype >
pixtype< typename
promote_trait< T, T2 >::TP,
dim > 
pix_helper::pix_pix_op (const pixtype< T, dim > &lhs, const pixtype< T2, dim > &rhs, functype func)
 SPECIALIZE_PROMOTE_TRAIT (PixHyper, LIST_2(class T, size_t dim), LIST_2(, 3)) SPECIALIZE_PROMOTE_TRAIT(PixHyper
 LIST_2 (class T, size_t dim)

Detailed Description

Basic pixel types version 2.0

Definition in file PixelsTypes.H.


Define Documentation

#define LIST_2 ( p1,
p2   )     p1, p2

Quickie macro for escaping the comma out of a macro argument.

Definition at line 4010 of file PixelsTypes.H.

#define PIX_MATH_OPS ( OPSYM,
FUNCTYPE   ) 
Value:
template <class T2>                                                                                   \
  inline pixtype<typename promote_trait<T,T2>::TP, dim>                                                 \
  operator OPSYM (const pixtype<T2, dim>& rhs) const                                                    \
  { return pix_helper::pix_pix_op(static_cast<const pixtype<T, dim>&>(*this), rhs, FUNCTYPE()); }

Definition at line 516 of file PixelsTypes.H.

#define PIX_MATH_OPS ( OPSYM,
FUNCTYPE   ) 
Value:
template <class T2>                                                                           \
  inline typename rebind<pixtype<T>, typename promote_trait<T,T2>::TP>::type                    \
  operator OPSYM (const pixtype<T2>& rhs) const                                                 \
  { return pix_helper::pix_pix_op(static_cast<const pixtype<T>&>(*this), rhs, FUNCTYPE()); }

Definition at line 516 of file PixelsTypes.H.

#define PIX_OP ( T2,
OPSYM,
FUNC   ) 
Value:
inline typename rebind<pixtype<T, dim>, typename promote_trait<T, T2>::TP>::type                                                      \
  operator OPSYM (const T2 A) const { return pix_helper::pix_scalar_op<T>(static_cast<const pixtype<T, dim>&>(*this), A, FUNC); }

Definition at line 533 of file PixelsTypes.H.

#define PIX_OP ( T2,
OPSYM,
FUNC   ) 
Value:
inline typename rebind<pixtype<T>, typename promote_trait<T, T2>::TP>::type                                                   \
  operator OPSYM (const T2 A) const { return pix_helper::pix_scalar_op<T>(static_cast<const pixtype<T>&>(*this), A, FUNC); }

Definition at line 533 of file PixelsTypes.H.

#define PIX_OPERATOR ( OPSYM,
FUNCTYPE   ) 
Value:
PIX_OP(bool, OPSYM, FUNCTYPE())               \
  PIX_OP(char, OPSYM, FUNCTYPE())               \
  PIX_OP(short, OPSYM, FUNCTYPE())              \
  PIX_OP(int, OPSYM, FUNCTYPE())                \
  PIX_OP(long, OPSYM, FUNCTYPE())               \
  PIX_OP(float, OPSYM, FUNCTYPE())              \
  PIX_OP(double, OPSYM, FUNCTYPE())             \
  PIX_OP(long double, OPSYM, FUNCTYPE())        \
  PIX_OP(unsigned char, OPSYM, FUNCTYPE())      \
  PIX_OP(unsigned short, OPSYM, FUNCTYPE())     \
  PIX_OP(unsigned int, OPSYM, FUNCTYPE())       \
  PIX_OP(unsigned long, OPSYM, FUNCTYPE())

Definition at line 537 of file PixelsTypes.H.

#define PIX_OPERATOR ( OPSYM,
FUNCTYPE   ) 
Value:
PIX_OP(bool, OPSYM, FUNCTYPE())               \
  PIX_OP(char, OPSYM, FUNCTYPE())               \
  PIX_OP(short, OPSYM, FUNCTYPE())              \
  PIX_OP(int, OPSYM, FUNCTYPE())                \
  PIX_OP(long, OPSYM, FUNCTYPE())               \
  PIX_OP(float, OPSYM, FUNCTYPE())              \
  PIX_OP(double, OPSYM, FUNCTYPE())             \
  PIX_OP(long double, OPSYM, FUNCTYPE())        \
  PIX_OP(unsigned char, OPSYM, FUNCTYPE())      \
  PIX_OP(unsigned short, OPSYM, FUNCTYPE())     \
  PIX_OP(unsigned int, OPSYM, FUNCTYPE())       \
  PIX_OP(unsigned long, OPSYM, FUNCTYPE())

Definition at line 537 of file PixelsTypes.H.

#define PIX_OPERATOR_EQ ( OPSYM,
FUNCTYPE   ) 
Value:
inline pixtype<T, dim>& operator OPSYM (const bool           A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T, dim>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T, dim>& operator OPSYM (const char           A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T, dim>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T, dim>& operator OPSYM (const short          A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T, dim>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T, dim>& operator OPSYM (const int            A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T, dim>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T, dim>& operator OPSYM (const long           A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T, dim>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T, dim>& operator OPSYM (const float          A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T, dim>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T, dim>& operator OPSYM (const double         A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T, dim>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T, dim>& operator OPSYM (const long double    A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T, dim>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T, dim>& operator OPSYM (const unsigned char  A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T, dim>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T, dim>& operator OPSYM (const unsigned short A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T, dim>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T, dim>& operator OPSYM (const unsigned int   A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T, dim>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T, dim>& operator OPSYM (const unsigned long  A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T, dim>&>(*this), A, FUNCTYPE()); }

Definition at line 491 of file PixelsTypes.H.

#define PIX_OPERATOR_EQ ( OPSYM,
FUNCTYPE   ) 
Value:
inline pixtype<T>& operator OPSYM (const bool           A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T>& operator OPSYM (const char           A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T>& operator OPSYM (const short          A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T>& operator OPSYM (const int            A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T>& operator OPSYM (const long           A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T>& operator OPSYM (const float          A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T>& operator OPSYM (const double         A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T>& operator OPSYM (const long double    A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T>& operator OPSYM (const unsigned char  A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T>& operator OPSYM (const unsigned short A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T>& operator OPSYM (const unsigned int   A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T>&>(*this), A, FUNCTYPE()); } \
  inline pixtype<T>& operator OPSYM (const unsigned long  A) { return pix_helper::pix_scalar_op_eq(static_cast<pixtype<T>&>(*this), A, FUNCTYPE()); }

Definition at line 491 of file PixelsTypes.H.

Generated on Sun May 8 08:42:42 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3