go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxStandardGradientDescent.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 elxStandardGradientDescent_h
19#define elxStandardGradientDescent_h
20
21#include "elxIncludes.h" // include first to avoid MSVS warning
23
24namespace elastix
25{
26
67template <class TElastix>
68class ITK_TEMPLATE_EXPORT StandardGradientDescent
70 , public OptimizerBase<TElastix>
71{
72public:
74
79 using Pointer = itk::SmartPointer<Self>;
80 using ConstPointer = itk::SmartPointer<const Self>;
81
83 itkNewMacro(Self);
84
87
92 elxClassNameMacro("StandardGradientDescent");
93
95 using Superclass1::CostFunctionType;
96 using Superclass1::CostFunctionPointer;
98
100 using typename Superclass2::ElastixType;
101 using typename Superclass2::RegistrationType;
103
105 using typename Superclass1::ParametersType;
106
109 void
111
112 void
114
115 void
117
118 void
120
121 void
123
126 void
128
130 void
131 MetricErrorResponse(itk::ExceptionObject & err) override;
132
136 void
138 {
139 this->Superclass1::SetCurrentPosition(param);
140 }
141
142
144 itkSetMacro(MaximumNumberOfSamplingAttempts, unsigned long);
145
147 itkGetConstReferenceMacro(MaximumNumberOfSamplingAttempts, unsigned long);
148
149protected:
151 ~StandardGradientDescent() override = default;
152
153private:
155
160};
161
162} // end namespace elastix
163
164#ifndef ITK_MANUAL_INSTANTIATION
165# include "elxStandardGradientDescent.hxx"
166#endif
167
168#endif // end #ifndef elxStandardGradientDescent_h
This class is the elastix base class for all Optimizers.
typename ElastixType::RegistrationBaseType RegistrationType
typename ITKBaseType::ParametersType ParametersType
A gradient descent optimizer with a decaying gain.
ITK_DISALLOW_COPY_AND_MOVE(StandardGradientDescent)
typename Superclass2::ITKBaseType ITKBaseType
itk::SmartPointer< const Self > ConstPointer
elxClassNameMacro("StandardGradientDescent")
void MetricErrorResponse(itk::ExceptionObject &err) override
void SetCurrentPositionPublic(const ParametersType &param) override
void BeforeEachResolution() override
~StandardGradientDescent() override=default
This class implements a gradient descent optimizer with a decaying gain.


Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo