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: 2005/08/24 15:16:42 $
00007   Version:   $Revision: 1.11 $
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 class ITK_EXPORT DenseFrequencyContainer 
00040   : public Object
00041 {
00042 public:
00044   typedef DenseFrequencyContainer  Self;
00045   typedef Object Superclass;
00046   typedef SmartPointer<Self>   Pointer;
00047   typedef SmartPointer<const Self> ConstPointer;
00048 
00050   itkTypeMacro(DenseFrequencyContainer, Object);
00051 
00053   itkNewMacro(Self);
00054 
00056   typedef unsigned long InstanceIdentifier ;
00057 
00059   typedef float FrequencyType ;
00060 
00062   typedef ValarrayImageContainer< InstanceIdentifier, FrequencyType > 
00063   FrequencyContainerType ;
00064   typedef FrequencyContainerType::Pointer FrequencyContainerPointer ;
00065 
00068   void Initialize(unsigned long length) ;
00069 
00072   void SetToZero() ;
00073 
00076   bool SetFrequency(const InstanceIdentifier id, const FrequencyType value) ;
00077 
00081   bool IncreaseFrequency(const InstanceIdentifier id, 
00082                          const FrequencyType value);
00083 
00086   FrequencyType GetFrequency(const InstanceIdentifier id) const ;
00087 
00089   FrequencyType GetTotalFrequency()
00090   { return m_TotalFrequency ; }
00091 
00092 protected:
00093   DenseFrequencyContainer() ;
00094   virtual ~DenseFrequencyContainer() {}
00095   void PrintSelf(std::ostream& os, Indent indent) const;
00096 
00097 private:
00098   DenseFrequencyContainer(const Self&) ; //purposely not implemented
00099   void operator=(const Self&) ; //purposely not implemented
00100 
00102   FrequencyContainerPointer m_FrequencyContainer ;
00103   FrequencyType  m_TotalFrequency ;
00104 } ; // end of class
00105 
00106 } // end of namespace Statistics
00107 } // end of namespace itk
00108 
00109 #endif
00110 
00111 
00112 

Generated at Tue Aug 30 16:43:35 2005 for ITK by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2000