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

itkMeanShiftModeSeekerBase.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkMeanShiftModeSeekerBase.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/12/15 01:00:46 $
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 
00018 #ifndef __itkMeanShiftModeSeekerBase_h
00019 #define __itkMeanShiftModeSeekerBase_h
00020 
00021 #include "itkObject.h"
00022 #include "itkVector.h"
00023 #include "itkMatrix.h"
00024 #include "itkNumericTraits.h"
00025 #include "itkMeanShiftModeCacheMethod.h"
00026 
00027 namespace itk{ 
00028 namespace Statistics{
00029   
00053 template< class TSample >
00054 class MeanShiftModeSeekerBase :
00055     public Object
00056 {
00057 public:
00059   typedef MeanShiftModeSeekerBase Self;
00060   typedef Object Superclass ;
00061   typedef SmartPointer<Self> Pointer;
00062   typedef SmartPointer<const Self> ConstPointer;
00063 
00065   itkTypeMacro(MeanShiftModeSeekerBase, Object);
00066   itkNewMacro(Self) ;
00067   
00068   itkStaticConstMacro(MeasurementVectorSize, unsigned int,
00069                       TSample::MeasurementVectorSize) ;
00070 
00072   typedef typename TSample::MeasurementVectorType MeasurementVectorType ;
00073   typedef typename TSample::MeasurementType MeasurementType ;
00074   typedef typename TSample::InstanceIdentifier InstanceIdentifier ;
00075 
00076   typedef std::vector< InstanceIdentifier > SearchResultVectorType ;
00077   typedef MeanShiftModeCacheMethod< MeasurementVectorType > CacheMethodType ;
00078 
00079   void SetInputSample(const TSample* sample) ;
00080 
00081   const TSample* GetInputSample() const
00082   { return m_InputSample.GetPointer() ; }
00083 
00084   void SetMaximumIteration(unsigned int number)
00085   { m_MaximumIteration = number ; }
00086 
00087   unsigned int GetMaximumIteration()
00088   { return m_MaximumIteration ; }
00089 
00090   void SetCacheMethod(CacheMethodType* method) ;
00091 
00092   CacheMethodType* GetCacheMethod()
00093   { return m_CacheMethod.GetPointer() ; }
00094 
00096   MeasurementVectorType Evolve(MeasurementVectorType instance) ;
00097 
00098 protected:
00099   MeanShiftModeSeekerBase() ;
00100   virtual ~MeanShiftModeSeekerBase() ;
00101   void PrintSelf(std::ostream& os, Indent indent) const;
00102 
00103   virtual bool ComputeMode(MeasurementVectorType queryPoint,
00104                            MeasurementVectorType& newPoint) = 0 ;
00105 
00106   
00107 private:
00108   typename TSample::ConstPointer m_InputSample ;
00109   unsigned int m_MaximumIteration ;
00110   typename CacheMethodType::Pointer m_CacheMethod ;
00111 } ; // end of class
00112     
00113 } // end of namespace Statistics 
00114 } // end of namespace itk 
00115 
00116 #ifndef ITK_MANUAL_INSTANTIATION
00117 #include "itkMeanShiftModeSeekerBase.txx"
00118 #endif
00119 
00120 #endif
00121 

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