iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages

Operator overloads for performing arithmetic operations on entire Images.

The idea with the image operators is to defer everything to the pixel level operators. Consequently, as long as the two pixels or pixel and pod type have arithmetic operators then we can enable the function. We can query these properties through nrt_traits. Not we use a lambda instead of std binary functions (eg. std::plus) because those calls will use some implict casts and we want our promotion mechanism in pixel to handle any type changes.

Todo:
Clean up the enable_ifs, as this makes the doxygen generated documentation unreadable. Check out http://stackoverflow.com/questions/3435225/c-meta-programming-doxygen-documentation for some ideas.

Functions

template<class PixType1 , class PixType2 >
std::enable_if< nrt_traits
< PixType1, PixType2 >
::has_assign_arithmetic, Image
< PixType1 > >::type & 
nrt::operator+= (Image< PixType1 > &lhs, Image< PixType2 > const &rhs)
 Operator to compute Image += Image.
 
template<class PixType1 , class T >
std::enable_if< nrt_traits
< PixType1, T >
::has_assign_arithmetic, Image
< PixType1 > >::type & 
nrt::operator+= (Image< PixType1 > &lhs, T const &rhs)
 Operator to compute Image += constant.
 
template<class PixType1 , class PixType2 >
std::enable_if< nrt_traits
< PixType1, PixType2 >
::has_arithmetic, Image
< typename nrt_traits
< PixType1, PixType2 >
::promote_type > >::type 
nrt::operator+ (Image< PixType1 > const &lhs, Image< PixType2 > const &rhs)
 Operator to compute Image + Image.
 
template<class PixType1 , class T >
std::enable_if< nrt_traits
< PixType1, T >
::has_arithmetic, Image
< typename nrt_traits
< PixType1, T >::promote_type >
>::type 
nrt::operator+ (Image< PixType1 > const &lhs, T const &rhs)
 Operator to compute Image + constant.
 
template<class PixType1 , class T >
std::enable_if< nrt_traits
< PixType1, T >
::has_arithmetic, Image
< typename nrt_traits
< PixType1, T >::promote_type >
>::type 
nrt::operator+ (T const &lhs, Image< PixType1 > const &rhs)
 Operator to compute constant + Image.
 
template<class PixType1 , class PixType2 >
std::enable_if< nrt_traits
< PixType1, PixType2 >
::has_assign_arithmetic, Image
< PixType1 > >::type & 
nrt::operator-= (Image< PixType1 > &lhs, Image< PixType2 > const &rhs)
 Operator to compute Image -= Image.
 
template<class PixType1 , class T >
std::enable_if< nrt_traits
< PixType1, T >
::has_assign_arithmetic, Image
< PixType1 > >::type & 
nrt::operator-= (Image< PixType1 > &lhs, T const &rhs)
 Operator to compute Image -= constant.
 
template<class PixType1 , class PixType2 >
std::enable_if< nrt_traits
< PixType1, PixType2 >
::has_arithmetic, Image
< typename nrt_traits
< PixType1, PixType2 >
::promote_type > >::type 
nrt::operator- (Image< PixType1 > const &lhs, Image< PixType2 > const &rhs)
 Operator to compute Image - Image.
 
template<class PixType1 , class T >
std::enable_if< nrt_traits
< PixType1, T >
::has_arithmetic, Image
< typename nrt_traits
< PixType1, T >::promote_type >
>::type 
nrt::operator- (Image< PixType1 > const &lhs, T const &rhs)
 Operator to compute Image - constant.
 
template<class PixType1 , class T >
std::enable_if< nrt_traits
< PixType1, T >
::has_arithmetic, Image
< typename nrt_traits
< PixType1, T >::promote_type >
>::type 
nrt::operator- (T const &lhs, Image< PixType1 > const &rhs)
 Operator to compute constant - Image.
 
template<class PixType1 , class PixType2 >
std::enable_if< nrt_traits
< PixType1, PixType2 >
::has_assign_arithmetic, Image
< PixType1 > >::type & 
nrt::operator*= (Image< PixType1 > &lhs, Image< PixType2 > const &rhs)
 Operator to compute Image *= Image.
 
template<class PixType1 , class T >
std::enable_if< nrt_traits
< PixType1, T >
::has_assign_arithmetic, Image
< PixType1 > >::type & 
nrt::operator*= (Image< PixType1 > &lhs, T const &rhs)
 Operator to compute Image *= constant.
 
template<class PixType1 , class PixType2 >
std::enable_if< nrt_traits
< PixType1, PixType2 >
::has_arithmetic, Image
< typename nrt_traits
< PixType1, PixType2 >
::promote_type > >::type 
nrt::operator* (Image< PixType1 > const &lhs, Image< PixType2 > const &rhs)
 Operator to compute Image * Image.
 
template<class PixType1 , class T >
std::enable_if< nrt_traits
< PixType1, T >
::has_arithmetic, Image
< typename nrt_traits
< PixType1, T >::promote_type >
>::type 
nrt::operator* (Image< PixType1 > const &lhs, T const &rhs)
 Operator to compute Image * constant.
 
template<class PixType1 , class T >
std::enable_if< nrt_traits
< PixType1, T >
::has_arithmetic, Image
< typename nrt_traits
< PixType1, T >::promote_type >
>::type 
nrt::operator* (T const &lhs, Image< PixType1 > const &rhs)
 Operator to compute constant * Image.
 
template<class PixType1 , class PixType2 >
std::enable_if< nrt_traits
< PixType1, PixType2 >
::has_assign_arithmetic, Image
< PixType1 > >::type & 
nrt::operator/= (Image< PixType1 > &lhs, Image< PixType2 > const &rhs)
 Operator to compute Image /= Image.
 
template<class PixType1 , class T >
std::enable_if< nrt_traits
< PixType1, T >
::has_assign_arithmetic, Image
< PixType1 > >::type & 
nrt::operator/= (Image< PixType1 > &lhs, T const &rhs)
 Operator to compute Image /= constant.
 
template<class PixType1 , class PixType2 >
std::enable_if< nrt_traits
< PixType1, PixType2 >
::has_arithmetic, Image
< typename nrt_traits
< PixType1, PixType2 >
::promote_type > >::type 
nrt::operator/ (Image< PixType1 > const &lhs, Image< PixType2 > const &rhs)
 Operator to compute Image / Image.
 
template<class PixType1 , class T >
std::enable_if< nrt_traits
< PixType1, T >
::has_arithmetic, Image
< typename nrt_traits
< PixType1, T >::promote_type >
>::type 
nrt::operator/ (Image< PixType1 > const &lhs, T const &rhs)
 Operator to compute Image / constant.
 
template<class PixType1 , class T >
std::enable_if< nrt_traits
< PixType1, T >
::has_arithmetic, Image
< typename nrt_traits
< PixType1, T >::promote_type >
>::type 
nrt::operator/ (T const &lhs, Image< PixType1 > const &rhs)
 Operator to compute constant / Image.