Public Types | Public Member Functions | Protected Attributes

mln::accu::stat::histo3d_rgb< V > Struct Template Reference
[On values]

Define a histogram as accumulator which returns an image3d. More...

#include <histo3d_rgb.hh>

Inheritance diagram for mln::accu::stat::histo3d_rgb< V >:
Inheritance graph

List of all members.

Public Types

typedef V argument
typedef Accumulator< void > category
typedef histo3d_rgb< V > exact_t
typedef result q_result
typedef image3d< unsigned > result

Public Member Functions

bool is_valid () const
 Check whethever this accumulator is able to return a result.
image3d< unsigned > subj_ ()
void take_as_init (const T &t)
 Take as initialization the value t.
void take_as_init_ (const T &t)
 Default implementation of "take as initialization".
void take_n_times (unsigned n, const T &t)
 Take n times the value t.
void take_n_times_ (unsigned n, const T &t)
 Default implementation of "take n times".

 histo3d_rgb ()
 Constructors.

void init ()
 Manipulators.
void take (const argument &t)
 Update the histogram with the RGB pixel t.
void take (const histo3d_rgb< V > &other)
 Update the histogram with an other histogram.

result to_result () const
 Accessors.
 operator result () const

Protected Attributes

result count_

Detailed Description

template<typename V>
struct mln::accu::stat::histo3d_rgb< V >

Define a histogram as accumulator which returns an 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 image2d< rgb<2> > or with 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.


Member Typedef Documentation

template<typename V>
typedef V mln::accu::stat::histo3d_rgb< V >::argument

Definition at line 170 of file histo3d_rgb.hh.

typedef Accumulator<void> mln::Accumulator< histo3d_rgb< V > >::category [inherited]

Reimplemented from mln::Proxy< histo3d_rgb< V > >.

Definition at line 80 of file accumulator.hh.

typedef histo3d_rgb< V > mln::Object< histo3d_rgb< V > >::exact_t [inherited]

Definition at line 173 of file object.hh.

template<typename V>
typedef result mln::accu::stat::histo3d_rgb< V >::q_result
template<typename V>
typedef image3d<unsigned> mln::accu::stat::histo3d_rgb< V >::result

Constructor & Destructor Documentation

template<typename V >
mln::accu::stat::histo3d_rgb< V >::histo3d_rgb (  )  [inline]

Constructors.

Infer the size of the resulting image3d domain. By evaluating the minimum and the maximum of V, we define the domain of the resulting image3d.

Definition at line 244 of file histo3d_rgb.hh.

References mln::accu::stat::histo3d_rgb< V >::count_, mln::trace::entering(), mln::trace::exiting(), and mln::image3d< T >::init_().


Member Function Documentation

template<typename V >
void mln::accu::stat::histo3d_rgb< V >::init (  )  [inline]

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::accu::stat::histo3d_rgb< V >::count_, mln::data::fill(), and mln::literal::zero.

template<typename V >
bool mln::accu::stat::histo3d_rgb< V >::is_valid (  )  const [inline]

Check whethever this accumulator is able to return a result.

Depends if the resulting image1d is valid. We can assume it is quite always the case.

Definition at line 307 of file histo3d_rgb.hh.

References mln::accu::stat::histo3d_rgb< V >::count_, and mln::internal::image_base< T, S, E >::is_valid().

template<typename V >
mln::accu::stat::histo3d_rgb< V >::operator result (  )  const [inline]

Definition at line 300 of file histo3d_rgb.hh.

References mln::accu::stat::histo3d_rgb< V >::count_.

image3d< unsigned > mln::accu::internal::base< image3d< unsigned > , histo3d_rgb< V > >::subj_ (  )  [inherited]
template<typename V >
void mln::accu::stat::histo3d_rgb< V >::take ( const argument t  )  [inline]

Update the histogram with the RGB pixel t.

Parameters:
[in] t a graylevel pixel of type V.

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.

References mln::accu::stat::histo3d_rgb< V >::count_.

template<typename V>
void mln::accu::stat::histo3d_rgb< V >::take ( const histo3d_rgb< V > &  other  )  [inline]

Update the histogram with an other histogram.

Parameters:
[in] other the other histogram.

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.

References mln::accu::stat::histo3d_rgb< V >::count_.

void mln::Accumulator< histo3d_rgb< V > >::take_as_init ( const T &  t  )  [inherited]

Take as initialization the value t.

Dev note: this is a final method; override if needed by take_as_init_ (ending with '_').

void mln::Accumulator< histo3d_rgb< V > >::take_as_init_ ( const T &  t  )  [inherited]

Default implementation of "take as initialization".

void mln::Accumulator< histo3d_rgb< V > >::take_n_times ( unsigned  n,
const T &  t 
) [inherited]

Take n times the value t.

Dev note: this is a final method; override if needed by take_as_init_ (ending with '_').

void mln::Accumulator< histo3d_rgb< V > >::take_n_times_ ( unsigned  n,
const T &  t 
) [inherited]

Default implementation of "take n times".

template<typename V >
histo3d_rgb< V >::result mln::accu::stat::histo3d_rgb< V >::to_result (  )  const [inline]

Accessors.

Return the histogram as an RGB 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.

References mln::accu::stat::histo3d_rgb< V >::count_.

Referenced by mln::accu::stat::operator==().


Member Data Documentation

template<typename V>
result mln::accu::stat::histo3d_rgb< V >::count_ [protected]