go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxConjugateGradientFRPR.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 #ifndef __elxConjugateGradientFRPR_h
15 #define __elxConjugateGradientFRPR_h
16 
17 #include "elxIncludes.h" // include first to avoid MSVS warning
18 #include "itkFRPROptimizer.h"
19 
20 namespace elastix
21 {
22 
69 template< class TElastix >
71  public
72  itk::FRPROptimizer,
73  public
74  OptimizerBase< TElastix >
75 {
76 public:
77 
80  typedef itk::FRPROptimizer Superclass1;
82  typedef itk::SmartPointer< Self > Pointer;
83  typedef itk::SmartPointer< const Self > ConstPointer;
84 
86  itkNewMacro( Self );
87 
89  itkTypeMacro( ConjugateGradientFRPR, itk::FRPROptimizer );
90 
92  elxClassNameMacro( "ConjugateGradientFRPR" );
93 
95  typedef Superclass1::CostFunctionType CostFunctionType;
96  typedef Superclass1::CostFunctionPointer CostFunctionPointer;
97  //typedef Superclass1::StopConditionType StopConditionType; not implemented in this itkOptimizer
98  typedef typename Superclass1::ParametersType ParametersType;
99  //not declared in Superclass, although it should be.
100  typedef SingleValuedNonLinearOptimizer::DerivativeType DerivativeType;
101 
110 
113  virtual void BeforeRegistration( void );
114 
115  virtual void BeforeEachResolution( void );
116 
117  virtual void AfterEachResolution( void );
118 
119  virtual void AfterEachIteration( void );
120 
121  virtual void AfterRegistration( void );
122 
124  virtual void SetInitialPosition( const ParametersType & param );
125 
128  itkGetConstMacro( LineOptimizing, bool );
129  itkGetConstMacro( LineBracketing, bool );
130 
132  itkGetConstReferenceMacro( CurrentDerivativeMagnitude, double );
133 
135  itkGetConstReferenceMacro( CurrentStepLength, double );
136 
138  itkGetConstReferenceMacro( CurrentSearchDirectionMagnitude, double );
139 
140 protected:
141 
144 
147 
150 
153 
156  itkSetMacro( LineOptimizing, bool );
157  itkSetMacro( LineBracketing, bool );
158 
166  virtual void GetValueAndDerivative( ParametersType p, double * val,
167  ParametersType * xi );
168 
179  virtual void LineBracket( double * ax, double * bx, double * cx,
180  double * fa, double * fb, double * fc );
181 
191  virtual void BracketedLineOptimize( double ax, double bx, double cx,
192  double fa, double fb, double fc,
193  double * extX, double * extVal );
194 
199  virtual void LineOptimize( ParametersType * p, ParametersType xi,
200  double * val );
201 
202 private:
203 
204  ConjugateGradientFRPR( const Self & ); // purposely not implemented
205  void operator=( const Self & ); // purposely not implemented
206 
209 
210  const char * DeterminePhase( void ) const;
211 
212 };
213 
214 } // end namespace elastix
215 
216 #ifndef ITK_MANUAL_INSTANTIATION
217 #include "elxConjugateGradientFRPR.hxx"
218 #endif
219 
220 #endif // end #ifndef __elxConjugateGradientFRPR_h
Superclass::RegistrationPointer RegistrationPointer
The ConjugateGradientFRPR class.
virtual void AfterEachIteration(void)
Superclass1::ParametersType ParametersType
This class is the elastix base class for all Optimizers.
itk::SmartPointer< const Self > ConstPointer
SingleValuedNonLinearOptimizer::DerivativeType DerivativeType
virtual void AfterEachResolution(void)
Superclass::ElastixType ElastixType
Superclass::ConfigurationPointer ConfigurationPointer
elxClassNameMacro("ConjugateGradientFRPR")
Superclass::ElastixPointer ElastixPointer
OptimizerBase< TElastix > Superclass2
Superclass::ConfigurationType ConfigurationType
Superclass1::CostFunctionType CostFunctionType
Superclass2::RegistrationType RegistrationType
void operator=(const Self &)
Superclass2::RegistrationPointer RegistrationPointer
virtual void AfterRegistration(void)
Superclass2::ConfigurationPointer ConfigurationPointer
Superclass2::ElastixPointer ElastixPointer
const char * DeterminePhase(void) const
virtual void BracketedLineOptimize(double ax, double bx, double cx, double fa, double fb, double fc, double *extX, double *extVal)
virtual void BeforeEachResolution(void)
itk::Optimizer ITKBaseType
virtual void BeforeRegistration(void)
virtual void GetValueAndDerivative(ParametersType p, double *val, ParametersType *xi)
Superclass1::CostFunctionPointer CostFunctionPointer
Superclass::RegistrationType RegistrationType
virtual void LineBracket(double *ax, double *bx, double *cx, double *fa, double *fb, double *fc)
virtual void SetInitialPosition(const ParametersType &param)
Superclass2::ConfigurationType ConfigurationType
virtual void LineOptimize(ParametersType *p, ParametersType xi, double *val)


Generated on 27-04-2014 for elastix by doxygen 1.8.6 elastix logo