MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Protected Attributes
mds::img::CFullHistogram< C > Class Template Reference

Histogram having number of bins/columns corresponding to a number of possible item values. More...

#include <mdsHistogram.h>

Inheritance diagram for mds::img::CFullHistogram< C >:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { NO_ITERATOR_IS_DECLARED_FOR_TEMPLATE_PARAMETER = C::ITERATOR_DECLARED }
 Check that C has an iterator declared. More...
typedef int tBin
 Histogram bin type.
typedef C tContainer
 Container type.
typedef C::tConstIterator tContainerIterator
 Container iterator type.
typedef CFullHistogram< C > tHistogram
 Concrete histogram type.
typedef CTypeTraits< typename
tContainerIterator::tItem >
::tNonConst 
tItem
 Container item type.
typedef mds::math::CVector< tBintVector
 Internal histogram representation.

Public Member Functions

 CFullHistogram (tItem Min=CTypeTraits< tItem >::getMin(), tItem Max=CTypeTraits< tItem >::getMax())
 Constructor that creates a new empty histogram.
void cumulate ()
 Creates the cumulative histogram.
tBin getCount (tSize Index) const
 Returns value of a given histogram bin.
const tVectorgetHistogram () const
 Returns vector representing the computed histogram.
tHistogramgetImpl ()
 Returns reference to the histogram implementation.
const tHistogramgetImpl () const
tSize getIndex (tItem Value) const
 Computes and returns histogram bin index.
tItem getLowerBound (tSize Index) const
 Returns lower bound of item value of a specified histogram bin.
tBin getMax () const
 Returns maximal histogram value.
tSize getSize () const
 Returns the number of histogram bins.
tBin getTotalCount () const
 Returns sum of all histogram bins.
bool operator() (const tContainer &Container)
 Computes histogram of all container items.
 ~CFullHistogram ()
 Destructor.

Protected Attributes

tVector m_Histogram
 Histogram.
tItem m_Max
tItem m_Min
 Minimal and maximal allowed container item value.

Detailed Description

template<typename C>
class mds::img::CFullHistogram< C >

Histogram having number of bins/columns corresponding to a number of possible item values.


Member Typedef Documentation

template<typename C >
typedef int mds::img::CFullHistogram< C >::tBin

Histogram bin type.

template<typename C >
typedef C mds::img::CFullHistogram< C >::tContainer

Container type.

template<typename C >
typedef C::tConstIterator mds::img::CFullHistogram< C >::tContainerIterator

Container iterator type.

Concrete histogram type.

template<typename C >
typedef CTypeTraits<typename tContainerIterator::tItem>::tNonConst mds::img::CFullHistogram< C >::tItem

Container item type.

template<typename C >
typedef mds::math::CVector<tBin> mds::img::CFullHistogram< C >::tVector

Internal histogram representation.


Member Enumeration Documentation

template<typename C >
anonymous enum

Check that C has an iterator declared.

You will see name of this enum somewhere in compiler error message if the type C can't be used with iterators.

Enumerator:
NO_ITERATOR_IS_DECLARED_FOR_TEMPLATE_PARAMETER 

Constructor & Destructor Documentation

template<typename C >
CFullHistogram::CFullHistogram ( tItem  Min = CTypeTraits<tItem>::getMin(),
tItem  Max = CTypeTraits<tItem>::getMax() 
)

Constructor that creates a new empty histogram.

  • Min and Max gives range of item values.
template<typename C >
mds::img::CFullHistogram< C >::~CFullHistogram ( )

Destructor.


Member Function Documentation

template<typename C >
void CFullHistogram::cumulate ( )

Creates the cumulative histogram.

template<typename C >
tBin mds::img::CFullHistogram< C >::getCount ( tSize  Index) const

Returns value of a given histogram bin.

template<typename C >
const tVector& mds::img::CFullHistogram< C >::getHistogram ( ) const

Returns vector representing the computed histogram.

Returns reference to the histogram implementation.

const tHistogram& mds::img::CHistogramBase< CFullHistogram< C > >::getImpl ( ) const [inherited]
template<typename C >
tSize mds::img::CFullHistogram< C >::getIndex ( tItem  Value) const

Computes and returns histogram bin index.

template<typename C >
tItem mds::img::CFullHistogram< C >::getLowerBound ( tSize  Index) const

Returns lower bound of item value of a specified histogram bin.

template<typename C >
tBin mds::img::CFullHistogram< C >::getMax ( ) const

Returns maximal histogram value.

template<typename C >
tSize mds::img::CFullHistogram< C >::getSize ( ) const

Returns the number of histogram bins.

template<typename C >
tBin mds::img::CFullHistogram< C >::getTotalCount ( ) const

Returns sum of all histogram bins.

template<typename C >
bool CFullHistogram::operator() ( const tContainer Container)

Computes histogram of all container items.

  • Returns false on failure.

Member Data Documentation

template<typename C >
tVector mds::img::CFullHistogram< C >::m_Histogram [protected]

Histogram.

template<typename C >
tItem mds::img::CFullHistogram< C >::m_Max [protected]
template<typename C >
tItem mds::img::CFullHistogram< C >::m_Min [protected]

Minimal and maximal allowed container item value.


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