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
24namespace elastix
25{
26
73template <class TElastix>
74class ITK_TEMPLATE_EXPORT ConjugateGradientFRPR
75 : public itk::FRPROptimizer
76 , public OptimizerBase<TElastix>
77{
78public:
80
83 using Superclass1 = itk::FRPROptimizer;
85 using Pointer = itk::SmartPointer<Self>;
86 using ConstPointer = itk::SmartPointer<const Self>;
87
89 itkNewMacro(Self);
90
92 itkTypeMacro(ConjugateGradientFRPR, itk::FRPROptimizer);
93
95 elxClassNameMacro("ConjugateGradientFRPR");
96
98 using Superclass1::CostFunctionType;
99 using Superclass1::CostFunctionPointer;
100 // using Superclass1::StopConditionType; not implemented in this itkOptimizer
101 using typename Superclass1::ParametersType;
102 // not declared in Superclass, although it should be.
103 using DerivativeType = SingleValuedNonLinearOptimizer::DerivativeType;
104
106 using typename Superclass2::ElastixType;
107 using typename Superclass2::RegistrationType;
109
112 void
114
115 void
117
118 void
120
121 void
123
124 void
126
128 void
129 SetInitialPosition(const ParametersType & param) override;
130
133 itkGetConstMacro(LineOptimizing, bool);
134 itkGetConstMacro(LineBracketing, bool);
135
137 itkGetConstReferenceMacro(CurrentDerivativeMagnitude, double);
138
140 itkGetConstReferenceMacro(CurrentStepLength, double);
141
143 itkGetConstReferenceMacro(CurrentSearchDirectionMagnitude, double);
144
145protected:
147 ~ConjugateGradientFRPR() override = default;
148
151
154
157
160 itkSetMacro(LineOptimizing, bool);
161 itkSetMacro(LineBracketing, bool);
162
170 virtual void
172
183 void
184 LineBracket(double * ax, double * bx, double * cx, double * fa, double * fb, double * fc) override;
185
195 void
197 double bx,
198 double cx,
199 double fa,
200 double fb,
201 double fc,
202 double * extX,
203 double * extVal) override;
204
209 virtual void
211
212private:
214
217
218 const char *
220};
221
222} // end namespace elastix
223
224#ifndef ITK_MANUAL_INSTANTIATION
225# include "elxConjugateGradientFRPR.hxx"
226#endif
227
228#endif // end #ifndef elxConjugateGradientFRPR_h
The ConjugateGradientFRPR class.
void BeforeRegistration() override
ITK_DISALLOW_COPY_AND_MOVE(ConjugateGradientFRPR)
void AfterEachResolution() 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
void AfterEachIteration() override
typename Superclass2::ITKBaseType ITKBaseType
const char * DeterminePhase() const
elxClassNameMacro("ConjugateGradientFRPR")
virtual void LineOptimize(ParametersType *p, ParametersType xi, double *val)
void BeforeEachResolution() override
~ConjugateGradientFRPR() override=default
void AfterRegistration() override
void SetInitialPosition(const ParametersType &param) override
SingleValuedNonLinearOptimizer::DerivativeType DerivativeType
itk::SmartPointer< const Self > ConstPointer
This class is the elastix base class for all Optimizers.
typename ElastixType::RegistrationBaseType RegistrationType
itk::Optimizer ITKBaseType
typename ITKBaseType::ParametersType ParametersType


Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo