$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mln::arith Namespace Reference

Namespaces

namespace  impl

Functions

template<typename I >
mln::trait::concrete< I >::ret diff_abs (const Image< I > &lhs, const Image< I > &rhs)
template<typename L , typename R , typename O >
void div (const Image< L > &lhs, const Image< R > &rhs, Image< O > &output)
template<typename I , typename V , typename O >
void div_cst (const Image< I > &input, const V &val, Image< O > &output)
template<typename L , typename R >
void div_inplace (Image< L > &lhs, const Image< R > &rhs)
template<typename L , typename R >
mln::trait::concrete< L >::ret min (const Image< L > &lhs, const Image< R > &rhs)
template<typename L , typename R >
void min_inplace (Image< L > &lhs, const Image< R > &rhs)
template<typename L , typename R >
mln::trait::op::minus< L, R >::ret minus (const Image< L > &lhs, const Image< R > &rhs)
template<typename L , typename R , typename F >
mln::trait::ch_value< L,
typename F::result >::ret 
minus (const Image< L > &lhs, const Image< R > &rhs, const Function_v2v< F > &f)
template<typename V , typename L , typename R >
mln::trait::ch_value< L, V >::ret minus (const Image< L > &lhs, const Image< R > &rhs)
template<typename I , typename V >
mln::trait::op::minus< I, V >::ret minus_cst (const Image< I > &input, const V &val)
template<typename I , typename V , typename F >
mln::trait::ch_value< I,
typename F::result >::ret 
minus_cst (const Image< I > &input, const V &val, const Function_v2v< F > &f)
template<typename I , typename V >
I & minus_cst_inplace (Image< I > &input, const V &val)
template<typename L , typename R >
void minus_inplace (Image< L > &lhs, const Image< R > &rhs)
template<typename L , typename R >
mln::trait::op::plus< L, R >::ret plus (const Image< L > &lhs, const Image< R > &rhs)
template<typename L , typename R , typename F >
mln::trait::ch_value< L,
typename F::result >::ret 
plus (const Image< L > &lhs, const Image< R > &rhs, const Function_v2v< F > &f)
template<typename V , typename L , typename R >
mln::trait::ch_value< L, V >::ret plus (const Image< L > &lhs, const Image< R > &rhs)
template<typename I , typename V >
mln::trait::op::plus< I, V >::ret plus_cst (const Image< I > &input, const V &val)
template<typename I , typename V , typename F >
mln::trait::ch_value< I,
typename F::result >::ret 
plus_cst (const Image< I > &input, const V &val, const Function_v2v< F > &f)
template<typename W , typename I , typename V >
mln::trait::ch_value< I, W >::ret plus_cst (const Image< I > &input, const V &val)
template<typename I , typename V >
I & plus_cst_inplace (Image< I > &input, const V &val)
template<typename L , typename R >
void plus_inplace (Image< L > &lhs, const Image< R > &rhs)
template<typename I >
mln::trait::concrete< I >::ret revert (const Image< I > &input)
template<typename I >
void revert_inplace (Image< I > &input)
template<typename L , typename R , typename O >
void times (const Image< L > &lhs, const Image< R > &rhs, Image< O > &output)
template<typename I , typename V , typename O >
void times_cst (const Image< I > &input, const V &val, Image< O > &output)
template<typename L , typename R >
void times_inplace (Image< L > &lhs, const Image< R > &rhs)
template<typename I >
mln::trait::op::uminus< I >::ret uminus (const Image< I > &ima)

Detailed Description

Namespace of arithmetic.

Function Documentation

template<typename I >
mln::trait::concrete< I >::ret mln::arith::diff_abs ( const Image< I > &  lhs,
const Image< I > &  rhs 
)

Point-wise absolute difference of images lhs and rhs.

Parameters
[in]lhsFirst operand image.
[in]rhsSecond operand image.
Returns
The result image.
Precondition
lhs.domain == rhs.domain
template<typename L , typename R , typename O >
void mln::arith::div ( const Image< L > &  lhs,
const Image< R > &  rhs,
Image< O > &  output 
)

Point-wise division of images lhs and rhs.

Parameters
[in]lhsFirst operand image.
[in]rhsSecond operand image.
[out]outputThe result image.
Precondition
output.domain == lhs.domain == rhs.domain
template<typename I , typename V , typename O >
void mln::arith::div_cst ( const Image< I > &  input,
const V &  val,
Image< O > &  output 
)

Point-wise division of the value val to image input.

Parameters
[in]inputThe image.
[in]valThe value.
[out]outputThe result image.
Precondition
output.domain == input.domain
template<typename L , typename R >
void mln::arith::div_inplace ( Image< L > &  lhs,
const Image< R > &  rhs 
)

Point-wise division of image rhs in image lhs.

Parameters
[in]lhsFirst operand image (subject to division).
[in,out]rhsSecond operand image (to div lhs).

This addition performs:
for all p of rhs.domain
lhs(p) /= rhs(p)

Precondition
rhs.domain <= lhs.domain
template<typename L , typename R >
mln::trait::concrete< L >::ret mln::arith::min ( const Image< L > &  lhs,
const Image< R > &  rhs 
)

Point-wise min of images lhs and rhs.

Parameters
[in]lhsFirst operand image.
[in]rhsSecond operand image.
Returns
The result image.
Precondition
lhs.domain == rhs.domain
template<typename L , typename R >
void mln::arith::min_inplace ( Image< L > &  lhs,
const Image< R > &  rhs 
)

Point-wise min of image lhs in image rhs.

Parameters
[in,out]lhsFirst operand image.
[in]rhsSecond operand image.
Precondition
rhs.domain == lhs.domain
template<typename L , typename R >
mln::trait::op::minus< L , R >::ret mln::arith::minus ( const Image< L > &  lhs,
const Image< R > &  rhs 
)

Point-wise subtraction of images lhs and rhs.

Parameters
[in]lhsFirst operand image.
[in]rhsSecond operand image.
Returns
The result image.
Precondition
lhs.domain == rhs.domain
template<typename L , typename R , typename F >
mln::trait::ch_value< L , typename F ::result >::ret mln::arith::minus ( const Image< L > &  lhs,
const Image< R > &  rhs,
const Function_v2v< F > &  f 
)

Point-wise subtraction of images lhs and rhs.

Parameters
[in]lhsFirst operand image.
[in]rhsSecond operand image.
[in]fFunction.
Returns
The result image.
Precondition
lhs.domain == rhs.domain
template<typename V , typename L , typename R >
mln::trait::ch_value< L , V >::ret mln::arith::minus ( const Image< L > &  lhs,
const Image< R > &  rhs 
)

Point-wise subtraction of images lhs and rhs.

Parameters
[in]lhsFirst operand image.
[in]rhsSecond operand image.
Returns
The result image.

The free parameter V sets the destination value type.

Precondition
lhs.domain == rhs.domain
template<typename I , typename V >
mln::trait::op::minus< I , V >::ret mln::arith::minus_cst ( const Image< I > &  input,
const V &  val 
)

Point-wise subtraction of the value val to image input.

Parameters
[in]inputThe image.
[in]valThe value.
Returns
The result image.
Precondition
input.is_valid
template<typename I , typename V , typename F >
mln::trait::ch_value< I , typename F ::result >::ret mln::arith::minus_cst ( const Image< I > &  input,
const V &  val,
const Function_v2v< F > &  f 
)

Point-wise subtraction of the value val to image input.

Parameters
[in]inputThe image.
[in]valThe value.
[in]fFunction.
Returns
The result image.
Precondition
input.is_valid
template<typename I , typename V >
I& mln::arith::minus_cst_inplace ( Image< I > &  input,
const V &  val 
)

Point-wise subtraction of the value val to image input.

Parameters
[in,out]inputThe image.
[in]valThe value.
Precondition
input.is_valid
template<typename L , typename R >
void mln::arith::minus_inplace ( Image< L > &  lhs,
const Image< R > &  rhs 
)

Point-wise subtraction of image rhs in image lhs.

Parameters
[in,out]lhsFirst operand image (subject to subtraction).
[in]rhsSecond operand image (to be subtracted to lhs).

This subtraction performs:
for all p of rhs.domain
lhs(p) -= rhs(p)

Precondition
rhs.domain == lhs.domain
template<typename L , typename R >
mln::trait::op::plus< L , R >::ret mln::arith::plus ( const Image< L > &  lhs,
const Image< R > &  rhs 
)

Point-wise addition of images lhs and rhs.

Parameters
[in]lhsFirst operand image.
[in]rhsSecond operand image.
Returns
The result image.
Precondition
lhs.domain == rhs.domain
template<typename L , typename R , typename F >
mln::trait::ch_value< L , typename F ::result >::ret mln::arith::plus ( const Image< L > &  lhs,
const Image< R > &  rhs,
const Function_v2v< F > &  f 
)

Point-wise addition of images lhs and rhs.

Parameters
[in]lhsFirst operand image.
[in]rhsSecond operand image.
[in]fFunction.
Returns
The result image.
Precondition
lhs.domain == rhs.domain
template<typename V , typename L , typename R >
mln::trait::ch_value< L , V >::ret mln::arith::plus ( const Image< L > &  lhs,
const Image< R > &  rhs 
)

Point-wise addition of images lhs and rhs.

Parameters
[in]lhsFirst operand image.
[in]rhsSecond operand image.
Returns
The result image.

The free parameter V sets the destination value type.

Precondition
lhs.domain == rhs.domain
template<typename I , typename V >
mln::trait::op::plus< I , V >::ret mln::arith::plus_cst ( const Image< I > &  input,
const V &  val 
)

Point-wise addition of the value val to image input.

Parameters
[in]inputThe image.
[in]valThe value.
Returns
The result image.
Precondition
input.is_valid
template<typename I , typename V , typename F >
mln::trait::ch_value< I , typename F ::result >::ret mln::arith::plus_cst ( const Image< I > &  input,
const V &  val,
const Function_v2v< F > &  f 
)

Point-wise addition of the value val to image input.

Parameters
[in]inputThe image.
[in]valThe value.
[in]fFunction.
Returns
The result image.
Precondition
input.is_valid
template<typename W , typename I , typename V >
mln::trait::ch_value< I , W >::ret mln::arith::plus_cst ( const Image< I > &  input,
const V &  val 
)

Point-wise addition of the value val to image input.

Parameters
[in]inputThe image.
[in]valThe value.
Returns
The result image.
Precondition
input.is_valid
template<typename I , typename V >
I& mln::arith::plus_cst_inplace ( Image< I > &  input,
const V &  val 
)

Point-wise addition of the value val to image input.

Parameters
[in,out]inputThe image.
[in]valThe value.
Precondition
input.is_valid
template<typename L , typename R >
void mln::arith::plus_inplace ( Image< L > &  lhs,
const Image< R > &  rhs 
)

Point-wise addition of image rhs in image lhs.

Parameters
[in,out]lhsFirst operand image (subject to addition).
[in]rhsSecond operand image (to be added to lhs).

This addition performs:
for all p of rhs.domain
lhs(p) += rhs(p)

Precondition
rhs.domain == lhs.domain
template<typename I >
mln::trait::concrete< I >::ret mln::arith::revert ( const Image< I > &  input)

Point-wise reversion of image input.

Parameters
[in]inputthe input image.
Returns
The result image.
Precondition
input.is_valid

It performs:
for all p of input.domain
output(p) = min + (max - input(p))

template<typename I >
void mln::arith::revert_inplace ( Image< I > &  input)

Point-wise in-place reversion of image input.

Parameters
[in,out]inputThe target image.
Precondition
input.is_valid

It performs:
for all p of input.domain
input(p) = min + (max - input(p))

template<typename L , typename R , typename O >
void mln::arith::times ( const Image< L > &  lhs,
const Image< R > &  rhs,
Image< O > &  output 
)

Point-wise addition of images lhs and rhs.

Parameters
[in]lhsFirst operand image.
[in]rhsSecond operand image.
[out]outputThe result image.
Precondition
output.domain == lhs.domain == rhs.domain
template<typename I , typename V , typename O >
void mln::arith::times_cst ( const Image< I > &  input,
const V &  val,
Image< O > &  output 
)

Point-wise addition of the value val to image input.

Parameters
[in]inputThe image.
[in]valThe value.
[out]outputThe result image.
Precondition
output.domain == input.domain
template<typename L , typename R >
void mln::arith::times_inplace ( Image< L > &  lhs,
const Image< R > &  rhs 
)

Point-wise addition of image rhs in image lhs.

Parameters
[in]lhsFirst operand image (subject to addition).
[in,out]rhsSecond operand image (to be added to lhs).

This addition performs:
for all p of rhs.domain
lhs(p) *= rhs(p)

Precondition
rhs.domain <= lhs.domain
template<typename I >
mln::trait::op::uminus< I >::ret mln::arith::uminus ( const Image< I > &  ima)

Negation (unary minus operation) of image ima.

Parameters
[in]imaSole operand image.
Returns
The result image.