go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkLineSearchOptimizer.h
Go to the documentation of this file.
1 /*======================================================================
2 
3  This file is part of the elastix software.
4 
5  Copyright (c) University Medical Center Utrecht. All rights reserved.
6  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7  details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 
15 #ifndef __itkLineSearchOptimizer_h
16 #define __itkLineSearchOptimizer_h
17 
18 #include "itkSingleValuedNonLinearOptimizer.h"
19 
20 namespace itk
21 {
22 
32 {
33 public:
34 
37  typedef SmartPointer<Self> Pointer;
38  typedef SmartPointer<const Self> ConstPointer;
39 
40  //itkNewMacro(Self); because this is an abstract base class.
42 
43  typedef Superclass::MeasureType MeasureType;
44  typedef Superclass::ParametersType ParametersType;
45  typedef Superclass::DerivativeType DerivativeType;
46  typedef Superclass::CostFunctionType CostFunctionType;
47 
49  virtual void SetLineSearchDirection( const ParametersType & arg )
50  {
51  this->m_LineSearchDirection = arg;
52  this->Modified();
53  }
54  itkGetConstReferenceMacro( LineSearchDirection, ParametersType );
55 
65  virtual void SetInitialDerivative(
66  const DerivativeType & itkNotUsed( derivative ) ) {};
67  virtual void SetInitialValue( MeasureType itkNotUsed( value ) ) {};
68 
79  virtual void GetCurrentValueAndDerivative(
80  MeasureType & value, DerivativeType & derivative ) const = 0;
81  virtual void GetCurrentDerivative( DerivativeType & derivative ) const = 0;
82  virtual MeasureType GetCurrentValue( void ) const = 0;
83 
89  itkGetConstMacro( CurrentStepLength, double );
90 
100  itkSetMacro( MinimumStepLength, double );
101  itkGetConstMacro( MinimumStepLength, double );
102  itkSetMacro( MaximumStepLength, double );
103  itkGetConstMacro( MaximumStepLength, double );
104  itkSetMacro( InitialStepLengthEstimate, double );
105  itkGetConstMacro( InitialStepLengthEstimate, double );
106 
107 protected:
108 
110  virtual ~LineSearchOptimizer() {};
111  void PrintSelf( std::ostream& os, Indent indent ) const;
112 
114 
120  virtual void SetCurrentStepLength( double step );
121 
123  double DirectionalDerivative( const DerivativeType & derivative ) const;
124 
125 private:
126  LineSearchOptimizer(const Self&); //purposely not implemented
127  void operator=(const Self&); //purposely not implemented
128 
130 
134 
135 }; // end class LineSearchOptimizer
136 
137 } // end namespace itk
138 
139 #endif // #ifndef __itkLineSearchOptimizer_h


Generated on 27-06-2013 for elastix by doxygen 1.8.3.1 elastix logo