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/12/09 16:53:08 $
00007   Version:   $Revision: 1.8 $
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   typedef SmartPointer<const Self> ConstPointer;
00049 
00051   itkTypeMacro(DenseFrequencyContainer, Object);
00052 
00054   itkNewMacro(Self);
00055 
00057   typedef unsigned long InstanceIdentifier ;
00058 
00060   typedef TFrequencyValue FrequencyType ;
00061 
00063   typedef ValarrayImageContainer< InstanceIdentifier, FrequencyType > 
00064   FrequencyContainerType ;
00065   typedef typename FrequencyContainerType::Pointer FrequencyContainerPointer ;
00066 
00069   void Initialize(unsigned long length) ;
00070 
00072   void SetFrequency(const InstanceIdentifier id, const FrequencyType value) ;
00073 
00077   void IncreaseFrequency(const InstanceIdentifier id, 
00078                          const FrequencyType value);
00079 
00081   FrequencyType GetFrequency(const InstanceIdentifier id) const ;
00082 
00084   FrequencyType GetTotalFrequency()
00085   { return m_TotalFrequency ; }
00086 
00087 protected:
00088   DenseFrequencyContainer() ;
00089   virtual ~DenseFrequencyContainer() {}
00090   void PrintSelf(std::ostream& os, Indent indent) const;
00091 
00092 private:
00093   DenseFrequencyContainer(const Self&) ; //purposely not implemented
00094   void operator=(const Self&) ; //purposely not implemented
00095 
00097   FrequencyContainerPointer m_FrequencyContainer ;
00098   FrequencyType  m_TotalFrequency ;
00099 } ; // end of class
00100 
00101 } // end of namespace Statistics
00102 } // end of namespace itk
00103 
00104 #ifndef ITK_MANUAL_INSTANTIATIONy
00105 #include "itkDenseFrequencyContainer.txx"
00106 #endif
00107 
00108 #endif
00109 
00110 
00111 

Generated at Sun Jan 25 13:19:32 2004 for ITK by doxygen 1.3.3 written by Dimitri van Heesch, © 1997-2000