\hypertarget{a00115}{
\section{mln::accu::stat::histo3d\_\-rgb$<$ V $>$ Struct Template Reference}
\label{d2/da3/a00115}\index{mln::accu::stat::histo3d\_\-rgb@{mln::accu::stat::histo3d\_\-rgb}}
}


Define a histogram as accumulator which returns an \hyperlink{a00043}{image3d}.  




{\ttfamily \#include $<$histo3d\_\-rgb.hh$>$}



Inherits base$<$ image3d$<$ unsigned $>$, histo3d\_\-rgb$<$ V $>$ $>$.

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{a00115_af334d04b44cb430461f50fb39171e761}{is\_\-valid} () const 
\begin{DoxyCompactList}\small\item\em Check whethever this accumulator is able to return a result. \item\end{DoxyCompactList}\item 
void \hyperlink{a00026_a745794a4ef16926d3c09ebbaa8b6b557}{take\_\-as\_\-init} (const T \&t)
\begin{DoxyCompactList}\small\item\em Take as initialization the value {\ttfamily t}. \item\end{DoxyCompactList}\item 
void \hyperlink{a00026_a138e094daa1a85f345bbdfd852c9fc67}{take\_\-n\_\-times} (unsigned n, const T \&t)
\begin{DoxyCompactList}\small\item\em Take {\ttfamily n} times the value {\ttfamily t}. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
\hyperlink{a00115_a5b298d02f8f880429d5976b426c9f671}{histo3d\_\-rgb} ()
\begin{DoxyCompactList}\small\item\em Constructors. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
void \hyperlink{a00115_ac94942fbb4742260e7c702f37797c25f}{init} ()
\begin{DoxyCompactList}\small\item\em Manipulators. \item\end{DoxyCompactList}\item 
void \hyperlink{a00115_a522b874e35c51b896eca9092338d6a63}{take} (const argument \&t)
\begin{DoxyCompactList}\small\item\em Update the histogram with the RGB pixel t. \item\end{DoxyCompactList}\item 
void \hyperlink{a00115_ab04f19ca1068f0d27017fdf0970475c5}{take} (const \hyperlink{a00115}{histo3d\_\-rgb}$<$ V $>$ \&other)
\begin{DoxyCompactList}\small\item\em Update the histogram with an other histogram. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
\hyperlink{a00043}{result} \hyperlink{a00115_afe8fa2d7048422cc6979bd1ab8697158}{to\_\-result} () const 
\begin{DoxyCompactList}\small\item\em Accessors. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}


\subsection{Detailed Description}
\subsubsection*{template$<$typename V$>$ struct mln::accu::stat::histo3d\_\-rgb$<$ V $>$}

Define a histogram as accumulator which returns an \hyperlink{a00043}{image3d}. Param V defines the type of the input image value. It is in this space that we count the values. For instance, this histogram works well for \hyperlink{a00248}{image2d}$<$ rgb$<$2$>$ $>$ or with \hyperlink{a00248}{image2d}$<$ rgb$<$7$>$ $>$. The number of bins depends directly the values V. For 8 bits there is 256x3 bins. Note that less quantification works too. 

Definition at line 167 of file histo3d\_\-rgb.hh.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{a00115_a5b298d02f8f880429d5976b426c9f671}{
\index{mln::accu::stat::histo3d\_\-rgb@{mln::accu::stat::histo3d\_\-rgb}!histo3d\_\-rgb@{histo3d\_\-rgb}}
\index{histo3d\_\-rgb@{histo3d\_\-rgb}!mln::accu::stat::histo3d_rgb@{mln::accu::stat::histo3d\_\-rgb}}
\subsubsection[{histo3d\_\-rgb}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename V $>$ {\bf mln::accu::stat::histo3d\_\-rgb}$<$ V $>$::{\bf histo3d\_\-rgb} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d2/da3/a00115_a5b298d02f8f880429d5976b426c9f671}


Constructors. 

Infer the size of the resulting \hyperlink{a00043}{image3d} domain. By evaluating the minimum and the maximum of V, we define the domain of the resulting \hyperlink{a00043}{image3d}. 

Definition at line 244 of file histo3d\_\-rgb.hh.



\subsection{Member Function Documentation}
\hypertarget{a00115_ac94942fbb4742260e7c702f37797c25f}{
\index{mln::accu::stat::histo3d\_\-rgb@{mln::accu::stat::histo3d\_\-rgb}!init@{init}}
\index{init@{init}!mln::accu::stat::histo3d_rgb@{mln::accu::stat::histo3d\_\-rgb}}
\subsubsection[{init}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename V $>$ void {\bf mln::accu::stat::histo3d\_\-rgb}$<$ V $>$::init (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d2/da3/a00115_ac94942fbb4742260e7c702f37797c25f}


Manipulators. 

Initialize the histogram with zero value. This method must be called just before starting the use of the histogram. If it's not, resulting values won't converge to the density. 

Definition at line 268 of file histo3d\_\-rgb.hh.



References mln::data::fill(), and mln::literal::zero.

\hypertarget{a00115_af334d04b44cb430461f50fb39171e761}{
\index{mln::accu::stat::histo3d\_\-rgb@{mln::accu::stat::histo3d\_\-rgb}!is\_\-valid@{is\_\-valid}}
\index{is\_\-valid@{is\_\-valid}!mln::accu::stat::histo3d_rgb@{mln::accu::stat::histo3d\_\-rgb}}
\subsubsection[{is\_\-valid}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename V $>$ bool {\bf mln::accu::stat::histo3d\_\-rgb}$<$ V $>$::is\_\-valid (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d2/da3/a00115_af334d04b44cb430461f50fb39171e761}


Check whethever this accumulator is able to return a result. 

Depends if the resulting \hyperlink{a00247}{image1d} is valid. We can assume it is quite always the case. 

Definition at line 307 of file histo3d\_\-rgb.hh.

\hypertarget{a00115_a522b874e35c51b896eca9092338d6a63}{
\index{mln::accu::stat::histo3d\_\-rgb@{mln::accu::stat::histo3d\_\-rgb}!take@{take}}
\index{take@{take}!mln::accu::stat::histo3d_rgb@{mln::accu::stat::histo3d\_\-rgb}}
\subsubsection[{take}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename V $>$ void {\bf mln::accu::stat::histo3d\_\-rgb}$<$ V $>$::take (
\begin{DoxyParamCaption}
\item[{const argument \&}]{ t}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d2/da3/a00115_a522b874e35c51b896eca9092338d6a63}


Update the histogram with the RGB pixel t. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em t}]a graylevel pixel of type V.\end{DoxyParams}
The end user shouldn't call this method. In place of it, he can go through the data compute interface. 

Definition at line 275 of file histo3d\_\-rgb.hh.

\hypertarget{a00115_ab04f19ca1068f0d27017fdf0970475c5}{
\index{mln::accu::stat::histo3d\_\-rgb@{mln::accu::stat::histo3d\_\-rgb}!take@{take}}
\index{take@{take}!mln::accu::stat::histo3d_rgb@{mln::accu::stat::histo3d\_\-rgb}}
\subsubsection[{take}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename V$>$ void {\bf mln::accu::stat::histo3d\_\-rgb}$<$ V $>$::take (
\begin{DoxyParamCaption}
\item[{const {\bf histo3d\_\-rgb}$<$ V $>$ \&}]{ other}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d2/da3/a00115_ab04f19ca1068f0d27017fdf0970475c5}


Update the histogram with an other histogram. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em other}]the other histogram.\end{DoxyParams}
The end user shouldn't call this method. This is part of data compute interface mechanism. 

Definition at line 286 of file histo3d\_\-rgb.hh.

\hypertarget{a00026_a745794a4ef16926d3c09ebbaa8b6b557}{
\index{mln::accu::stat::histo3d\_\-rgb@{mln::accu::stat::histo3d\_\-rgb}!take\_\-as\_\-init@{take\_\-as\_\-init}}
\index{take\_\-as\_\-init@{take\_\-as\_\-init}!mln::accu::stat::histo3d_rgb@{mln::accu::stat::histo3d\_\-rgb}}
\subsubsection[{take\_\-as\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf mln::Accumulator}$<$ {\bf histo3d\_\-rgb}$<$ V $>$  $>$::take\_\-as\_\-init (
\begin{DoxyParamCaption}
\item[{const T \&}]{ t}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{d6/d5b/a00026_a745794a4ef16926d3c09ebbaa8b6b557}


Take as initialization the value {\ttfamily t}. 

Dev note: this is a final method; override if needed by take\_\-as\_\-init\_\- (ending with '\_\-'). \hypertarget{a00026_a138e094daa1a85f345bbdfd852c9fc67}{
\index{mln::accu::stat::histo3d\_\-rgb@{mln::accu::stat::histo3d\_\-rgb}!take\_\-n\_\-times@{take\_\-n\_\-times}}
\index{take\_\-n\_\-times@{take\_\-n\_\-times}!mln::accu::stat::histo3d_rgb@{mln::accu::stat::histo3d\_\-rgb}}
\subsubsection[{take\_\-n\_\-times}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf mln::Accumulator}$<$ {\bf histo3d\_\-rgb}$<$ V $>$  $>$::take\_\-n\_\-times (
\begin{DoxyParamCaption}
\item[{unsigned}]{ n, }
\item[{const T \&}]{ t}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{d6/d5b/a00026_a138e094daa1a85f345bbdfd852c9fc67}


Take {\ttfamily n} times the value {\ttfamily t}. 

Dev note: this is a final method; override if needed by take\_\-as\_\-init\_\- (ending with '\_\-'). \hypertarget{a00115_afe8fa2d7048422cc6979bd1ab8697158}{
\index{mln::accu::stat::histo3d\_\-rgb@{mln::accu::stat::histo3d\_\-rgb}!to\_\-result@{to\_\-result}}
\index{to\_\-result@{to\_\-result}!mln::accu::stat::histo3d_rgb@{mln::accu::stat::histo3d\_\-rgb}}
\subsubsection[{to\_\-result}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename V $>$ {\bf histo3d\_\-rgb}$<$ V $>$::{\bf result} {\bf mln::accu::stat::histo3d\_\-rgb}$<$ V $>$::to\_\-result (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d2/da3/a00115_afe8fa2d7048422cc6979bd1ab8697158}


Accessors. 

Return the histogram as an RGB \hyperlink{a00043}{image3d}. This is the machinery to communicate with data compute interface. The end user should'nt use it. 

Definition at line 293 of file histo3d\_\-rgb.hh.

