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  * Copyright UMC Utrecht and contributors
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __elxConjugateGradientFRPR_h
19 #define __elxConjugateGradientFRPR_h
20 
21 #include "elxIncludes.h" // include first to avoid MSVS warning
22 #include "itkFRPROptimizer.h"
23 
24 namespace elastix
25 {
26 
73 template< class TElastix >
75  public
76  itk::FRPROptimizer,
77  public
78  OptimizerBase< TElastix >
79 {
80 public:
81 
84  typedef itk::FRPROptimizer Superclass1;
86  typedef itk::SmartPointer< Self > Pointer;
87  typedef itk::SmartPointer< const Self > ConstPointer;
88 
90  itkNewMacro( Self );
91 
93  itkTypeMacro( ConjugateGradientFRPR, itk::FRPROptimizer );
94 
96  elxClassNameMacro( "ConjugateGradientFRPR" );
97 
99  typedef Superclass1::CostFunctionType CostFunctionType;
100  typedef Superclass1::CostFunctionPointer CostFunctionPointer;
101  //typedef Superclass1::StopConditionType StopConditionType; not implemented in this itkOptimizer
102  typedef typename Superclass1::ParametersType ParametersType;
103  //not declared in Superclass, although it should be.
104  typedef SingleValuedNonLinearOptimizer::DerivativeType DerivativeType;
105 
114 
117  virtual void BeforeRegistration( void );
118 
119  virtual void BeforeEachResolution( void );
120 
121  virtual void AfterEachResolution( void );
122 
123  virtual void AfterEachIteration( void );
124 
125  virtual void AfterRegistration( void );
126 
128  virtual void SetInitialPosition( const ParametersType & param );
129 
132  itkGetConstMacro( LineOptimizing, bool );
133  itkGetConstMacro( LineBracketing, bool );
134 
136  itkGetConstReferenceMacro( CurrentDerivativeMagnitude, double );
137 
139  itkGetConstReferenceMacro( CurrentStepLength, double );
140 
142  itkGetConstReferenceMacro( CurrentSearchDirectionMagnitude, double );
143 
144 protected:
145 
148 
151 
154 
157 
160  itkSetMacro( LineOptimizing, bool );
161  itkSetMacro( LineBracketing, bool );
162 
170  virtual void GetValueAndDerivative( ParametersType p, double * val,
171  ParametersType * xi );
172 
183  virtual void LineBracket( double * ax, double * bx, double * cx,
184  double * fa, double * fb, double * fc );
185 
195  virtual void BracketedLineOptimize( double ax, double bx, double cx,
196  double fa, double fb, double fc,
197  double * extX, double * extVal );
198 
203  virtual void LineOptimize( ParametersType * p, ParametersType xi,
204  double * val );
205 
206 private:
207 
208  ConjugateGradientFRPR( const Self & ); // purposely not implemented
209  void operator=( const Self & ); // purposely not implemented
210 
213 
214  const char * DeterminePhase( void ) const;
215 
216 };
217 
218 } // end namespace elastix
219 
220 #ifndef ITK_MANUAL_INSTANTIATION
221 #include "elxConjugateGradientFRPR.hxx"
222 #endif
223 
224 #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 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo