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
00039 template< class TFrequencyValue = float >
00040 class ITK_EXPORT DenseFrequencyContainer
00041 : public Object
00042 {
00043 public:
00045 typedef DenseFrequencyContainer Self;
00046 typedef Object Superclass;
00047 typedef SmartPointer<Self> Pointer;
00048
00050 itkTypeMacro(DenseFrequencyContainer, Object);
00051
00053 itkNewMacro(Self);
00054
00056 typedef unsigned long InstanceIdentifier ;
00057
00059 typedef TFrequencyValue FrequencyType ;
00060
00062 typedef ValarrayImageContainer< InstanceIdentifier, FrequencyType >
00063 FrequencyContainerType ;
00064 typedef typename FrequencyContainerType::Pointer FrequencyContainerPointer ;
00065
00068 void Initialize(unsigned long length) ;
00069
00071 void SetFrequency(const InstanceIdentifier id, const FrequencyType value) ;
00072
00076 void IncreaseFrequency(const InstanceIdentifier id,
00077 const FrequencyType value);
00078
00080 FrequencyType GetFrequency(const InstanceIdentifier id) const ;
00081
00083 FrequencyType GetTotalFrequency()
00084 { return m_TotalFrequency ; }
00085
00086 protected:
00087 DenseFrequencyContainer() ;
00088 virtual ~DenseFrequencyContainer() {}
00089 void PrintSelf(std::ostream& os, Indent indent) const;
00090
00091 private:
00092 DenseFrequencyContainer(const Self&) ;
00093 void operator=(const Self&) ;
00094
00096 FrequencyContainerPointer m_FrequencyContainer ;
00097 FrequencyType m_TotalFrequency ;
00098 } ;
00099
00100 }
00101 }
00102
00103 #ifndef ITK_MANUAL_INSTANTIATIONy
00104 #include "itkDenseFrequencyContainer.txx"
00105 #endif
00106
00107 #endif
00108
00109
00110