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 
15 #ifndef __elxConjugateGradientFRPR_h
16 #define __elxConjugateGradientFRPR_h
17 
18 #include "itkFRPROptimizer.h"
19 #include "elxIncludes.h"
20 
21 namespace elastix
22 {
23 
24 
71  template <class TElastix>
73  public
74  itk::FRPROptimizer,
75  public
76  OptimizerBase<TElastix>
77  {
78  public:
79 
82  typedef itk::FRPROptimizer Superclass1;
84  typedef itk::SmartPointer<Self> Pointer;
85  typedef itk::SmartPointer<const Self> ConstPointer;
86 
88  itkNewMacro( Self );
89 
91  itkTypeMacro( ConjugateGradientFRPR, itk::FRPROptimizer );
92 
94  elxClassNameMacro( "ConjugateGradientFRPR" );
95 
97  typedef Superclass1::CostFunctionType CostFunctionType;
98  typedef Superclass1::CostFunctionPointer CostFunctionPointer;
99  //typedef Superclass1::StopConditionType StopConditionType; not implemented in this itkOptimizer
100  typedef typename Superclass1::ParametersType ParametersType;
101  //not declared in Superclass, although it should be.
102  typedef SingleValuedNonLinearOptimizer::DerivativeType DerivativeType;
103 
112 
115  virtual void BeforeRegistration(void);
116  virtual void BeforeEachResolution(void);
117  virtual void AfterEachResolution(void);
118  virtual void AfterEachIteration(void);
119  virtual void AfterRegistration(void);
120 
122  virtual void SetInitialPosition( const ParametersType & param );
123 
126  itkGetConstMacro(LineOptimizing, bool);
127  itkGetConstMacro(LineBracketing, bool);
128 
130  itkGetConstReferenceMacro(CurrentDerivativeMagnitude, double);
131 
133  itkGetConstReferenceMacro(CurrentStepLength, double);
134 
136  itkGetConstReferenceMacro(CurrentSearchDirectionMagnitude, double);
137 
138  protected:
139 
142 
145 
148 
151 
154  itkSetMacro(LineOptimizing, bool);
155  itkSetMacro(LineBracketing, bool);
156 
164  virtual void GetValueAndDerivative(ParametersType p, double * val,
165  ParametersType * xi);
166 
177  virtual void LineBracket(double *ax, double *bx, double *cx,
178  double *fa, double *fb, double *fc);
179 
189  virtual void BracketedLineOptimize(double ax, double bx, double cx,
190  double fa, double fb, double fc,
191  double * extX, double * extVal);
192 
197  virtual void LineOptimize(ParametersType * p, ParametersType xi,
198  double * val );
199 
200 
201  private:
202 
203  ConjugateGradientFRPR( const Self& ); // purposely not implemented
204  void operator=( const Self& ); // purposely not implemented
205 
208 
209  const char * DeterminePhase(void) const;
210 
211 
212  }; // end class ConjugateGradientFRPR
213 
214 
215 } // end namespace elastix
216 
217 #ifndef ITK_MANUAL_INSTANTIATION
218 #include "elxConjugateGradientFRPR.hxx"
219 #endif
220 
221 #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.
SingleValuedNonLinearOptimizer::DerivativeType DerivativeType
virtual void AfterEachResolution(void)
Superclass::ElastixType ElastixType
Superclass::ConfigurationPointer ConfigurationPointer
elxClassNameMacro("ConjugateGradientFRPR")
Superclass::ElastixPointer ElastixPointer
Superclass::ConfigurationType ConfigurationType
Superclass1::CostFunctionType CostFunctionType
Superclass2::RegistrationType RegistrationType
void operator=(const Self &)
Superclass2::RegistrationPointer RegistrationPointer
virtual void AfterRegistration(void)
itk::SmartPointer< const Self > ConstPointer
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
OptimizerBase< TElastix > Superclass2
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 04-01-2014 for elastix by doxygen 1.8.5 elastix logo