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

itkOnePlusOneEvolutionaryOptimizer.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkOnePlusOneEvolutionaryOptimizer.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007-03-22 14:29:14 $
00007   Version:   $Revision: 1.23 $
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 __itkOnePlusOneEvolutionaryOptimizer_h
00018 #define __itkOnePlusOneEvolutionaryOptimizer_h
00019 
00020 #include <itkSingleValuedNonLinearOptimizer.h>
00021 #include <itkRandomVariateGeneratorBase.h>
00022 
00023 namespace itk
00024 {
00025 
00068 class ITK_EXPORT OnePlusOneEvolutionaryOptimizer: 
00069     public SingleValuedNonLinearOptimizer
00070 {
00071 public:
00073   typedef OnePlusOneEvolutionaryOptimizer     Self;
00074   typedef SingleValuedNonLinearOptimizer      Superclass;
00075   typedef SmartPointer<Self>                  Pointer;
00076   typedef SmartPointer<const Self>            ConstPointer;
00077 
00079   itkNewMacro(Self);
00080 
00082   itkTypeMacro(OnePlusOneEvolutionaryOptimizer, SingleValuedNonLinearOptimizer );
00083 
00085   typedef  SingleValuedCostFunction         CostFunctionType;
00086   typedef  CostFunctionType::Pointer        CostFunctionPointer;
00087 
00089   typedef Statistics::RandomVariateGeneratorBase NormalVariateGeneratorType;
00090 
00092   itkSetMacro( Maximize, bool );
00093   itkBooleanMacro( Maximize );
00095 
00097   itkSetMacro( MaximumIteration, unsigned int );
00098   itkGetConstReferenceMacro( MaximumIteration, unsigned int );
00100 
00102   itkSetMacro( GrowthFactor, double );
00103   itkGetConstReferenceMacro( GrowthFactor, double );
00105 
00107   itkSetMacro( ShrinkFactor, double );
00108   itkGetConstReferenceMacro( ShrinkFactor, double );
00110 
00112   itkSetMacro( InitialRadius, double );
00113   itkGetConstReferenceMacro( InitialRadius, double );
00115 
00116 
00119   itkSetMacro( Epsilon, double );   
00120   itkGetConstReferenceMacro( Epsilon, double );   
00122 
00124   itkGetConstReferenceMacro( FrobeniusNorm, double );   
00125 
00126   void SetNormalVariateGenerator(NormalVariateGeneratorType* generator);
00127 
00134   void Initialize(double initialRadius, double grow = -1, double shrink = -1);
00135 
00137   itkGetConstReferenceMacro( CurrentCost, MeasureType );
00138   MeasureType GetValue() const { return this->GetCurrentCost(); }
00140 
00142   itkGetConstReferenceMacro( CurrentIteration, unsigned int);
00143 
00147   void StartOptimization();
00148 
00152   void StopOptimization() 
00153     { m_Stop = true; }
00154 
00155 protected:
00156   OnePlusOneEvolutionaryOptimizer();
00157   OnePlusOneEvolutionaryOptimizer(const OnePlusOneEvolutionaryOptimizer&);
00158   virtual ~OnePlusOneEvolutionaryOptimizer();
00159   void PrintSelf(std::ostream& os, Indent indent) const;
00160 
00161 private:
00162   
00164   NormalVariateGeneratorType::Pointer m_RandomGenerator;
00165 
00167   unsigned int m_MaximumIteration;
00168 
00170   unsigned int m_CurrentIteration;
00171 
00173   bool m_Maximize;
00174 
00177   double m_Epsilon;
00178 
00180   double m_InitialRadius;
00181 
00183   double m_GrowthFactor;
00184 
00186   double m_ShrinkFactor;
00187 
00189   bool m_Initialized;
00190 
00192   MeasureType       m_CurrentCost;
00193 
00198   bool m_Stop;
00199 
00202   double m_FrobeniusNorm;
00203 
00204 }; // end of class
00205 
00206 } // end of namespace itk
00207 
00208 #endif
00209 

Generated at Mon Apr 14 13:50:28 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000