ITK  5.4.0
Insight Toolkit
itkSingleValuedNonLinearVnlOptimizerv4.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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 itkSingleValuedNonLinearVnlOptimizerv4_h
19#define itkSingleValuedNonLinearVnlOptimizerv4_h
20
21#include "ITKOptimizersv4Export.h"
22
25#include "itkCommand.h"
26
27namespace itk
28{
39{
40public:
41 ITK_DISALLOW_COPY_AND_MOVE(SingleValuedNonLinearVnlOptimizerv4);
42
48
50 itkOverrideGetNameOfClassMacro(SingleValuedNonLinearVnlOptimizerv4);
51
57
58 using MetricType = Superclass::MetricType;
59 using DerivativeType = Superclass::DerivativeType;
60 using ParametersType = Superclass::ParametersType;
61 using ScalesType = Superclass::ScalesType;
62
64 using StopConditionReturnStringType = Superclass::StopConditionReturnStringType;
65
67 using StopConditionDescriptionType = Superclass::StopConditionDescriptionType;
68
69 void
70 StartOptimization(bool doOnlyInitialization = false) override;
71
78 void
79 SetMetric(MetricType * metric) override = 0;
80
86 itkGetConstReferenceMacro(CachedDerivative, DerivativeType);
87 itkGetConstReferenceMacro(CachedCurrentPosition, ParametersType);
92 GetStopConditionDescription() const override = 0;
93
94protected:
97
99
100 void
102
105
108
113
115 void
116 PrintSelf(std::ostream & os, Indent indent) const override;
117
118private:
125 void
127
128 CostFunctionAdaptorType * m_CostFunctionAdaptor{};
129
131
132 mutable ParametersType m_CachedCurrentPosition{};
133 mutable DerivativeType m_CachedDerivative{};
134};
135} // end namespace itk
136
137#endif
Abstraction of the Events used to communicating among filters and with GUIs.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Abstract base for object-to-object optimizers.
A Command subclass that calls a pointer to a member function.
Definition: itkCommand.h:165
This is a base for the ITKv4 Optimization methods using the vnl library.
CostFunctionAdaptorType * GetNonConstCostFunctionAdaptor() const
void StartOptimization(bool doOnlyInitialization=false) override
void PrintSelf(std::ostream &os, Indent indent) const override
const CostFunctionAdaptorType * GetCostFunctionAdaptor() const
void IterationReport(const EventObject &event)
const StopConditionReturnStringType GetStopConditionDescription() const override=0
CostFunctionAdaptorType * GetCostFunctionAdaptor()
void SetCostFunctionAdaptor(CostFunctionAdaptorType *adaptor)
Superclass::StopConditionReturnStringType StopConditionReturnStringType
void SetMetric(MetricType *metric) override=0
Superclass::StopConditionDescriptionType StopConditionDescriptionType
This class is an Adaptor that allows to pass itk::ObjectToObjectMetricBase objects to vnl_optimizers ...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ObjectToObjectOptimizerBaseTemplate< double > ObjectToObjectOptimizerBase