Loading...
Searching...
No Matches
itkLineSearchOptimizer.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright UMC Utrecht and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef itkLineSearchOptimizer_h
#define itkLineSearchOptimizer_h
#include "itkSingleValuedNonLinearOptimizer.h"
#include "itkIntTypes.h" //tmp
namespace itk
{
class LineSearchOptimizer : public SingleValuedNonLinearOptimizer
{
public:
ITK_DISALLOW_COPY_AND_MOVE(LineSearchOptimizer);
using Self = LineSearchOptimizer;
using Superclass = SingleValuedNonLinearOptimizer;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
// itkNewMacro(Self); because this is an abstract base class.
itkTypeMacro(LineSearchOptimizer, SingleValuedNonLinearOptimizer);
using Superclass::MeasureType;
using Superclass::ParametersType;
using Superclass::DerivativeType;
using Superclass::CostFunctionType;
virtual void
SetLineSearchDirection(const ParametersType & arg)
{
this->m_LineSearchDirection = arg;
this->Modified();
}
itkGetConstReferenceMacro(LineSearchDirection, ParametersType);
virtual void
SetInitialDerivative(const DerivativeType & itkNotUsed(derivative))
{}
virtual void
SetInitialValue(MeasureType itkNotUsed(value))
{}
virtual void
GetCurrentValueAndDerivative(MeasureType & value, DerivativeType & derivative) const = 0;
virtual void
GetCurrentDerivative(DerivativeType & derivative) const = 0;
virtual MeasureType
GetCurrentValue() const = 0;
itkGetConstMacro(CurrentStepLength, double);
itkSetMacro(MinimumStepLength, double);
itkGetConstMacro(MinimumStepLength, double);
itkSetMacro(MaximumStepLength, double);
itkGetConstMacro(MaximumStepLength, double);
itkSetMacro(InitialStepLengthEstimate, double);
itkGetConstMacro(InitialStepLengthEstimate, double);
protected:
LineSearchOptimizer();
~LineSearchOptimizer() override = default;
void
PrintSelf(std::ostream & os, Indent indent) const override;
double m_CurrentStepLength{};
virtual void
SetCurrentStepLength(double step);
double
DirectionalDerivative(const DerivativeType & derivative) const;
private:
ParametersType m_LineSearchDirection{};
double m_MinimumStepLength{};
double m_MaximumStepLength{};
double m_InitialStepLengthEstimate{};
};
} // end namespace itk
#endif // #ifndef itkLineSearchOptimizer_h
SingleValuedNonLinearOptimizer
itk::LineSearchOptimizer::GetCurrentDerivative
virtual void GetCurrentDerivative(DerivativeType &derivative) const =0
itk::LineSearchOptimizer::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::LineSearchOptimizer::Superclass
SingleValuedNonLinearOptimizer Superclass
Definition itkLineSearchOptimizer.h:43
itk::LineSearchOptimizer::m_MaximumStepLength
double m_MaximumStepLength
Definition itkLineSearchOptimizer.h:148
itk::LineSearchOptimizer::SetCurrentStepLength
virtual void SetCurrentStepLength(double step)
itk::LineSearchOptimizer::Pointer
SmartPointer< Self > Pointer
Definition itkLineSearchOptimizer.h:44
itk::LineSearchOptimizer::Self
LineSearchOptimizer Self
Definition itkLineSearchOptimizer.h:42
itk::LineSearchOptimizer::LineSearchOptimizer
LineSearchOptimizer()
itk::LineSearchOptimizer::GetCurrentValue
virtual MeasureType GetCurrentValue() const =0
itk::LineSearchOptimizer::DirectionalDerivative
double DirectionalDerivative(const DerivativeType &derivative) const
itk::LineSearchOptimizer::m_LineSearchDirection
ParametersType m_LineSearchDirection
Definition itkLineSearchOptimizer.h:145
itk::LineSearchOptimizer::SetLineSearchDirection
virtual void SetLineSearchDirection(const ParametersType &arg)
Definition itkLineSearchOptimizer.h:57
itk::LineSearchOptimizer::SetInitialDerivative
virtual void SetInitialDerivative(const DerivativeType &)
Definition itkLineSearchOptimizer.h:76
itk::LineSearchOptimizer::m_MinimumStepLength
double m_MinimumStepLength
Definition itkLineSearchOptimizer.h:147
itk::LineSearchOptimizer::SetInitialValue
virtual void SetInitialValue(MeasureType)
Definition itkLineSearchOptimizer.h:79
itk::LineSearchOptimizer::m_InitialStepLengthEstimate
double m_InitialStepLengthEstimate
Definition itkLineSearchOptimizer.h:149
itk::LineSearchOptimizer::~LineSearchOptimizer
~LineSearchOptimizer() override=default
itk::LineSearchOptimizer::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(LineSearchOptimizer)
itk::LineSearchOptimizer::m_CurrentStepLength
double m_CurrentStepLength
Definition itkLineSearchOptimizer.h:130
itk::LineSearchOptimizer::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkLineSearchOptimizer.h:45
itk::LineSearchOptimizer::GetCurrentValueAndDerivative
virtual void GetCurrentValueAndDerivative(MeasureType &value, DerivativeType &derivative) const =0
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |