00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkDenseFrequencyContainer_h
00018 #define __itkDenseFrequencyContainer_h
00019
00020 #include <map>
00021 #include "itkObjectFactory.h"
00022 #include "itkObject.h"
00023 #include "itkValarrayImageContainer.h"
00024
00025 namespace itk{
00026 namespace Statistics{
00027
00036 template< class TFrequencyValue = float >
00037 class ITK_EXPORT DenseFrequencyContainer
00038 : public Object
00039 {
00040 public:
00042 typedef DenseFrequencyContainer Self;
00043 typedef Object Superclass;
00044 typedef SmartPointer<Self> Pointer;
00045
00047 itkTypeMacro(DenseFrequencyContainer, Object);
00048
00050 itkNewMacro(Self);
00051
00053 typedef unsigned long InstanceIdentifier ;
00054
00056 typedef TFrequencyValue FrequencyType ;
00057
00059 typedef ValarrayImageContainer< InstanceIdentifier, FrequencyType >
00060 FrequencyContainerType ;
00061 typedef typename FrequencyContainerType::Pointer FrequencyContainerPointer ;
00062
00065 void Initialize(unsigned long length) ;
00066
00068 void SetFrequency(const InstanceIdentifier id, const FrequencyType value) ;
00069
00072 void IncreaseFrequency(const InstanceIdentifier id,
00073 const FrequencyType value);
00074
00076 FrequencyType GetFrequency(const InstanceIdentifier id) const ;
00077
00078 FrequencyType GetTotalFrequency()
00079 { return m_TotalFrequency ; }
00080
00081 protected:
00082 DenseFrequencyContainer() ;
00083 virtual ~DenseFrequencyContainer() {}
00084 void PrintSelf(std::ostream& os, Indent indent) const;
00085
00086 private:
00087 DenseFrequencyContainer(const Self&) ;
00088 void operator=(const Self&) ;
00089
00090
00091 FrequencyContainerPointer m_FrequencyContainer ;
00092 FrequencyType m_TotalFrequency ;
00093 } ;
00094
00095 }
00096 }
00097
00098 #ifndef ITK_MANUAL_INSTANTIATIONy
00099 #include "itkDenseFrequencyContainer.txx"
00100 #endif
00101
00102 #endif
00103
00104
00105