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 using namespace itk;
24 
25 
72  template <class TElastix>
74  public
75  itk::FRPROptimizer,
76  public
77  OptimizerBase<TElastix>
78  {
79  public:
80 
85  typedef SmartPointer<Self> Pointer;
86  typedef SmartPointer<const Self> ConstPointer;
87 
89  itkNewMacro( Self );
90 
92  itkTypeMacro( ConjugateGradientFRPR, FRPROptimizer );
93 
95  elxClassNameMacro( "ConjugateGradientFRPR" );
96 
98  typedef Superclass1::CostFunctionType CostFunctionType;
99  typedef Superclass1::CostFunctionPointer CostFunctionPointer;
100  //typedef Superclass1::StopConditionType StopConditionType; not implemented in this itkOptimizer
101  typedef typename Superclass1::ParametersType ParametersType;
102  //not declared in Superclass, although it should be.
103  typedef SingleValuedNonLinearOptimizer::DerivativeType DerivativeType;
104 
113 
116  virtual void BeforeRegistration(void);
117  virtual void BeforeEachResolution(void);
118  virtual void AfterEachResolution(void);
119  virtual void AfterEachIteration(void);
120  virtual void AfterRegistration(void);
121 
123  virtual void SetInitialPosition( const ParametersType & param );
124 
127  itkGetConstMacro(LineOptimizing, bool);
128  itkGetConstMacro(LineBracketing, bool);
129 
131  itkGetConstReferenceMacro(CurrentDerivativeMagnitude, double);
132 
134  itkGetConstReferenceMacro(CurrentStepLength, double);
135 
137  itkGetConstReferenceMacro(CurrentSearchDirectionMagnitude, double);
138 
139  protected:
140 
143 
145  double m_CurrentDerivativeMagnitude ;
146 
149 
152 
155  itkSetMacro(LineOptimizing, bool);
156  itkSetMacro(LineBracketing, bool);
157 
165  virtual void GetValueAndDerivative(ParametersType p, double * val,
166  ParametersType * xi);
167 
178  virtual void LineBracket(double *ax, double *bx, double *cx,
179  double *fa, double *fb, double *fc);
180 
190  virtual void BracketedLineOptimize(double ax, double bx, double cx,
191  double fa, double fb, double fc,
192  double * extX, double * extVal);
193 
198  virtual void LineOptimize(ParametersType * p, ParametersType xi,
199  double * val );
200 
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  }; // end class ConjugateGradientFRPR
214 
215 
216 } // end namespace elastix
217 
218 #ifndef ITK_MANUAL_INSTANTIATION
219 #include "elxConjugateGradientFRPR.hxx"
220 #endif
221 
222 #endif // end #ifndef __elxConjugateGradientFRPR_h


Generated on 21-03-2014 for elastix by doxygen 1.8.1.2 elastix logo