aimsalgo  5.1.2
Neuroimaging image processing
SimpleHistogram< T > Class Template Reference

Classical histogram container class. More...

#include <aims/histogram/simpleHisto.h>

Inheritance diagram for SimpleHistogram< T >:
Collaboration diagram for SimpleHistogram< T >:

Public Member Functions

void doit (const carto::rc_ptr< carto::Volume< float > > &thing)
 
void doit (const carto::rc_ptr< carto::Volume< double > > &thing)
 
Constructors and destructor
 SimpleHistogram ()
 constructor. Does nothing. More...
 
 SimpleHistogram (const SimpleHistogram< T > &other)
 copy constructor. More...
 
virtual ~SimpleHistogram ()
 destructor. More...
 
void doit (const carto::rc_ptr< carto::Volume< T > > &thing)
 classical histogram computation function. More...
 
Rebinning functions.
void rebin (int size)
 rebinning to a specific result vector size. More...
 
void rebin (carto::Volume< int32_t >::iterator beg, carto::Volume< int32_t >::iterator end)
 rebinning from the beginning iterator to the ending one. More...
 
void rebin (int size, carto::Volume< int32_t >::iterator beg, carto::Volume< int32_t >::iterator end)
 rebinning from iterator 'beg' to iterator 'end' to a result vector of size 'size' More...
 
- Public Member Functions inherited from Histogram< T >
 Histogram ()
 constructor. More...
 
 Histogram (const Histogram< T > &other)
 copy constructor. More...
 
virtual ~Histogram ()
 destructor. More...
 
carto::VolumeRef< int32_t > & data ()
 return a reference to the data field of the histogram class. More...
 
const carto::VolumeRef< int32_t > & data () const
 return a constant reference to the data field of the histogram class. More...
 
int32_t * beginValid ()
 return the iterator to the first valid value of the histogram More...
 
int32_t * endValid ()
 return the iterator to the last valid value of the histogram More...
 
int32_t * beginValid () const
 return the constant iterator to the first valid value of the histogram More...
 
int32_t * endValid () const
 return the constant iterator to the last valid value of the histogram More...
 
int minValid () const
 return the minimum valid (used) value of the histogram More...
 
int maxValid () const
 returnn the maximum valid (used) value of the histogram More...
 
int totalPoints () const
 return the total number of points in the histogram More...
 

Additional Inherited Members

- Protected Attributes inherited from Histogram< T >
int _nPoints
 total number of points More...
 
int _minValid
 minimum used value More...
 
int _maxValid
 maximum used value More...
 
carto::VolumeRef< int32_t > _data
 histogram datas More...
 

Detailed Description

template<class T>
class SimpleHistogram< T >

Classical histogram container class.

Definition at line 44 of file simpleHisto.h.

Constructor & Destructor Documentation

◆ SimpleHistogram() [1/2]

template<class T >
SimpleHistogram< T >::SimpleHistogram ( )
inline

constructor. Does nothing.

Definition at line 51 of file simpleHisto.h.

◆ SimpleHistogram() [2/2]

template<class T >
SimpleHistogram< T >::SimpleHistogram ( const SimpleHistogram< T > &  other)
inline

copy constructor.

Definition at line 53 of file simpleHisto.h.

◆ ~SimpleHistogram()

template<class T >
virtual SimpleHistogram< T >::~SimpleHistogram ( )
inlinevirtual

destructor.

Definition at line 56 of file simpleHisto.h.

Member Function Documentation

◆ doit() [1/3]

◆ doit() [2/3]

◆ doit() [3/3]

template<class T >
void SimpleHistogram< T >::doit ( const carto::rc_ptr< carto::Volume< T > > &  thing)
inlinevirtual

classical histogram computation function.

\ Be careful that for float and double data types the histogram is not set in a float or double 1D Volume but in a 16 bits short 1D Volume, i.e. a rebinning is performed.

Reimplemented from Histogram< T >.

Definition at line 83 of file simpleHisto.h.

References carto::VolumeRef< class >::at(), carto::NDIterator_base::ended(), carto::const_line_NDIterator< class >::inc_line_ptr(), and carto::const_line_NDIterator< class >::line_length().

Referenced by CumulatedHistogram< T >::doit().

◆ rebin() [1/3]

template<class T >
void SimpleHistogram< T >::rebin ( carto::Volume< int32_t >::iterator  beg,
carto::Volume< int32_t >::iterator  end 
)
inline

rebinning from the beginning iterator to the ending one.

The result vector size is then defined by the number of bins included between the two iterators.

Definition at line 115 of file simpleHisto.h.

◆ rebin() [2/3]

template<class T >
void SimpleHistogram< T >::rebin ( int  size)
inline

rebinning to a specific result vector size.

Definition at line 108 of file simpleHisto.h.

◆ rebin() [3/3]

template<class T >
void SimpleHistogram< T >::rebin ( int  size,
carto::Volume< int32_t >::iterator  beg,
carto::Volume< int32_t >::iterator  end 
)
inline

rebinning from iterator 'beg' to iterator 'end' to a result vector of size 'size'

Definition at line 123 of file simpleHisto.h.

References ASSERT, carto::VolumeRef< class >::begin(), carto::VolumeRef< class >::end(), and sum().


The documentation for this class was generated from the following file: