\hypertarget{a02688}{
\section{mln::morpho::tree::filter Namespace Reference}
\label{d4/dfe/a02688}\index{mln::morpho::tree::filter@{mln::morpho::tree::filter}}
}


Namespace for attribute filtering.  


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename T , typename F , typename P $>$ }\\void \hyperlink{a02688_a6eb1c29c6b805e54574cd37f1199416e}{direct} (const T \&tree, \hyperlink{a00044}{Image}$<$ F $>$ \&f\_\-, const \hyperlink{a00033}{Function\_\-v2b}$<$ P $>$ \&pred\_\-)
\begin{DoxyCompactList}\small\item\em Direct non-\/pruning strategy. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename T , typename F , typename P $>$ }\\void \hyperlink{a02688_a7709e748a6947f289e32c2dc10cbf38d}{filter} (const T \&tree, \hyperlink{a00044}{Image}$<$ F $>$ \&f\_\-, const \hyperlink{a00033}{Function\_\-v2b}$<$ P $>$ \&pred\_\-, const typename F::value \&v)
\begin{DoxyCompactList}\small\item\em Filter the image {\ttfamily f\_\-} with a given value. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename T , typename F , typename P $>$ }\\void \hyperlink{a02688_ad24093b6bb2acf7b83323e4119206e43}{max} (const T \&tree, \hyperlink{a00044}{Image}$<$ F $>$ \&f\_\-, const \hyperlink{a00033}{Function\_\-v2b}$<$ P $>$ \&pred\_\-)
\begin{DoxyCompactList}\small\item\em Max pruning strategy. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename T , typename F , typename P $>$ }\\void \hyperlink{a02688_a01b17286b9b5a4e101bb2b7f14286a20}{min} (const T \&tree, \hyperlink{a00044}{Image}$<$ F $>$ \&f\_\-, const \hyperlink{a00033}{Function\_\-v2b}$<$ P $>$ \&pred\_\-)
\begin{DoxyCompactList}\small\item\em Min pruning strategy. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename T , typename F , typename P $>$ }\\void \hyperlink{a02688_ad522dda4c1fb26c9be928cf822320043}{subtractive} (const T \&tree, \hyperlink{a00044}{Image}$<$ F $>$ \&f\_\-, const \hyperlink{a00033}{Function\_\-v2b}$<$ P $>$ \&pred\_\-)
\begin{DoxyCompactList}\small\item\em Subtractive pruning strategy. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Namespace for attribute filtering. 

\subsection{Function Documentation}
\hypertarget{a02688_a6eb1c29c6b805e54574cd37f1199416e}{
\index{mln::morpho::tree::filter@{mln::morpho::tree::filter}!direct@{direct}}
\index{direct@{direct}!mln::morpho::tree::filter@{mln::morpho::tree::filter}}
\subsubsection[{direct}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T , typename F , typename P $>$ void mln::morpho::tree::filter::direct (
\begin{DoxyParamCaption}
\item[{const T \&}]{ tree, }
\item[{Image$<$ F $>$ \&}]{ f\_\-, }
\item[{const Function\_\-v2b$<$ P $>$ \&}]{ pred\_\-}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d4/dfe/a02688_a6eb1c29c6b805e54574cd37f1199416e}


Direct non-\/pruning strategy. 

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


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em tree}]Component tree. \item[\mbox{\tt[out]} {\em f\_\-}]\hyperlink{a00044}{Image} to filter. \item[\mbox{\tt[in]} {\em pred\_\-}]Filtering criterion. \end{DoxyParams}


Definition at line 73 of file direct.hh.

\hypertarget{a02688_a7709e748a6947f289e32c2dc10cbf38d}{
\index{mln::morpho::tree::filter@{mln::morpho::tree::filter}!filter@{filter}}
\index{filter@{filter}!mln::morpho::tree::filter@{mln::morpho::tree::filter}}
\subsubsection[{filter}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T , typename F , typename P $>$ void mln::morpho::tree::filter::filter (
\begin{DoxyParamCaption}
\item[{const T \&}]{ tree, }
\item[{Image$<$ F $>$ \&}]{ f\_\-, }
\item[{const Function\_\-v2b$<$ P $>$ \&}]{ pred\_\-, }
\item[{const typename F::value \&}]{ v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d4/dfe/a02688_a7709e748a6947f289e32c2dc10cbf38d}


Filter the image {\ttfamily f\_\-} with a given value. 

The sub-\/components of nodes that does not match the predicate {\ttfamily pred\_\-} are filled with the given value {\ttfamily v}.


\begin{DoxyParams}{Parameters}
\item[{\em tree}]Component tree. \item[{\em f\_\-}]\hyperlink{a00044}{Image} function. \item[{\em pred\_\-}]Predicate. \item[{\em v}]\hyperlink{a00418}{Value} to propagate. \end{DoxyParams}


Definition at line 73 of file morpho/tree/filter/filter.hh.



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

\hypertarget{a02688_ad24093b6bb2acf7b83323e4119206e43}{
\index{mln::morpho::tree::filter@{mln::morpho::tree::filter}!max@{max}}
\index{max@{max}!mln::morpho::tree::filter@{mln::morpho::tree::filter}}
\subsubsection[{max}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T , typename F , typename P $>$ void mln::morpho::tree::filter::max (
\begin{DoxyParamCaption}
\item[{const T \&}]{ tree, }
\item[{Image$<$ F $>$ \&}]{ f\_\-, }
\item[{const Function\_\-v2b$<$ P $>$ \&}]{ pred\_\-}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d4/dfe/a02688_ad24093b6bb2acf7b83323e4119206e43}


Max pruning strategy. 

A node is removed iif all of its children are removed or if it does not verify the predicate {\ttfamily pred\_\-}.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em tree}]Component tree. \item[\mbox{\tt[out]} {\em f\_\-}]\hyperlink{a00044}{Image} to filter. \item[\mbox{\tt[in]} {\em pred\_\-}]Filtering criterion. \end{DoxyParams}


Definition at line 74 of file morpho/tree/filter/max.hh.



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

\hypertarget{a02688_a01b17286b9b5a4e101bb2b7f14286a20}{
\index{mln::morpho::tree::filter@{mln::morpho::tree::filter}!min@{min}}
\index{min@{min}!mln::morpho::tree::filter@{mln::morpho::tree::filter}}
\subsubsection[{min}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T , typename F , typename P $>$ void mln::morpho::tree::filter::min (
\begin{DoxyParamCaption}
\item[{const T \&}]{ tree, }
\item[{Image$<$ F $>$ \&}]{ f\_\-, }
\item[{const Function\_\-v2b$<$ P $>$ \&}]{ pred\_\-}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d4/dfe/a02688_a01b17286b9b5a4e101bb2b7f14286a20}


Min pruning strategy. 

A node is removed iif its parent is removed or if it does not verify the predicate {\ttfamily pred\_\-}.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em tree}]Component tree. \item[\mbox{\tt[out]} {\em f\_\-}]\hyperlink{a00044}{Image} to filter. \item[\mbox{\tt[in]} {\em pred\_\-}]Filtering criterion. \end{DoxyParams}


Definition at line 75 of file morpho/tree/filter/min.hh.



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

\hypertarget{a02688_ad522dda4c1fb26c9be928cf822320043}{
\index{mln::morpho::tree::filter@{mln::morpho::tree::filter}!subtractive@{subtractive}}
\index{subtractive@{subtractive}!mln::morpho::tree::filter@{mln::morpho::tree::filter}}
\subsubsection[{subtractive}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T , typename F , typename P $>$ void mln::morpho::tree::filter::subtractive (
\begin{DoxyParamCaption}
\item[{const T \&}]{ tree, }
\item[{Image$<$ F $>$ \&}]{ f\_\-, }
\item[{const Function\_\-v2b$<$ P $>$ \&}]{ pred\_\-}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d4/dfe/a02688_ad522dda4c1fb26c9be928cf822320043}


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.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em tree}]Component tree. \item[\mbox{\tt[out]} {\em f\_\-}]\hyperlink{a00044}{Image} to filter. \item[\mbox{\tt[in]} {\em pred\_\-}]Filtering criterion. \end{DoxyParams}


Definition at line 77 of file subtractive.hh.



References mln::morpho::tree::propagate\_\-if().

