\hypertarget{a02687}{
\section{mln::morpho::tree Namespace Reference}
\label{d5/d25/a02687}\index{mln::morpho::tree@{mln::morpho::tree}}
}


Namespace of morphological tree-\/related routines.  


\subsection*{Namespaces}
\begin{DoxyCompactItemize}
\item 
namespace \hyperlink{a02688}{filter}


\begin{DoxyCompactList}\small\item\em Namespace for attribute filtering. \item\end{DoxyCompactList}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename A , typename T $>$ }\\mln::trait::ch\_\-value$<$ typename T::function, typename A::result $>$::ret \hyperlink{a02687_aad3be30758c93b621669f3f6b6c95cc3}{compute\_\-attribute\_\-image} (const \hyperlink{a00026}{Accumulator}$<$ A $>$ \&a, const T \&t, mln::trait::ch\_\-value$<$ typename T::function, A $>$::ret $\ast$accu\_\-image=0)
\begin{DoxyCompactList}\small\item\em Compute an attribute image using tree with a parent relationship between sites. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename A , typename T , typename V $>$ }\\mln::trait::ch\_\-value$<$ typename T::function, typename A::result $>$::ret \hyperlink{a02687_a3c5081cee6ab4f80ef75a40aee2fb1b4}{compute\_\-attribute\_\-image\_\-from} (const \hyperlink{a00026}{Accumulator}$<$ A $>$ \&a, const T \&t, const \hyperlink{a00044}{Image}$<$ V $>$ \&values, mln::trait::ch\_\-value$<$ typename T::function, A $>$::ret $\ast$accu\_\-image=0)
\begin{DoxyCompactList}\small\item\em The same as compute\_\-attribute\_\-image but uses the values stored by {\ttfamily values} image instead. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I , typename N , typename S $>$ }\\mln::trait::ch\_\-value$<$ I, typename I::psite $>$::ret \hyperlink{a02687_a53970b884e3011c7d24e8232d23cec6b}{compute\_\-parent} (const \hyperlink{a00044}{Image}$<$ I $>$ \&f, const \hyperlink{a00296}{Neighborhood}$<$ N $>$ \&nbh, const \hyperlink{a00348}{Site\_\-Set}$<$ S $>$ \&s)
\begin{DoxyCompactList}\small\item\em Compute a tree with a parent relationship between sites. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I , typename N $>$ }\\data$<$ I, \hyperlink{a00300}{p\_\-array}$<$ typename I::psite $>$ $>$ \hyperlink{a02687_a4066efe820883c34f51c121df0495ddb}{dual\_\-input\_\-max\_\-tree} (const \hyperlink{a00044}{Image}$<$ I $>$ \&f, const \hyperlink{a00044}{Image}$<$ I $>$ \&m, const \hyperlink{a00296}{Neighborhood}$<$ N $>$ \&nbh)
\begin{DoxyCompactList}\small\item\em Compute the dual input max tree using mask-\/based connectivity. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I , typename N $>$ }\\data$<$ I, \hyperlink{a00300}{p\_\-array}$<$ typename I::psite $>$ $>$ \hyperlink{a02687_a77e523df136ba9fbeb853e2f69569a2f}{max\_\-tree} (const \hyperlink{a00044}{Image}$<$ I $>$ \&f, const \hyperlink{a00296}{Neighborhood}$<$ N $>$ \&nbh)
\begin{DoxyCompactList}\small\item\em Compute a canonized max-\/tree. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I , typename N $>$ }\\data$<$ I, \hyperlink{a00300}{p\_\-array}$<$ typename I::psite $>$ $>$ \hyperlink{a02687_a218866352e5f28a4c32abb2354af9f3b}{min\_\-tree} (const \hyperlink{a00044}{Image}$<$ I $>$ \&f, const \hyperlink{a00296}{Neighborhood}$<$ N $>$ \&nbh)
\begin{DoxyCompactList}\small\item\em Compute a canonized min-\/tree. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename T , typename A , typename P , typename W $>$ }\\void \hyperlink{a02687_a7411f9d102641d274a65d1dfa8e32506}{propagate\_\-if} (const T \&tree, \hyperlink{a00044}{Image}$<$ A $>$ \&a\_\-, const way\_\-of\_\-propagation$<$ W $>$ \&prop\_\-, const \hyperlink{a00033}{Function\_\-v2b}$<$ P $>$ \&pred\_\-, const typename A::value \&v)
\item 
{\footnotesize template$<$typename T , typename A , typename P $>$ }\\void \hyperlink{a02687_a5e14c110b4179e3b8738cecab1ad87df}{propagate\_\-if} (const T \&tree, \hyperlink{a00044}{Image}$<$ A $>$ \&a\_\-, const desc\_\-propagation \&prop\_\-, const \hyperlink{a00033}{Function\_\-v2b}$<$ P $>$ \&pred\_\-)
\item 
{\footnotesize template$<$typename T , typename A , typename W $>$ }\\void \hyperlink{a02687_af36467d3b2ee9b1cc764bda5b20cda83}{propagate\_\-if\_\-value} (const T \&tree, \hyperlink{a00044}{Image}$<$ A $>$ \&a\_\-, const way\_\-of\_\-propagation$<$ W $>$ \&prop, const typename A::value \&v)
\item 
{\footnotesize template$<$typename T , typename A , typename W $>$ }\\void \hyperlink{a02687_afcc8f1bfcbeb2c0fb8d223677e84e53c}{propagate\_\-if\_\-value} (const T \&tree, \hyperlink{a00044}{Image}$<$ A $>$ \&a\_\-, const way\_\-of\_\-propagation$<$ W $>$ \&prop\_\-, const typename A::value \&v, const typename A::value \&v\_\-prop)
\item 
{\footnotesize template$<$typename T , typename A $>$ }\\void \hyperlink{a02687_a33715ab66dc79cddc1455812822ddf2e}{propagate\_\-node\_\-to\_\-ancestors} (typename A::psite n, const T \&t, \hyperlink{a00044}{Image}$<$ A $>$ \&a\_\-, const typename A::value \&v)
\item 
{\footnotesize template$<$typename T , typename A $>$ }\\void \hyperlink{a02687_a9d9e95fa84e1d4a6a004f1fdbda67115}{propagate\_\-node\_\-to\_\-ancestors} (typename A::psite n, const T \&t, \hyperlink{a00044}{Image}$<$ A $>$ \&a\_\-)
\item 
{\footnotesize template$<$typename T , typename A $>$ }\\void \hyperlink{a02687_ab0a5674336aacb8a9f0833d8811bcad2}{propagate\_\-node\_\-to\_\-descendants} (typename A::psite n, const T \&t, \hyperlink{a00044}{Image}$<$ A $>$ \&a\_\-, const typename A::value \&v, unsigned $\ast$nb\_\-leaves=0)
\item 
{\footnotesize template$<$typename T , typename A $>$ }\\void \hyperlink{a02687_ae7070ebd256058bfb52df82acfcb707c}{propagate\_\-node\_\-to\_\-descendants} (typename A::psite \&n, const T \&t, \hyperlink{a00044}{Image}$<$ A $>$ \&a\_\-, unsigned $\ast$nb\_\-leaves=0)
\item 
{\footnotesize template$<$typename T , typename F $>$ }\\void \hyperlink{a02687_a5f8e96348806a5a9056b923dec926c32}{propagate\_\-representative} (const T \&t, \hyperlink{a00044}{Image}$<$ F $>$ \&f\_\-)
\begin{DoxyCompactList}\small\item\em Propagate the representative node's value to non-\/representative points of the component. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Namespace of morphological tree-\/related routines. 

\subsection{Function Documentation}
\hypertarget{a02687_aad3be30758c93b621669f3f6b6c95cc3}{
\index{mln::morpho::tree@{mln::morpho::tree}!compute\_\-attribute\_\-image@{compute\_\-attribute\_\-image}}
\index{compute\_\-attribute\_\-image@{compute\_\-attribute\_\-image}!mln::morpho::tree@{mln::morpho::tree}}
\subsubsection[{compute\_\-attribute\_\-image}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A , typename T $>$ mln::trait::ch\_\-value$<$ typename T::function, typename A::result $>$::ret mln::morpho::tree::compute\_\-attribute\_\-image (
\begin{DoxyParamCaption}
\item[{const Accumulator$<$ A $>$ \&}]{ a, }
\item[{const T \&}]{ t, }
\item[{mln::trait::ch\_\-value$<$ typename T::function, A $>$::ret $\ast$}]{ accu\_\-image = {\ttfamily 0}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d5/d25/a02687_aad3be30758c93b621669f3f6b6c95cc3}


Compute an attribute image using tree with a parent relationship between sites. 

In the attribute image, the resulting value at a node is the 'sum' of its sub-\/components value + the attribute value at this node.

Warning: {\ttfamily s} translates the ordering related to the \char`\"{}natural\char`\"{} childhood relationship. The parenthood is thus inverted w.r.t. to {\ttfamily s}.

It is very convenient since all processing upon the parent tree are performed following {\ttfamily s} (in the default \char`\"{}forward\char`\"{} way).

FIXME: Put it more clearly...

The parent result image verifies: \par

\begin{DoxyItemize}
\item p is root iff parent(p) == p \par

\item p is a node iff either p is root or f(parent(p)) != f(p).
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em a}]Attribute. \item[\mbox{\tt[in]} {\em t}]Component tree. \item[\mbox{\tt[out]} {\em accu\_\-image}]Optional argument used to store image of attribute accumulator.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The attribute image. 
\end{DoxyReturn}


Definition at line 216 of file compute\_\-attribute\_\-image.hh.



Referenced by compute\_\-attribute\_\-image\_\-from().

\hypertarget{a02687_a3c5081cee6ab4f80ef75a40aee2fb1b4}{
\index{mln::morpho::tree@{mln::morpho::tree}!compute\_\-attribute\_\-image\_\-from@{compute\_\-attribute\_\-image\_\-from}}
\index{compute\_\-attribute\_\-image\_\-from@{compute\_\-attribute\_\-image\_\-from}!mln::morpho::tree@{mln::morpho::tree}}
\subsubsection[{compute\_\-attribute\_\-image\_\-from}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A , typename T , typename V $>$ mln::trait::ch\_\-value$<$ typename T::function, typename A::result $>$::ret mln::morpho::tree::compute\_\-attribute\_\-image\_\-from (
\begin{DoxyParamCaption}
\item[{const Accumulator$<$ A $>$ \&}]{ a, }
\item[{const T \&}]{ t, }
\item[{const Image$<$ V $>$ \&}]{ values, }
\item[{mln::trait::ch\_\-value$<$ typename T::function, A $>$::ret $\ast$}]{ accu\_\-image = {\ttfamily 0}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d5/d25/a02687_a3c5081cee6ab4f80ef75a40aee2fb1b4}


The same as compute\_\-attribute\_\-image but uses the values stored by {\ttfamily values} image instead. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em a}]Attribute. \item[\mbox{\tt[in]} {\em t}]Component tree. \item[\mbox{\tt[in]} {\em values}]\hyperlink{a00418}{Value} image. \item[\mbox{\tt[out]} {\em accu\_\-image}]Optional argument used to store image.\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\end{DoxyReturn}


Definition at line 233 of file compute\_\-attribute\_\-image.hh.



References compute\_\-attribute\_\-image().

\hypertarget{a02687_a53970b884e3011c7d24e8232d23cec6b}{
\index{mln::morpho::tree@{mln::morpho::tree}!compute\_\-parent@{compute\_\-parent}}
\index{compute\_\-parent@{compute\_\-parent}!mln::morpho::tree@{mln::morpho::tree}}
\subsubsection[{compute\_\-parent}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename N , typename S $>$ mln::trait::ch\_\-value$<$ I, typename I::psite $>$::ret mln::morpho::tree::compute\_\-parent (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ f, }
\item[{const Neighborhood$<$ N $>$ \&}]{ nbh, }
\item[{const Site\_\-Set$<$ S $>$ \&}]{ s}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d5/d25/a02687_a53970b884e3011c7d24e8232d23cec6b}


Compute a tree with a parent relationship between sites. 

Warning: {\ttfamily s} translates the ordering related to the \char`\"{}natural\char`\"{} childhood relationship. The parenthood is thus inverted w.r.t. to {\ttfamily s}.

It is very convenient since most processing routines upon the parent tree are performed following {\ttfamily s} (in the default \char`\"{}forward\char`\"{} way). Indeed that is the way to propagate information from parents to children.

The parent result image verifies: \par

\begin{DoxyItemize}
\item p is root iff parent(p) == p \par

\item p is a node iff either p is root or f(parent(p)) != f(p).
\end{DoxyItemize}

The choice \char`\"{}s means childhood\char`\"{} is consistent with labeling in binary images. In that particular case, while browsing the image in forward scan (video), we expect to find first a tree root (a first point, representative of a component) and then the other component points. Please note that it leads to increasing values of labels in the \char`\"{}natural\char`\"{} video scan.

Since mathematical morphology on functions is related to morphology on sets, we clearly want to keep the equivalence between \char`\"{}component labeling\char`\"{} and \char`\"{}component filtering\char`\"{} using trees.

FIXME: Put it more clearly... Insert pictures!

A binary image:


\begin{DoxyItemize}
\item $|$ $|$ -\/ -\/ \par

\item $|$ $|$ -\/ $|$ \par

\item -\/ -\/ -\/ -\/ \par

\item -\/ $|$ $|$ -\/ \par

\end{DoxyItemize}

where '$|$' means true and '-\/' means false.

Its labeling:

0 1 1 0 0 \par
 0 1 1 0 2 \par
 0 0 0 0 0 \par
 0 0 3 3 0 \par


The corresponding forest:

x o . x x \par
 x . . x o \par
 x x x x x \par
 x x o . x \par


where 'x' means \char`\"{}no data\char`\"{}, 'o' is a tree root (representative point for a component), and '.' is a tree regular (non-\/root) point (in a component by not its representative point).

The forest, with the parent relationship looks like:

o $<$ . \par
 $^\wedge$ r \par
 . . o \par
 \par
 \par
 o $<$ . \par
 

Definition at line 286 of file compute\_\-parent.hh.

\hypertarget{a02687_a4066efe820883c34f51c121df0495ddb}{
\index{mln::morpho::tree@{mln::morpho::tree}!dual\_\-input\_\-max\_\-tree@{dual\_\-input\_\-max\_\-tree}}
\index{dual\_\-input\_\-max\_\-tree@{dual\_\-input\_\-max\_\-tree}!mln::morpho::tree@{mln::morpho::tree}}
\subsubsection[{dual\_\-input\_\-max\_\-tree}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename N $>$ morpho::tree::data$<$ I, {\bf p\_\-array}$<$ typename I::psite $>$ $>$ mln::morpho::tree::dual\_\-input\_\-max\_\-tree (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ f, }
\item[{const Image$<$ I $>$ \&}]{ m, }
\item[{const Neighborhood$<$ N $>$ \&}]{ nbh}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d5/d25/a02687_a4066efe820883c34f51c121df0495ddb}


Compute the dual input max tree using mask-\/based connectivity. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em f}]The original image. \item[\mbox{\tt[in]} {\em m}]The connectivity mask. \item[\mbox{\tt[in]} {\em nbh}]The neighborhood of the mask.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The computed tree. 
\end{DoxyReturn}


Definition at line 109 of file dual\_\-input\_\-tree.hh.

\hypertarget{a02687_a77e523df136ba9fbeb853e2f69569a2f}{
\index{mln::morpho::tree@{mln::morpho::tree}!max\_\-tree@{max\_\-tree}}
\index{max\_\-tree@{max\_\-tree}!mln::morpho::tree@{mln::morpho::tree}}
\subsubsection[{max\_\-tree}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename N $>$ data$<$ I, {\bf p\_\-array}$<$ typename I::psite $>$ $>$ mln::morpho::tree::max\_\-tree (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ f, }
\item[{const Neighborhood$<$ N $>$ \&}]{ nbh}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d5/d25/a02687_a77e523df136ba9fbeb853e2f69569a2f}


Compute a canonized max-\/tree. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em f}]The input image. \item[\mbox{\tt[in]} {\em nbh}]The neighborhood.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The corresponding max-\/tree structure. 
\end{DoxyReturn}


Definition at line 100 of file component\_\-tree.hh.



References mln::data::sort\_\-psites\_\-increasing().

\hypertarget{a02687_a218866352e5f28a4c32abb2354af9f3b}{
\index{mln::morpho::tree@{mln::morpho::tree}!min\_\-tree@{min\_\-tree}}
\index{min\_\-tree@{min\_\-tree}!mln::morpho::tree@{mln::morpho::tree}}
\subsubsection[{min\_\-tree}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename N $>$ data$<$ I, {\bf p\_\-array}$<$ typename I::psite $>$ $>$ mln::morpho::tree::min\_\-tree (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ f, }
\item[{const Neighborhood$<$ N $>$ \&}]{ nbh}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d5/d25/a02687_a218866352e5f28a4c32abb2354af9f3b}


Compute a canonized min-\/tree. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em f}]The input image. \item[\mbox{\tt[in]} {\em nbh}]The neighborhood.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The corresponding min-\/tree structure. 
\end{DoxyReturn}


Definition at line 77 of file component\_\-tree.hh.



References mln::data::sort\_\-psites\_\-decreasing().

\hypertarget{a02687_a7411f9d102641d274a65d1dfa8e32506}{
\index{mln::morpho::tree@{mln::morpho::tree}!propagate\_\-if@{propagate\_\-if}}
\index{propagate\_\-if@{propagate\_\-if}!mln::morpho::tree@{mln::morpho::tree}}
\subsubsection[{propagate\_\-if}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T , typename A , typename P , typename W $>$ void mln::morpho::tree::propagate\_\-if (
\begin{DoxyParamCaption}
\item[{const T \&}]{ tree, }
\item[{Image$<$ A $>$ \&}]{ a\_\-, }
\item[{const way\_\-of\_\-propagation$<$ W $>$ \&}]{ prop\_\-, }
\item[{const Function\_\-v2b$<$ P $>$ \&}]{ pred\_\-, }
\item[{const typename A::value \&}]{ v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d5/d25/a02687_a7411f9d102641d274a65d1dfa8e32506}
Propagate nodes checking the predicate {\ttfamily pred} in the way defined by {\ttfamily way\_\-of\_\-propagation}.


\begin{DoxyParams}{Parameters}
\item[{\em tree}]Component tree used for propagation. \item[{\em a\_\-}]Attributed image where values are propagated. \item[{\em prop\_\-}]Propagate node in acsendant or descendant way. \item[{\em pred\_\-}]Predicate that node must check to be propagated. \item[{\em v}]\hyperlink{a00418}{Value} to be propagated. (By default {\ttfamily v} is the value at the node being propagated). \end{DoxyParams}


Definition at line 293 of file propagate\_\-if.hh.



Referenced by propagate\_\-if(), propagate\_\-if\_\-value(), and mln::morpho::tree::filter::subtractive().

\hypertarget{a02687_a5e14c110b4179e3b8738cecab1ad87df}{
\index{mln::morpho::tree@{mln::morpho::tree}!propagate\_\-if@{propagate\_\-if}}
\index{propagate\_\-if@{propagate\_\-if}!mln::morpho::tree@{mln::morpho::tree}}
\subsubsection[{propagate\_\-if}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T , typename A , typename P $>$ void mln::morpho::tree::propagate\_\-if (
\begin{DoxyParamCaption}
\item[{const T \&}]{ tree, }
\item[{Image$<$ A $>$ \&}]{ a\_\-, }
\item[{const desc\_\-propagation \&}]{ prop\_\-, }
\item[{const Function\_\-v2b$<$ P $>$ \&}]{ pred\_\-}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d5/d25/a02687_a5e14c110b4179e3b8738cecab1ad87df}
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 

Definition at line 310 of file propagate\_\-if.hh.



References propagate\_\-if().

\hypertarget{a02687_af36467d3b2ee9b1cc764bda5b20cda83}{
\index{mln::morpho::tree@{mln::morpho::tree}!propagate\_\-if\_\-value@{propagate\_\-if\_\-value}}
\index{propagate\_\-if\_\-value@{propagate\_\-if\_\-value}!mln::morpho::tree@{mln::morpho::tree}}
\subsubsection[{propagate\_\-if\_\-value}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T , typename A , typename W $>$ void mln::morpho::tree::propagate\_\-if\_\-value (
\begin{DoxyParamCaption}
\item[{const T \&}]{ tree, }
\item[{Image$<$ A $>$ \&}]{ a\_\-, }
\item[{const way\_\-of\_\-propagation$<$ W $>$ \&}]{ prop, }
\item[{const typename A::value \&}]{ v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d5/d25/a02687_af36467d3b2ee9b1cc764bda5b20cda83}
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 

Definition at line 278 of file propagate\_\-if.hh.



References propagate\_\-if().

\hypertarget{a02687_afcc8f1bfcbeb2c0fb8d223677e84e53c}{
\index{mln::morpho::tree@{mln::morpho::tree}!propagate\_\-if\_\-value@{propagate\_\-if\_\-value}}
\index{propagate\_\-if\_\-value@{propagate\_\-if\_\-value}!mln::morpho::tree@{mln::morpho::tree}}
\subsubsection[{propagate\_\-if\_\-value}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T , typename A , typename W $>$ void mln::morpho::tree::propagate\_\-if\_\-value (
\begin{DoxyParamCaption}
\item[{const T \&}]{ tree, }
\item[{Image$<$ A $>$ \&}]{ a\_\-, }
\item[{const way\_\-of\_\-propagation$<$ W $>$ \&}]{ prop\_\-, }
\item[{const typename A::value \&}]{ v, }
\item[{const typename A::value \&}]{ v\_\-prop}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d5/d25/a02687_afcc8f1bfcbeb2c0fb8d223677e84e53c}
Propagate nodes having the value v in the way defined by {\ttfamily way\_\-of\_\-propagation}.


\begin{DoxyParams}{Parameters}
\item[{\em tree}]Component tree used for propagation. \item[{\em a\_\-}]Attributed image where values are propagated. \item[{\em prop\_\-}]Propagate node in acsendant or descendant way. \item[{\em v}]\hyperlink{a00418}{Value} that node must have to be propagated. \item[{\em v\_\-prop}]\hyperlink{a00418}{Value} to propagate (By default it is the value at the node being propagated). \end{DoxyParams}


Definition at line 262 of file propagate\_\-if.hh.



References propagate\_\-if().

\hypertarget{a02687_a33715ab66dc79cddc1455812822ddf2e}{
\index{mln::morpho::tree@{mln::morpho::tree}!propagate\_\-node\_\-to\_\-ancestors@{propagate\_\-node\_\-to\_\-ancestors}}
\index{propagate\_\-node\_\-to\_\-ancestors@{propagate\_\-node\_\-to\_\-ancestors}!mln::morpho::tree@{mln::morpho::tree}}
\subsubsection[{propagate\_\-node\_\-to\_\-ancestors}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T , typename A $>$ void mln::morpho::tree::propagate\_\-node\_\-to\_\-ancestors (
\begin{DoxyParamCaption}
\item[{typename A::psite}]{ n, }
\item[{const T \&}]{ t, }
\item[{Image$<$ A $>$ \&}]{ a\_\-, }
\item[{const typename A::value \&}]{ v}
\end{DoxyParamCaption}
)}}
\label{d5/d25/a02687_a33715ab66dc79cddc1455812822ddf2e}
Propagate a value {\ttfamily v} from a node {\ttfamily n} to its ancestors.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em n}]Node to propagate. \item[\mbox{\tt[in]} {\em t}]Component tree used for propagation. \item[\mbox{\tt[in]} {\em a\_\-}]Attribute image where values are propagated. \item[\mbox{\tt[in]} {\em v}]\hyperlink{a00418}{Value} to propagate. \end{DoxyParams}


Definition at line 170 of file propagate\_\-node.hh.



Referenced by propagate\_\-node\_\-to\_\-ancestors().

\hypertarget{a02687_a9d9e95fa84e1d4a6a004f1fdbda67115}{
\index{mln::morpho::tree@{mln::morpho::tree}!propagate\_\-node\_\-to\_\-ancestors@{propagate\_\-node\_\-to\_\-ancestors}}
\index{propagate\_\-node\_\-to\_\-ancestors@{propagate\_\-node\_\-to\_\-ancestors}!mln::morpho::tree@{mln::morpho::tree}}
\subsubsection[{propagate\_\-node\_\-to\_\-ancestors}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T , typename A $>$ void mln::morpho::tree::propagate\_\-node\_\-to\_\-ancestors (
\begin{DoxyParamCaption}
\item[{typename A::psite}]{ n, }
\item[{const T \&}]{ t, }
\item[{Image$<$ A $>$ \&}]{ a\_\-}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d5/d25/a02687_a9d9e95fa84e1d4a6a004f1fdbda67115}
Propagate the node's value to its ancestors.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em n}]Node to propagate. \item[\mbox{\tt[in]} {\em t}]Component tree used for propagation. \item[\mbox{\tt[in,out]} {\em a\_\-}]Attribute image where values are propagated. \end{DoxyParams}


Definition at line 197 of file propagate\_\-node.hh.



References propagate\_\-node\_\-to\_\-ancestors().

\hypertarget{a02687_ab0a5674336aacb8a9f0833d8811bcad2}{
\index{mln::morpho::tree@{mln::morpho::tree}!propagate\_\-node\_\-to\_\-descendants@{propagate\_\-node\_\-to\_\-descendants}}
\index{propagate\_\-node\_\-to\_\-descendants@{propagate\_\-node\_\-to\_\-descendants}!mln::morpho::tree@{mln::morpho::tree}}
\subsubsection[{propagate\_\-node\_\-to\_\-descendants}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T , typename A $>$ void mln::morpho::tree::propagate\_\-node\_\-to\_\-descendants (
\begin{DoxyParamCaption}
\item[{typename A::psite}]{ n, }
\item[{const T \&}]{ t, }
\item[{Image$<$ A $>$ \&}]{ a\_\-, }
\item[{const typename A::value \&}]{ v, }
\item[{unsigned $\ast$}]{ nb\_\-leaves = {\ttfamily 0}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d5/d25/a02687_ab0a5674336aacb8a9f0833d8811bcad2}
Propagate a value {\ttfamily v} from a node {\ttfamily n} to its descendants.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em n}]Node to propagate. \item[\mbox{\tt[in]} {\em t}]Component tree used for propagation. \item[\mbox{\tt[in]} {\em a\_\-}]Attribute image where values are propagated. \item[\mbox{\tt[in]} {\em v}]\hyperlink{a00418}{Value} to propagate. \item[\mbox{\tt[out]} {\em nb\_\-leaves}]Optional. Store the number of leaves in the component. \end{DoxyParams}


Definition at line 120 of file propagate\_\-node.hh.

\hypertarget{a02687_ae7070ebd256058bfb52df82acfcb707c}{
\index{mln::morpho::tree@{mln::morpho::tree}!propagate\_\-node\_\-to\_\-descendants@{propagate\_\-node\_\-to\_\-descendants}}
\index{propagate\_\-node\_\-to\_\-descendants@{propagate\_\-node\_\-to\_\-descendants}!mln::morpho::tree@{mln::morpho::tree}}
\subsubsection[{propagate\_\-node\_\-to\_\-descendants}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T , typename A $>$ void mln::morpho::tree::propagate\_\-node\_\-to\_\-descendants (
\begin{DoxyParamCaption}
\item[{typename A::psite \&}]{ n, }
\item[{const T \&}]{ t, }
\item[{Image$<$ A $>$ \&}]{ a\_\-, }
\item[{unsigned $\ast$}]{ nb\_\-leaves = {\ttfamily 0}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d5/d25/a02687_ae7070ebd256058bfb52df82acfcb707c}
Propagate the node's value to its descendants.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em n}]Node to propagate. \item[\mbox{\tt[in]} {\em t}]Component tree used for propagation. \item[\mbox{\tt[in]} {\em a\_\-}]Attribute image where values are propagated. \item[\mbox{\tt[out]} {\em nb\_\-leaves}]Optional. Store the number of leaves in the component. \end{DoxyParams}
\hypertarget{a02687_a5f8e96348806a5a9056b923dec926c32}{
\index{mln::morpho::tree@{mln::morpho::tree}!propagate\_\-representative@{propagate\_\-representative}}
\index{propagate\_\-representative@{propagate\_\-representative}!mln::morpho::tree@{mln::morpho::tree}}
\subsubsection[{propagate\_\-representative}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T , typename F $>$ void mln::morpho::tree::propagate\_\-representative (
\begin{DoxyParamCaption}
\item[{const T \&}]{ t, }
\item[{Image$<$ F $>$ \&}]{ f\_\-}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d5/d25/a02687_a5f8e96348806a5a9056b923dec926c32}


Propagate the representative node's value to non-\/representative points of the component. 


\begin{DoxyParams}{Parameters}
\item[{\em t}]Component tree. \item[{\em f\_\-}]\hyperlink{a00418}{Value} image. \end{DoxyParams}


Definition at line 65 of file propagate\_\-representative.hh.

