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: 2002/09/03 18:30:32 $
00007   Version:   $Revision: 1.5 $
00008 
00009   Copyright (c) 2002 Insight 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 
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&) ; //purposely not implemented
00088   void operator=(const Self&) ; //purposely not implemented
00089 
00090   // Container of histogram
00091   FrequencyContainerPointer m_FrequencyContainer ;
00092   FrequencyType  m_TotalFrequency ;
00093 } ; // end of class
00094 
00095   } // end of namespace Statistics
00096 } // end of namespace itk
00097 
00098 #ifndef ITK_MANUAL_INSTANTIATIONy
00099 #include "itkDenseFrequencyContainer.txx"
00100 #endif
00101 
00102 #endif
00103 
00104 
00105 

Generated at Fri May 21 01:14:38 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000