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  void BeforeRegistration( void ) override;
118 
119  void BeforeEachResolution( void ) override;
120 
121  void AfterEachResolution( void ) override;
122 
123  void AfterEachIteration( void ) override;
124 
125  void AfterRegistration( void ) override;
126 
128  void SetInitialPosition( const ParametersType & param ) override;
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  void LineBracket( double * ax, double * bx, double * cx,
184  double * fa, double * fb, double * fc ) override;
185 
195  void BracketedLineOptimize( double ax, double bx, double cx,
196  double fa, double fb, double fc,
197  double * extX, double * extVal ) override;
198 
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
A class that deals with user given parameters and command line arguments.
The ConjugateGradientFRPR class.
Superclass2::ConfigurationPointer ConfigurationPointer
void operator=(const Self &)
itk::SmartPointer< const Self > ConstPointer
void AfterRegistration(void) override
void BeforeEachResolution(void) override
virtual void GetValueAndDerivative(ParametersType p, double *val, ParametersType *xi)
void BracketedLineOptimize(double ax, double bx, double cx, double fa, double fb, double fc, double *extX, double *extVal) override
void LineBracket(double *ax, double *bx, double *cx, double *fa, double *fb, double *fc) override
SingleValuedNonLinearOptimizer::DerivativeType DerivativeType
Superclass1::CostFunctionType CostFunctionType
const char * DeterminePhase(void) const
OptimizerBase< TElastix > Superclass2
void AfterEachIteration(void) override
Superclass1::CostFunctionPointer CostFunctionPointer
Superclass2::ElastixPointer ElastixPointer
void AfterEachResolution(void) override
elxClassNameMacro("ConjugateGradientFRPR")
Superclass1::ParametersType ParametersType
virtual void LineOptimize(ParametersType *p, ParametersType xi, double *val)
Superclass2::RegistrationType RegistrationType
Superclass2::RegistrationPointer RegistrationPointer
void SetInitialPosition(const ParametersType &param) override
Superclass2::ConfigurationType ConfigurationType
void BeforeRegistration(void) override
This class is the elastix base class for all Optimizers.
Superclass::ConfigurationPointer ConfigurationPointer
itk::Optimizer ITKBaseType
Superclass::ElastixType ElastixType
Superclass::ElastixPointer ElastixPointer
Superclass::RegistrationPointer RegistrationPointer
Superclass::RegistrationType RegistrationType


Generated on 1641078589 for elastix by doxygen 1.9.1 elastix logo