\hypertarget{a00256}{
\section{mln::labeled\_\-image$<$ I $>$ Class Template Reference}
\label{d0/def/a00256}\index{mln::labeled\_\-image@{mln::labeled\_\-image}}
}


Morpher providing an improved interface for labeled image.  




{\ttfamily \#include $<$labeled\_\-image.hh$>$}



Inheritance diagram for mln::labeled\_\-image$<$ I $>$:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=344pt]{d6/de6/a03534}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef \hyperlink{a00110}{accu::shape::bbox}$<$ typename I::psite $>$::result \hyperlink{a00047_a4aa368ab36dbcbee4edb5782437e0541}{bbox\_\-t}
\begin{DoxyCompactList}\small\item\em Type of the bounding component bounding boxes. \item\end{DoxyCompactList}\item 
typedef \hyperlink{a00256}{labeled\_\-image}$<$ tag::image\_\-$<$ I $>$ $>$ \hyperlink{a00256_ac239c06ad277d80bf029b68d810f7bf0}{skeleton}
\begin{DoxyCompactList}\small\item\em Skeleton. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
const \hyperlink{a00047_a4aa368ab36dbcbee4edb5782437e0541}{bbox\_\-t} \& \hyperlink{a00047_a16b69c684d605310b29c761ff904f494}{bbox} (const typename I::value \&\hyperlink{a00427}{label}) const
\begin{DoxyCompactList}\small\item\em Return the bounding box of the component {\ttfamily label}. \item\end{DoxyCompactList}\item 
const \hyperlink{a00027}{util::array}$<$ \hyperlink{a00047_a4aa368ab36dbcbee4edb5782437e0541}{bbox\_\-t} $>$ \& \hyperlink{a00047_a3da2a9683e91db4b641b87080cb938e1}{bboxes} () const
\begin{DoxyCompactList}\small\item\em Return the component bounding boxes. \item\end{DoxyCompactList}\item 
I::value \hyperlink{a00047_ac53d28d44ee59aeabcd74bb1ffc2082d}{nlabels} () const
\begin{DoxyCompactList}\small\item\em Return the number of labels;. \item\end{DoxyCompactList}\item 
\hyperlink{a00306}{p\_\-if}$<$ mln\_\-box(I), fun::eq\_\-v2b\_\-expr\_\-$<$ pw::value\_\-$<$ I $>$, pw::cst\_\-$<$ typename I::value $>$ $>$ $>$ \hyperlink{a00047_ad0ca7baeb18d1488dc3a07084e3a1940}{subdomain} (const typename I::value \&\hyperlink{a00427}{label}) const
\begin{DoxyCompactList}\small\item\em Return the domain of the component with label {\ttfamily label}. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
\hyperlink{a00256_a3ba12db4fd14361ae5387b541a20413d}{labeled\_\-image} ()
\begin{DoxyCompactList}\small\item\em Constructors

Constructor without argument. \item\end{DoxyCompactList}\item 
\hyperlink{a00256_ab4d9d4ba4a47ae7490dd812b6cae6cbf}{labeled\_\-image} (const I \&ima, const typename I::value \&nlabels)
\begin{DoxyCompactList}\small\item\em Constructor from an image {\ttfamily ima} and the number of labels {\ttfamily nlabels}. \item\end{DoxyCompactList}\item 
\hyperlink{a00256_aa77867608025b04a03a18cb335621913}{labeled\_\-image} (const I \&ima, const typename I::value \&nlabels, const \hyperlink{a00027}{util::array}$<$ mln\_\-box(I)$>$ \&bboxes)
\begin{DoxyCompactList}\small\item\em Constructor from an image {\ttfamily ima}, the number of labels {\ttfamily nlabels} and the object bounding boxes. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
void \hyperlink{a00047_afe9188730fb3cb2bff4d752d8fd6dedb}{relabel} (const \hyperlink{a00034}{Function\_\-v2v}$<$ F $>$ \&f)
\begin{DoxyCompactList}\small\item\em Relabel according to a function. \item\end{DoxyCompactList}\item 
void \hyperlink{a00047_ab7ed854defc4cce95773a87163a6e887}{relabel} (const \hyperlink{a00033}{Function\_\-v2b}$<$ F $>$ \&f)
\begin{DoxyCompactList}\small\item\em Labels may be removed. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{a00047_aab2b1055c44a8d888929692cdc16c5bf}{update\_\-data} (const fun::i2v::array$<$ typename I::value $>$ \&relabel\_\-fun)
\begin{DoxyCompactList}\small\item\em Update bounding boxes information. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename I$>$ class mln::labeled\_\-image$<$ I $>$}

Morpher providing an improved interface for labeled image. 
\begin{DoxyTemplParams}{Template Parameters}
\item[{\em I}]The label image type.\end{DoxyTemplParams}
This image type allows to access every site set at a given label.

This image type guaranties that labels are contiguous (from 1 to n). 

Definition at line 105 of file labeled\_\-image.hh.



\subsection{Member Typedef Documentation}
\hypertarget{a00047_a4aa368ab36dbcbee4edb5782437e0541}{
\index{mln::labeled\_\-image@{mln::labeled\_\-image}!bbox\_\-t@{bbox\_\-t}}
\index{bbox\_\-t@{bbox\_\-t}!mln::labeled_image@{mln::labeled\_\-image}}
\subsubsection[{bbox\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}typedef {\bf accu::shape::bbox}$<$typename I ::psite$>$::result {\bf mln::labeled\_\-image\_\-base}$<$ I, {\bf labeled\_\-image}$<$ I $>$  $>$::{\bf bbox\_\-t}\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{d6/d2d/a00047_a4aa368ab36dbcbee4edb5782437e0541}


Type of the bounding component bounding boxes. 



Definition at line 124 of file labeled\_\-image\_\-base.hh.

\hypertarget{a00256_ac239c06ad277d80bf029b68d810f7bf0}{
\index{mln::labeled\_\-image@{mln::labeled\_\-image}!skeleton@{skeleton}}
\index{skeleton@{skeleton}!mln::labeled_image@{mln::labeled\_\-image}}
\subsubsection[{skeleton}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I$>$ typedef {\bf labeled\_\-image}$<$ tag::image\_\-$<$I$>$ $>$ {\bf mln::labeled\_\-image}$<$ I $>$::{\bf skeleton}}}
\label{d0/def/a00256_ac239c06ad277d80bf029b68d810f7bf0}


Skeleton. 



Definition at line 113 of file labeled\_\-image.hh.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{a00256_a3ba12db4fd14361ae5387b541a20413d}{
\index{mln::labeled\_\-image@{mln::labeled\_\-image}!labeled\_\-image@{labeled\_\-image}}
\index{labeled\_\-image@{labeled\_\-image}!mln::labeled_image@{mln::labeled\_\-image}}
\subsubsection[{labeled\_\-image}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I $>$ {\bf mln::labeled\_\-image}$<$ I $>$::{\bf labeled\_\-image} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/def/a00256_a3ba12db4fd14361ae5387b541a20413d}


Constructors

Constructor without argument. 



Definition at line 193 of file labeled\_\-image.hh.

\hypertarget{a00256_ab4d9d4ba4a47ae7490dd812b6cae6cbf}{
\index{mln::labeled\_\-image@{mln::labeled\_\-image}!labeled\_\-image@{labeled\_\-image}}
\index{labeled\_\-image@{labeled\_\-image}!mln::labeled_image@{mln::labeled\_\-image}}
\subsubsection[{labeled\_\-image}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I $>$ {\bf mln::labeled\_\-image}$<$ I $>$::{\bf labeled\_\-image} (
\begin{DoxyParamCaption}
\item[{const I \&}]{ ima, }
\item[{const typename I::value \&}]{ nlabels}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/def/a00256_ab4d9d4ba4a47ae7490dd812b6cae6cbf}


Constructor from an image {\ttfamily ima} and the number of labels {\ttfamily nlabels}. 



Definition at line 199 of file labeled\_\-image.hh.

\hypertarget{a00256_aa77867608025b04a03a18cb335621913}{
\index{mln::labeled\_\-image@{mln::labeled\_\-image}!labeled\_\-image@{labeled\_\-image}}
\index{labeled\_\-image@{labeled\_\-image}!mln::labeled_image@{mln::labeled\_\-image}}
\subsubsection[{labeled\_\-image}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I $>$ {\bf mln::labeled\_\-image}$<$ I $>$::{\bf labeled\_\-image} (
\begin{DoxyParamCaption}
\item[{const I \&}]{ ima, }
\item[{const typename I::value \&}]{ nlabels, }
\item[{const {\bf util::array}$<$ mln\_\-box(I)$>$ \&}]{ bboxes}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/def/a00256_aa77867608025b04a03a18cb335621913}


Constructor from an image {\ttfamily ima}, the number of labels {\ttfamily nlabels} and the object bounding boxes. 



Definition at line 206 of file labeled\_\-image.hh.



References mln::data::compute().



\subsection{Member Function Documentation}
\hypertarget{a00047_a16b69c684d605310b29c761ff904f494}{
\index{mln::labeled\_\-image@{mln::labeled\_\-image}!bbox@{bbox}}
\index{bbox@{bbox}!mln::labeled_image@{mln::labeled\_\-image}}
\subsubsection[{bbox}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf bbox\_\-t}\& {\bf mln::labeled\_\-image\_\-base}$<$ I, {\bf labeled\_\-image}$<$ I $>$  $>$::bbox (
\begin{DoxyParamCaption}
\item[{const typename I::value \&}]{ label}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{d6/d2d/a00047_a16b69c684d605310b29c761ff904f494}


Return the bounding box of the component {\ttfamily label}. 

\hypertarget{a00047_a3da2a9683e91db4b641b87080cb938e1}{
\index{mln::labeled\_\-image@{mln::labeled\_\-image}!bboxes@{bboxes}}
\index{bboxes@{bboxes}!mln::labeled_image@{mln::labeled\_\-image}}
\subsubsection[{bboxes}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf util::array}$<${\bf bbox\_\-t}$>$\& {\bf mln::labeled\_\-image\_\-base}$<$ I, {\bf labeled\_\-image}$<$ I $>$  $>$::bboxes (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{d6/d2d/a00047_a3da2a9683e91db4b641b87080cb938e1}


Return the component bounding boxes. 

\hypertarget{a00047_ac53d28d44ee59aeabcd74bb1ffc2082d}{
\index{mln::labeled\_\-image@{mln::labeled\_\-image}!nlabels@{nlabels}}
\index{nlabels@{nlabels}!mln::labeled_image@{mln::labeled\_\-image}}
\subsubsection[{nlabels}]{\setlength{\rightskip}{0pt plus 5cm}I ::value {\bf mln::labeled\_\-image\_\-base}$<$ I, {\bf labeled\_\-image}$<$ I $>$  $>$::nlabels (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{d6/d2d/a00047_ac53d28d44ee59aeabcd74bb1ffc2082d}


Return the number of labels;. 

\hypertarget{a00047_ab7ed854defc4cce95773a87163a6e887}{
\index{mln::labeled\_\-image@{mln::labeled\_\-image}!relabel@{relabel}}
\index{relabel@{relabel}!mln::labeled_image@{mln::labeled\_\-image}}
\subsubsection[{relabel}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf mln::labeled\_\-image\_\-base}$<$ I, {\bf labeled\_\-image}$<$ I $>$  $>$::relabel (
\begin{DoxyParamCaption}
\item[{const {\bf Function\_\-v2b}$<$ F $>$ \&}]{ f}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{d6/d2d/a00047_ab7ed854defc4cce95773a87163a6e887}


Labels may be removed. 

This overload make sure the labeling is still contiguous. \hypertarget{a00047_afe9188730fb3cb2bff4d752d8fd6dedb}{
\index{mln::labeled\_\-image@{mln::labeled\_\-image}!relabel@{relabel}}
\index{relabel@{relabel}!mln::labeled_image@{mln::labeled\_\-image}}
\subsubsection[{relabel}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf mln::labeled\_\-image\_\-base}$<$ I, {\bf labeled\_\-image}$<$ I $>$  $>$::relabel (
\begin{DoxyParamCaption}
\item[{const {\bf Function\_\-v2v}$<$ F $>$ \&}]{ f}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{d6/d2d/a00047_afe9188730fb3cb2bff4d752d8fd6dedb}


Relabel according to a function. 

Merge or delete labels according to the given function. This method ensures that the labeling remains contiguous. \hypertarget{a00047_ad0ca7baeb18d1488dc3a07084e3a1940}{
\index{mln::labeled\_\-image@{mln::labeled\_\-image}!subdomain@{subdomain}}
\index{subdomain@{subdomain}!mln::labeled_image@{mln::labeled\_\-image}}
\subsubsection[{subdomain}]{\setlength{\rightskip}{0pt plus 5cm}{\bf p\_\-if}$<$mln\_\-box(I), fun::eq\_\-v2b\_\-expr\_\-$<$pw::value\_\-$<$I$>$, pw::cst\_\-$<$typename I ::value$>$ $>$ $>$ {\bf mln::labeled\_\-image\_\-base}$<$ I, {\bf labeled\_\-image}$<$ I $>$  $>$::subdomain (
\begin{DoxyParamCaption}
\item[{const typename I::value \&}]{ label}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{d6/d2d/a00047_ad0ca7baeb18d1488dc3a07084e3a1940}


Return the domain of the component with label {\ttfamily label}. 

\hypertarget{a00047_aab2b1055c44a8d888929692cdc16c5bf}{
\index{mln::labeled\_\-image@{mln::labeled\_\-image}!update\_\-data@{update\_\-data}}
\index{update\_\-data@{update\_\-data}!mln::labeled_image@{mln::labeled\_\-image}}
\subsubsection[{update\_\-data}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf mln::labeled\_\-image\_\-base}$<$ I, {\bf labeled\_\-image}$<$ I $>$  $>$::update\_\-data (
\begin{DoxyParamCaption}
\item[{const fun::i2v::array$<$ typename I::value $>$ \&}]{ relabel\_\-fun}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected, inherited\mbox{]}}}}
\label{d6/d2d/a00047_aab2b1055c44a8d888929692cdc16c5bf}


Update bounding boxes information. 

