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

Functions

template<typename T , typename F , typename P >
void direct (const T &tree, Image< F > &f_, const Function_v2b< P > &pred_)
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)
template<typename T , typename F , typename P >
void max (const T &tree, Image< F > &f_, const Function_v2b< P > &pred_)
template<typename T , typename F , typename P >
void min (const T &tree, Image< F > &f_, const Function_v2b< P > &pred_)
template<typename T , typename F , typename P >
void subtractive (const T &tree, Image< F > &f_, const Function_v2b< P > &pred_)

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]treeComponent 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
treeComponent tree.
f_Image function.
pred_Predicate.
vValue to propagate.
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]treeComponent tree.
[out]f_Image to filter.
[in]pred_Filtering criterion.
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]treeComponent tree.
[out]f_Image to filter.
[in]pred_Filtering criterion.
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]treeComponent tree.
[out]f_Image to filter.
[in]pred_Filtering criterion.