go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkScaledSingleValuedNonLinearOptimizer.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 itkScaledSingleValuedNonLinearOptimizer_h
19#define itkScaledSingleValuedNonLinearOptimizer_h
20
21#include "itkSingleValuedNonLinearOptimizer.h"
23
24namespace itk
25{
63{
64public:
66
70 using Pointer = SmartPointer<Self>;
71 using ConstPointer = SmartPointer<const Self>;
72
74 itkNewMacro(Self);
75
80 using Superclass::MeasureType;
81 using Superclass::ParametersType;
82 using Superclass::DerivativeType;
83 using Superclass::CostFunctionType;
84
85 using ScalesType = NonLinearOptimizer::ScalesType;
88
96 virtual void
98
100 void
101 SetCostFunction(CostFunctionType * costFunction) override;
102
106 virtual void
107 SetUseScales(bool arg);
108
109 bool
111
113 itkGetConstReferenceMacro(ScaledCurrentPosition, ParametersType);
114
118 const ParametersType &
119 GetCurrentPosition() const override;
120
122 itkGetConstObjectMacro(ScaledCostFunction, ScaledCostFunctionType);
123
128 itkBooleanMacro(Maximize);
129 virtual void
130 SetMaximize(bool _arg);
131
132 itkGetConstMacro(Maximize, bool);
133
134protected:
139
141 void
142 PrintSelf(std::ostream & os, Indent indent) const override;
143
145 ParametersType m_ScaledCurrentPosition{};
147
149 virtual void
150 SetScaledCurrentPosition(const ParametersType & parameters);
151
163 void
164 SetCurrentPosition(const ParametersType & param) override;
165
169 virtual MeasureType
170 GetScaledValue(const ParametersType & parameters) const;
171
176 virtual void
177 GetScaledDerivative(const ParametersType & parameters, DerivativeType & derivative) const;
178
180 virtual void
181 GetScaledValueAndDerivative(const ParametersType & parameters,
182 MeasureType & value,
183 DerivativeType & derivative) const;
184
185private:
190 mutable ParametersType m_UnscaledCurrentPosition{};
192};
193
194} // end namespace itk
195
196#endif //#ifndef itkScaledSingleValuedNonLinearOptimizer_h
A cost function that applies a scaling to another cost function.
virtual void GetScaledDerivative(const ParametersType &parameters, DerivativeType &derivative) const
virtual void GetScaledValueAndDerivative(const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
void SetCostFunction(CostFunctionType *costFunction) override
ITK_DISALLOW_COPY_AND_MOVE(ScaledSingleValuedNonLinearOptimizer)
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void SetScaledCurrentPosition(const ParametersType &parameters)
virtual MeasureType GetScaledValue(const ParametersType &parameters) const
const ParametersType & GetCurrentPosition() const override
void SetCurrentPosition(const ParametersType &param) override
~ScaledSingleValuedNonLinearOptimizer() override=default


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