\hypertarget{a02579}{
\section{mln::graph Namespace Reference}
\label{d4/d70/a02579}\index{mln::graph@{mln::graph}}
}


Namespace of graph related routines.  


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename G , typename F $>$ }\\F::result \hyperlink{a02579_a0d94705250a73632811424da75e475a9}{compute} (const \hyperlink{a00040}{Graph}$<$ G $>$ \&g\_\-, F \&functor)
\begin{DoxyCompactList}\small\item\em Base routine to compute attributes on a graph. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I , typename N , typename L $>$ }\\mln::trait::ch\_\-value$<$ I, L $>$::ret \hyperlink{a02579_a217610ee768afcb87120c90a4bea2277}{labeling} (const \hyperlink{a00044}{Image}$<$ I $>$ \&graph\_\-image\_\-, const \hyperlink{a00296}{Neighborhood}$<$ N $>$ \&nbh\_\-, L \&nlabels)
\begin{DoxyCompactList}\small\item\em Label graph components. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I , typename M $>$ }\\\hyperlink{a00241}{graph\_\-elt\_\-neighborhood\_\-if}$<$ mln\_\-graph(I), typename I::domain\_\-t, M $>$ \hyperlink{a02579_aeb3d05f6e66da0a0b4bc20b4c4795b13}{to\_\-neighb} (const \hyperlink{a00044}{Image}$<$ I $>$ \&graph\_\-image\_\-, const \hyperlink{a00044}{Image}$<$ M $>$ \&graph\_\-mask\_\-image\_\-)
\begin{DoxyCompactList}\small\item\em Make a custom graph neighborhood from a mask image. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I , typename M $>$ }\\\hyperlink{a00243}{graph\_\-elt\_\-window\_\-if}$<$ mln\_\-graph(I), typename I::domain\_\-t, M $>$ \hyperlink{a02579_abd1f857704f9f0a0b3085e77c1a012e4}{to\_\-win} (const \hyperlink{a00044}{Image}$<$ I $>$ \&graph\_\-image\_\-, const \hyperlink{a00044}{Image}$<$ M $>$ \&graph\_\-mask\_\-image\_\-)
\begin{DoxyCompactList}\small\item\em Make a custom graph window from a mask image. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Namespace of graph related routines. 

\subsection{Function Documentation}
\hypertarget{a02579_a0d94705250a73632811424da75e475a9}{
\index{mln::graph@{mln::graph}!compute@{compute}}
\index{compute@{compute}!mln::graph@{mln::graph}}
\subsubsection[{compute}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename G , typename F $>$ F::result mln::graph::compute (
\begin{DoxyParamCaption}
\item[{const Graph$<$ G $>$ \&}]{ g\_\-, }
\item[{F \&}]{ functor}
\end{DoxyParamCaption}
)}}
\label{d4/d70/a02579_a0d94705250a73632811424da75e475a9}


Base routine to compute attributes on a graph. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em g\_\-}]A graph. \item[\mbox{\tt[in]} {\em functor}]A functor implementing the right interface.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The computed data.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
canvas::browsing::depth\_\-first\_\-search 
\end{DoxySeeAlso}


Definition at line 63 of file graph/compute.hh.

\hypertarget{a02579_a217610ee768afcb87120c90a4bea2277}{
\index{mln::graph@{mln::graph}!labeling@{labeling}}
\index{labeling@{labeling}!mln::graph@{mln::graph}}
\subsubsection[{labeling}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename N , typename L $>$ mln::trait::ch\_\-value$<$ I, L $>$::ret mln::graph::labeling (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ graph\_\-image\_\-, }
\item[{const Neighborhood$<$ N $>$ \&}]{ nbh\_\-, }
\item[{L \&}]{ nlabels}
\end{DoxyParamCaption}
)}}
\label{d4/d70/a02579_a217610ee768afcb87120c90a4bea2277}


Label graph components. 

\hyperlink{a00439}{Vertex} with id 0, usuallly used to represent the background component, will be labeled with an id different from 0. Therefore, the labeling starts from 1.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em graph\_\-image\_\-}]A graph image (\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{a00440}{vertex\_\-image}, \hyperlink{a00184}{edge\_\-image}). 
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em nbh\_\-}]A graph neighborhood. \item[\mbox{\tt[in,out]} {\em nlabels}]The number of labels found.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a \hyperlink{a00040}{Graph} image of labels. 
\end{DoxyReturn}


Definition at line 72 of file labeling.hh.



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

\hypertarget{a02579_aeb3d05f6e66da0a0b4bc20b4c4795b13}{
\index{mln::graph@{mln::graph}!to\_\-neighb@{to\_\-neighb}}
\index{to\_\-neighb@{to\_\-neighb}!mln::graph@{mln::graph}}
\subsubsection[{to\_\-neighb}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename M $>$ {\bf graph\_\-elt\_\-neighborhood\_\-if}$<$ mln\_\-graph(I), typename I::domain\_\-t, M $>$ mln::graph::to\_\-neighb (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ graph\_\-image\_\-, }
\item[{const Image$<$ M $>$ \&}]{ graph\_\-mask\_\-image\_\-}
\end{DoxyParamCaption}
)}}
\label{d4/d70/a02579_aeb3d05f6e66da0a0b4bc20b4c4795b13}


Make a custom graph neighborhood from a mask image. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em graph\_\-image\_\-}]A graph image (\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{a00440}{vertex\_\-image} and \hyperlink{a00184}{edge\_\-image}). 
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em graph\_\-mask\_\-image\_\-}]A graph image of bool used as a mask.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A masked neighborhood on graph. 
\end{DoxyReturn}


Definition at line 57 of file to\_\-neighb.hh.

\hypertarget{a02579_abd1f857704f9f0a0b3085e77c1a012e4}{
\index{mln::graph@{mln::graph}!to\_\-win@{to\_\-win}}
\index{to\_\-win@{to\_\-win}!mln::graph@{mln::graph}}
\subsubsection[{to\_\-win}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename M $>$ {\bf graph\_\-elt\_\-window\_\-if}$<$ mln\_\-graph(I), typename I::domain\_\-t, M $>$ mln::graph::to\_\-win (
\begin{DoxyParamCaption}
\item[{const Image$<$ I $>$ \&}]{ graph\_\-image\_\-, }
\item[{const Image$<$ M $>$ \&}]{ graph\_\-mask\_\-image\_\-}
\end{DoxyParamCaption}
)}}
\label{d4/d70/a02579_abd1f857704f9f0a0b3085e77c1a012e4}


Make a custom graph window from a mask image. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em graph\_\-image\_\-}]A graph image (\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{a00440}{vertex\_\-image} and \hyperlink{a00184}{edge\_\-image}). 
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em graph\_\-mask\_\-image\_\-}]A graph image of bool used as a mask.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A masked window on graph. 
\end{DoxyReturn}


Definition at line 57 of file to\_\-win.hh.

