\hypertarget{a00047}{
\section{mln::labeled\_\-image\_\-base$<$ I, E $>$ Class Template Reference}
\label{d6/d2d/a00047}\index{mln::labeled\_\-image\_\-base@{mln::labeled\_\-image\_\-base}}
}


Base class Morpher providing an improved interface for labeled image.  




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



Inheritance diagram for mln::labeled\_\-image\_\-base$<$ I, E $>$:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=344pt]{d1/dfd/a03536}
\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}\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{a00047_af08a6c25ea7802e4ee95b513e116eb0b}{labeled\_\-image\_\-base} ()
\begin{DoxyCompactList}\small\item\em Constructors

Constructor without argument. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename F $>$ }\\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 
{\footnotesize template$<$typename F $>$ }\\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, typename E$>$ class mln::labeled\_\-image\_\-base$<$ I, E $>$}

Base class 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 116 of file labeled\_\-image\_\-base.hh.



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


Type of the bounding component bounding boxes. 



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



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


Constructors

Constructor without argument. 



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



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


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



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



Referenced by mln::labeled\_\-image\_\-base$<$ I, E $>$::subdomain().

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


Return the component bounding boxes. 



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

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


Return the number of labels;. 



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

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


Labels may be removed. 

This overload make sure the labeling is still contiguous. 

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



References mln::labeling::relabel\_\-inplace(), mln::make::relabelfun(), and mln::labeled\_\-image\_\-base$<$ I, E $>$::update\_\-data().

\hypertarget{a00047_afe9188730fb3cb2bff4d752d8fd6dedb}{
\index{mln::labeled\_\-image\_\-base@{mln::labeled\_\-image\_\-base}!relabel@{relabel}}
\index{relabel@{relabel}!mln::labeled_image_base@{mln::labeled\_\-image\_\-base}}
\subsubsection[{relabel}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I , typename E $>$ template$<$typename F $>$ void {\bf mln::labeled\_\-image\_\-base}$<$ I, E $>$::relabel (
\begin{DoxyParamCaption}
\item[{const {\bf Function\_\-v2v}$<$ F $>$ \&}]{ f}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\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. 

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



References mln::labeling::relabel\_\-inplace(), mln::make::relabelfun(), and mln::labeled\_\-image\_\-base$<$ I, E $>$::update\_\-data().

\hypertarget{a00047_ad0ca7baeb18d1488dc3a07084e3a1940}{
\index{mln::labeled\_\-image\_\-base@{mln::labeled\_\-image\_\-base}!subdomain@{subdomain}}
\index{subdomain@{subdomain}!mln::labeled_image_base@{mln::labeled\_\-image\_\-base}}
\subsubsection[{subdomain}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I, typename E $>$ {\bf p\_\-if}$<$ mln\_\-box(I), fun::eq\_\-v2b\_\-expr\_\-$<$ pw::value\_\-$<$ I $>$, pw::cst\_\-$<$ typename I::value $>$ $>$ $>$ {\bf mln::labeled\_\-image\_\-base}$<$ I, E $>$::subdomain (
\begin{DoxyParamCaption}
\item[{const typename I::value \&}]{ label}
\end{DoxyParamCaption}
) const}}
\label{d6/d2d/a00047_ad0ca7baeb18d1488dc3a07084e3a1940}


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



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



References mln::labeled\_\-image\_\-base$<$ I, E $>$::bbox().

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


Update bounding boxes information. 



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



References mln::util::array$<$ T $>$::size().



Referenced by mln::labeled\_\-image\_\-base$<$ I, E $>$::relabel().

