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

Base class of histogram container class. More...

#include <aims/histogram/histogram.h>

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

Public Member Functions

Constructors and destructor.
 Histogram ()
 constructor. More...
 
 Histogram (const Histogram< T > &other)
 copy constructor. More...
 
virtual ~Histogram ()
 destructor. More...
 
Data of histogram
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...
 
Iterators
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...
 
virtual void doit (const carto::rc_ptr< carto::Volume< T > > &)
 the histogram computation function. More...
 

Output stream

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...
 
std::ostream & operator<< (std::ostream &os, const Histogram< T > &thing)
 

Detailed Description

template<class T>
class Histogram< T >

Base class of histogram container class.

Definition at line 49 of file histogram.h.

Constructor & Destructor Documentation

◆ Histogram() [1/2]

template<class T >
Histogram< T >::Histogram
inline

constructor.

Definition at line 122 of file histogram.h.

◆ Histogram() [2/2]

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

copy constructor.

Definition at line 129 of file histogram.h.

References Histogram< T >::_data, Histogram< T >::data(), and carto::VolumeRef< class >::deepcopy().

◆ ~Histogram()

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

destructor.

Definition at line 60 of file histogram.h.

Member Function Documentation

◆ beginValid() [1/2]

template<class T >
int32_t* Histogram< T >::beginValid ( )
inline

return the iterator to the first valid value of the histogram

Definition at line 74 of file histogram.h.

References Histogram< T >::_data, and carto::VolumeRef< class >::begin().

◆ beginValid() [2/2]

template<class T >
int32_t* Histogram< T >::beginValid ( ) const
inline

return the constant iterator to the first valid value of the histogram

Definition at line 81 of file histogram.h.

References Histogram< T >::_data, and carto::VolumeRef< class >::begin().

◆ data() [1/2]

template<class T >
carto::VolumeRef<int32_t>& Histogram< T >::data ( )
inline

return a reference to the data field of the histogram class.

Definition at line 66 of file histogram.h.

References Histogram< T >::_data.

Referenced by CumulatedHistogram< T >::doit(), Histogram< T >::Histogram(), and AimsEMThreshold< T, U >::processEMThresholds().

◆ data() [2/2]

template<class T >
const carto::VolumeRef<int32_t>& Histogram< T >::data ( ) const
inline

return a constant reference to the data field of the histogram class.

Definition at line 68 of file histogram.h.

References Histogram< T >::_data.

◆ doit()

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

the histogram computation function.

\ This virtual function must be defined in the child classes.

Reimplemented in SimpleHistogram< T >, aims::RegularBinnedHistogram< T >, and CumulatedHistogram< T >.

Definition at line 98 of file histogram.h.

◆ endValid() [1/2]

template<class T >
int32_t* Histogram< T >::endValid ( )
inline

return the iterator to the last valid value of the histogram

Definition at line 77 of file histogram.h.

References Histogram< T >::_data, Histogram< T >::_maxValid, Histogram< T >::_minValid, and carto::VolumeRef< class >::at().

◆ endValid() [2/2]

template<class T >
int32_t* Histogram< T >::endValid ( ) const
inline

return the constant iterator to the last valid value of the histogram

Definition at line 84 of file histogram.h.

References Histogram< T >::_data, Histogram< T >::_maxValid, Histogram< T >::_minValid, and carto::VolumeRef< class >::at().

◆ maxValid()

template<class T >
int Histogram< T >::maxValid ( ) const
inline

returnn the maximum valid (used) value of the histogram

Definition at line 91 of file histogram.h.

References Histogram< T >::_maxValid.

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

◆ minValid()

template<class T >
int Histogram< T >::minValid ( ) const
inline

return the minimum valid (used) value of the histogram

Definition at line 89 of file histogram.h.

References Histogram< T >::_minValid.

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

◆ totalPoints()

template<class T >
int Histogram< T >::totalPoints ( ) const
inline

return the total number of points in the histogram

Definition at line 94 of file histogram.h.

References Histogram< T >::_nPoints.

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

Friends And Related Function Documentation

◆ operator<<

template<class T >
std::ostream& operator<< ( std::ostream &  os,
const Histogram< T > &  thing 
)
friend

Definition at line 138 of file histogram.h.

Member Data Documentation

◆ _data

template<class T >
carto::VolumeRef<int32_t> Histogram< T >::_data
protected

◆ _maxValid

template<class T >
int Histogram< T >::_maxValid
protected

maximum used value

Definition at line 114 of file histogram.h.

Referenced by Histogram< T >::endValid(), and Histogram< T >::maxValid().

◆ _minValid

template<class T >
int Histogram< T >::_minValid
protected

minimum used value

Definition at line 112 of file histogram.h.

Referenced by Histogram< T >::endValid(), and Histogram< T >::minValid().

◆ _nPoints

template<class T >
int Histogram< T >::_nPoints
protected

total number of points

Definition at line 110 of file histogram.h.

Referenced by Histogram< T >::totalPoints().


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