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: 2003/09/10 14:29:38 $ 00007 Version: $Revision: 1.18 $ 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 void MaximizeOn() {m_Maximize=true;} 00093 00095 itkSetMacro( MaximumIteration, unsigned int ); 00096 itkGetConstMacro( MaximumIteration, unsigned int ); 00097 00099 itkSetMacro( GrowthFactor, double ); 00100 itkGetConstMacro( GrowthFactor, double ); 00101 00103 itkSetMacro( ShrinkFactor, double ); 00104 itkGetConstMacro( ShrinkFactor, double ); 00105 00107 itkSetMacro( InitialRadius, double ) ; 00108 itkGetConstMacro( InitialRadius, double ); 00109 00110 00113 itkSetMacro( Epsilon, double ); 00114 itkGetConstMacro( Epsilon, double ); 00115 00116 void SetNormalVariateGenerator(NormalVariateGeneratorType* generator) ; 00117 00124 void Initialize(double initialRadius, double grow = -1, double shrink = -1) ; 00125 00126 MeasureType GetValue() 00127 { return m_CurrentCost ; } 00128 00129 itkGetConstMacro( CurrentIteration, unsigned int) ; 00133 void StartOptimization() ; 00134 00138 void StopOptimization() 00139 { m_Stop = true ; } 00140 00141 protected: 00142 OnePlusOneEvolutionaryOptimizer() ; 00143 OnePlusOneEvolutionaryOptimizer(const OnePlusOneEvolutionaryOptimizer&) ; 00144 virtual ~OnePlusOneEvolutionaryOptimizer() ; 00145 void PrintSelf(std::ostream& os, Indent indent) const; 00146 00147 private: 00148 00150 NormalVariateGeneratorType::Pointer m_RandomGenerator ; 00151 00153 unsigned int m_MaximumIteration ; 00154 00156 unsigned int m_CurrentIteration ; 00157 00159 bool m_Maximize; 00160 00163 double m_Epsilon ; 00164 00166 double m_InitialRadius ; 00167 00169 double m_GrowthFactor ; 00170 00172 double m_ShrinkFactor ; 00173 00175 bool m_Initialized ; 00176 00178 MeasureType m_CurrentCost; 00179 00184 bool m_Stop ; 00185 } ; // end of class 00186 00187 } // end of namespace itk 00188 00189 #endif

Generated at Sat Mar 31 02:26:40 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000