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: 2008-08-05 11:15:49 $
00007   Version:   $Revision: 1.24 $
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   itkGetMacro(CatchGetValueException, bool);
00156   itkSetMacro(CatchGetValueException, bool);
00157 
00158   itkGetMacro(MetricWorstPossibleValue, double);
00159   itkSetMacro(MetricWorstPossibleValue, double);
00160 
00161 protected:
00162   OnePlusOneEvolutionaryOptimizer();
00163   OnePlusOneEvolutionaryOptimizer(const OnePlusOneEvolutionaryOptimizer&);
00164   virtual ~OnePlusOneEvolutionaryOptimizer();
00165   void PrintSelf(std::ostream& os, Indent indent) const;
00166 
00167 private:
00168   
00170   NormalVariateGeneratorType::Pointer m_RandomGenerator;
00171 
00173   unsigned int m_MaximumIteration;
00174 
00176   unsigned int m_CurrentIteration;
00177 
00178   bool               m_CatchGetValueException;
00179   double             m_MetricWorstPossibleValue;
00180 
00182   bool m_Maximize;
00183 
00186   double m_Epsilon;
00187 
00189   double m_InitialRadius;
00190 
00192   double m_GrowthFactor;
00193 
00195   double m_ShrinkFactor;
00196 
00198   bool m_Initialized;
00199 
00201   MeasureType       m_CurrentCost;
00202 
00207   bool m_Stop;
00208 
00211   double m_FrobeniusNorm;
00212 
00213 }; // end of class
00214 
00215 } // end of namespace itk
00216 
00217 #endif
00218 

Generated at Wed Nov 5 23:16:37 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000