go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxOptimizerBase.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
19#ifndef elxOptimizerBase_h
20#define elxOptimizerBase_h
21
23#include "elxMacro.h"
24
25#include "elxBaseComponentSE.h"
26#include "itkOptimizer.h"
27
28namespace elastix
29{
30
52template <class TElastix>
53class ITK_TEMPLATE_EXPORT OptimizerBase : public BaseComponentSE<TElastix>
54{
55public:
57
61
64
66 using typename Superclass::ElastixType;
67 using typename Superclass::RegistrationType;
68
70 using ITKBaseType = itk::Optimizer;
71
73 using ParametersType = typename ITKBaseType::ParametersType;
74
78 {
79 return &(this->GetSelf());
80 }
81
82
84 const ITKBaseType *
86 {
87 return &(this->GetSelf());
88 }
89
90
92 virtual void
94
98 void
100
104 void
106
110 virtual void
111 SetSinusScales(double amplitude, double frequency, unsigned long numberOfParameters);
112
113protected:
115 OptimizerBase() = default;
117 ~OptimizerBase() override = default;
118
122 virtual void
124
126 virtual bool
128
130 {
131 double a, A, alpha, fmax, fmin, omega;
132 };
133 using SettingsVectorType = typename std::vector<SettingsType>;
134
136 static void
138
139private:
141
145 bool m_NewSamplesEveryIteration{ false };
146};
147
148} // end namespace elastix
149
150#ifndef ITK_MANUAL_INSTANTIATION
151# include "elxOptimizerBase.hxx"
152#endif
153
154#endif // end #ifndef elxOptimizerBase_h
The BaseComponentSE class is a base class for elastix components that provides some basic functionali...
typename ElastixType::RegistrationBaseType RegistrationType
This class is the elastix base class for all Optimizers.
void AfterRegistrationBase() override
virtual void SetSinusScales(double amplitude, double frequency, unsigned long numberOfParameters)
ITKBaseType * GetAsITKBaseType()
virtual void SelectNewSamples()
static void PrintSettingsVector(const SettingsVectorType &settings)
~OptimizerBase() override=default
elxDeclarePureVirtualGetSelfMacro(ITKBaseType)
virtual void SetCurrentPositionPublic(const ParametersType &param)
const ITKBaseType * GetAsITKBaseType() const
virtual bool GetNewSamplesEveryIteration() const
typename std::vector< SettingsType > SettingsVectorType
typename ITKBaseType::ParametersType ParametersType
ITK_DISALLOW_COPY_AND_MOVE(OptimizerBase)
void BeforeEachResolutionBase() override


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