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

Namespaces

namespace  approx
namespace  impl
namespace  naive

Functions

template<typename I , typename O >
void abs (const Image< I > &input, Image< O > &output)
template<typename I >
void abs_inplace (Image< I > &input)
template<typename I , typename F >
void apply (Image< I > &input, const Function_v2v< F > &f)
template<typename A , typename I >
A::result compute (const Accumulator< A > &a, const Image< I > &input)
template<typename A , typename I >
A::result compute (Accumulator< A > &a, const Image< I > &input)
template<typename A , typename I >
mln::internal::meta_accu_ret_result_helper
< A, typename I::value >
::result 
compute (const Meta_Accumulator< A > &a, const Image< I > &input)
template<typename A , typename I , typename W >
mln::trait::ch_value< I,
typename A::result >::ret 
compute_in_window (const Accumulator< A > &a, const Image< I > &input, const Window< W > &win)
template<typename A , typename I , typename W >
mln::trait::ch_value< I,
typename A::result >::ret 
compute_in_window (const Meta_Accumulator< A > &a, const Image< I > &input, const Window< W > &win)
template<typename V , typename I >
mln::trait::ch_value< I, V >::ret convert (const V &v, const Image< I > &input)
template<typename I , typename W , typename O >
void fast_median (const Image< I > &input, const Window< W > &win, Image< O > &output)
template<typename I , typename D >
void fill (Image< I > &ima, const D &data)
template<typename I , typename J >
void fill_with_image (Image< I > &ima, const Image< J > &data)
template<typename I , typename W >
mln::trait::concrete< I >::ret median (const Image< I > &input, const Window< W > &win)
template<typename Pd , typename Ps >
void memcpy_ (Generalized_Pixel< Pd > &dest, const Generalized_Pixel< Ps > &src, std::size_t n)
template<typename P >
void memset_ (Generalized_Pixel< P > &pix, const typename P::value &v, std::size_t n)
template<typename I >
void memset_ (I &input, const typename I::psite &p, const typename I::value &v, std::size_t n)
template<typename I , typename J >
void paste (const Image< I > &input, Image< J > &output)
template<typename I , typename J >
void paste_without_localization (const Image< I > &input, Image< J > &output)
template<typename I >
void replace (Image< I > &input, const typename I::value &old_value, const typename I::value &new_value)
template<typename V , typename I >
mln::trait::ch_value< I, V >::ret saturate (V v, const Image< I > &input)
template<typename I , typename V >
mln::trait::ch_value< I, V >::ret saturate (const Image< I > &input, const V &min, const V &max)
template<typename I >
void saturate_inplace (Image< I > &input, const typename I::value &min, const typename I::value &max)
template<typename I >
util::array< unsignedsort_offsets_increasing (const Image< I > &input)
template<typename I >
p_array< typename I::psite > sort_psites_decreasing (const Image< I > &input)
template<typename I >
p_array< typename I::psite > sort_psites_increasing (const Image< I > &input)
template<typename I , typename J >
void split (const Image< I > &input, Image< J > &r, Image< J > &g, Image< J > &b)
template<typename V , typename I >
mln::trait::ch_value< I, V >::ret stretch (const V &v, const Image< I > &input)
template<typename I , typename O >
void to_enc (const Image< I > &input, Image< O > &output)
template<typename I , typename F >
mln::trait::ch_value< I,
typename F::result >::ret 
transform (const Image< I > &input, const Function_v2v< F > &f)
template<typename I1 , typename I2 , typename F >
mln::trait::ch_value< I1,
typename F::result >::ret 
transform (const Image< I1 > &input1, const Image< I2 > &input2, const Function_vv2v< F > &f)
template<typename I , typename F >
void transform_inplace (Image< I > &ima, const Function_v2v< F > &f)
template<typename I1 , typename I2 , typename F >
void transform_inplace (Image< I1 > &ima, const Image< I2 > &aux, const Function_vv2v< F > &f)
template<typename A , typename I >
A::result update (Accumulator< A > &a, const Image< I > &input)
template<typename V , typename I >
mln::trait::ch_value< I, V >::ret wrap (const V &v, const Image< I > &input)
template<typename I , typename V >
void fill_with_value (Image< I > &ima, const V &val)

Detailed Description

Namespace of image processing routines related to pixel data.

Function Documentation

template<typename I , typename J >
void mln::data::fill_with_image ( Image< I > &  ima,
const Image< J > &  data 
)

Fill the image ima with the values of the image data.

Parameters
[in,out]imaThe image to be filled.
[in]dataThe image.
Warning
The definition domain of ima has to be included in the one of data.
Precondition
ima.domain <= data.domain.
template<typename I , typename V >
void mln::data::fill_with_value ( Image< I > &  ima,
const V &  val 
)

Fill the whole image ima with the single value v.

Parameters
[in,out]imaThe image to be filled.
[in]valThe value to assign to all sites.
Precondition
ima has to be initialized.
template<typename Pd , typename Ps >
void mln::data::memcpy_ ( Generalized_Pixel< Pd > &  dest,
const Generalized_Pixel< Ps > &  src,
std::size_t  n 
)

Copy n pixels starting from pixel src to destination starting from pixel dest.

Parameters
[in,out]destThe destination pixel (to set values).
[in]srcThe source pixel (to get values).
[in]nThe number of pixels to copy.
Precondition
src has to be initialized.
dest has to be initialized.
src and dest image values have to own the same sizeof.
dest pixel has to be on dest image domain.
src pixel has to be on src image domain.
dest + n has to be on dest image domain.
src + n has to be on src image domain.
template<typename P >
void mln::data::memset_ ( Generalized_Pixel< P > &  pix,
const typename P::value &  v,
std::size_t  n 
)

Set n pixels at value v starting from pixel p.

  \param[in,out] pix The first pixel to set.
  \param[in] v The value to set pixels with.
  \param[in] n The number of pixels to set.

  \pre \p pix image has to be initialized.
  \pre \p pix has to be on \p pix image domain.
  \pre \p pix + \p n has to be on \p pix image domain.
template<typename I >
void mln::data::memset_ ( I &  input,
const typename I::psite &  p,
const typename I::value &  v,
std::size_t  n 
)

Set n points of image ima at value v starting from point p.

Parameters
[in,out]inputThe image.
[in]pThe first point to set.
[in]vThe value to set to points.
[in]nThe number of points to set.
Precondition
input image has to be initialized.
input has to own p.
p + n is <= input size.
template<typename I >
util::array<unsigned> mln::data::sort_offsets_increasing ( const Image< I > &  input)

Sort pixel offsets of the image input wrt increasing pixel values.

template<typename I >
p_array<typename I ::psite> mln::data::sort_psites_decreasing ( const Image< I > &  input)

Sort psites the image input through a function f to set the output image in decreasing way.

Parameters
[in]inputThe input image.
Precondition
input.is_valid
template<typename I >
p_array<typename I ::psite> mln::data::sort_psites_increasing ( const Image< I > &  input)

Sort psites the image input through a function f to set the output image in increasing way.

Parameters
[in]inputThe input image.
Precondition
input.is_valid
template<typename I , typename F >
void mln::data::transform_inplace ( Image< I > &  ima,
const Function_v2v< F > &  f 
)

Transform inplace the image ima through a function f.

  \param[in,out] ima The image to be transformed.
  \param[in] f The function.

  This routine runs: \n
  for all p of \p ima, \p ima(p) = \p f( \p ima(p) ).
template<typename I1 , typename I2 , typename F >
void mln::data::transform_inplace ( Image< I1 > &  ima,
const Image< I2 > &  aux,
const Function_vv2v< F > &  f 
)

Transform inplace the image ima with the image aux through a function f.

Parameters
[in]imaThe image to be transformed.
[in]auxThe auxiliary image.
[in]fThe function.

This routine runs:
for all p of ima, ima(p) = f( ima(p), aux(p) ).