Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkDenseFrequencyContainer.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkDenseFrequencyContainer.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/09/10 14:29:44 $
00007   Version:   $Revision: 1.7 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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&) ; //purposely not implemented
00093   void operator=(const Self&) ; //purposely not implemented
00094 
00096   FrequencyContainerPointer m_FrequencyContainer ;
00097   FrequencyType  m_TotalFrequency ;
00098 } ; // end of class
00099 
00100 } // end of namespace Statistics
00101 } // end of namespace itk
00102 
00103 #ifndef ITK_MANUAL_INSTANTIATIONy
00104 #include "itkDenseFrequencyContainer.txx"
00105 #endif
00106 
00107 #endif
00108 
00109 
00110 

Generated at Tue Sep 16 11:31:56 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000