mln::morpho::tree::filter Namespace Reference

Namespace for attribute filtering. More...


Functions

template<typename T , typename F , typename P >
void direct (const T &tree, Image< F > &f_, const Function_v2b< P > &pred_)
 Direct non-pruning strategy.
template<typename T , typename F , typename P >
void filter (const T &tree, Image< F > &f_, const Function_v2b< P > &pred_, const typename F::value &v)
 Filter the image f_ with a given value.
template<typename T , typename F , typename P >
void max (const T &tree, Image< F > &f_, const Function_v2b< P > &pred_)
 Max pruning strategy.
template<typename T , typename F , typename P >
void min (const T &tree, Image< F > &f_, const Function_v2b< P > &pred_)
 Min pruning strategy.
template<typename T , typename F , typename P >
void subtractive (const T &tree, Image< F > &f_, const Function_v2b< P > &pred_)
 Subtractive pruning strategy.


Detailed Description

Namespace for attribute filtering.


Function Documentation

template<typename T , typename F , typename P >
void mln::morpho::tree::filter::direct ( const T &  tree,
Image< F > &  f_,
const Function_v2b< P > &  pred_ 
) [inline]

Direct non-pruning strategy.

A node is removed if it does not verify the predicate. The sub-components remain intact.

Parameters:
[in] tree Component tree.
[out] f_ Image to filter.
[in] pred_ Filtering criterion.

template<typename T , typename F , typename P >
void mln::morpho::tree::filter::filter ( const T &  tree,
Image< F > &  f_,
const Function_v2b< P > &  pred_,
const typename F::value &  v 
) [inline]

Filter the image f_ with a given value.

The sub-components of nodes that does not match the predicate pred_ are filled with the given value v.

Parameters:
tree Component tree.
f_ Image function.
pred_ Predicate.
v Value to propagate.

References mln::data::fill(), and mln::initialize().

template<typename T , typename F , typename P >
void mln::morpho::tree::filter::max ( const T &  tree,
Image< F > &  f_,
const Function_v2b< P > &  pred_ 
) [inline]

Max pruning strategy.

A node is removed iif all of its children are removed or if it does not verify the predicate pred_.

Parameters:
[in] tree Component tree.
[out] f_ Image to filter.
[in] pred_ Filtering criterion.

References mln::data::fill(), and mln::initialize().

template<typename T , typename F , typename P >
void mln::morpho::tree::filter::min ( const T &  tree,
Image< F > &  f_,
const Function_v2b< P > &  pred_ 
) [inline]

Min pruning strategy.

A node is removed iif its parent is removed or if it does not verify the predicate pred_.

Parameters:
[in] tree Component tree.
[out] f_ Image to filter.
[in] pred_ Filtering criterion.

References mln::data::fill(), and mln::initialize().

template<typename T , typename F , typename P >
void mln::morpho::tree::filter::subtractive ( const T &  tree,
Image< F > &  f_,
const Function_v2b< P > &  pred_ 
) [inline]

Subtractive pruning strategy.

The node is removed if it does not verify the predicate. The sub-components values are set to the value of the removed component.

Parameters:
[in] tree Component tree.
[out] f_ Image to filter.
[in] pred_ Filtering criterion.

References mln::morpho::tree::propagate_if().


Generated on Tue Jul 14 16:33:13 2009 for Milena (Olena) by  doxygen 1.5.9