Loading...
Searching...
No Matches
itkScaledSingleValuedNonLinearOptimizer.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 itkScaledSingleValuedNonLinearOptimizer_h
#define itkScaledSingleValuedNonLinearOptimizer_h
#include "itkSingleValuedNonLinearOptimizer.h"
#include "itkScaledSingleValuedCostFunction.h"
namespace itk
{
class ScaledSingleValuedNonLinearOptimizer : public SingleValuedNonLinearOptimizer
{
public:
ITK_DISALLOW_COPY_AND_MOVE(ScaledSingleValuedNonLinearOptimizer);
using Self = ScaledSingleValuedNonLinearOptimizer;
using Superclass = SingleValuedNonLinearOptimizer;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(ScaledSingleValuedNonLinearOptimizer, SingleValuedNonLinearOptimizer);
using Superclass::MeasureType;
using Superclass::ParametersType;
using Superclass::DerivativeType;
using Superclass::CostFunctionType;
using ScalesType = NonLinearOptimizer::ScalesType;
using ScaledCostFunctionType = ScaledSingleValuedCostFunction;
using ScaledCostFunctionPointer = ScaledCostFunctionType::Pointer;
virtual void
InitializeScales();
void
SetCostFunction(CostFunctionType * costFunction) override;
virtual void
SetUseScales(bool arg);
bool
GetUseScales() const;
itkGetConstReferenceMacro(ScaledCurrentPosition, ParametersType);
const ParametersType &
GetCurrentPosition() const override;
itkGetConstObjectMacro(ScaledCostFunction, ScaledCostFunctionType);
itkBooleanMacro(Maximize);
virtual void
SetMaximize(bool _arg);
itkGetConstMacro(Maximize, bool);
protected:
ScaledSingleValuedNonLinearOptimizer();
~ScaledSingleValuedNonLinearOptimizer() override = default;
void
PrintSelf(std::ostream & os, Indent indent) const override;
ParametersType m_ScaledCurrentPosition{};
ScaledCostFunctionPointer m_ScaledCostFunction{};
virtual void
SetScaledCurrentPosition(const ParametersType & parameters);
void
SetCurrentPosition(const ParametersType & param) override;
virtual MeasureType
GetScaledValue(const ParametersType & parameters) const;
virtual void
GetScaledDerivative(const ParametersType & parameters, DerivativeType & derivative) const;
virtual void
GetScaledValueAndDerivative(const ParametersType & parameters,
MeasureType & value,
DerivativeType & derivative) const;
private:
mutable ParametersType m_UnscaledCurrentPosition{};
bool m_Maximize{};
};
} // end namespace itk
#endif //#ifndef itkScaledSingleValuedNonLinearOptimizer_h
SingleValuedNonLinearOptimizer
itk::ScaledSingleValuedCostFunction
A cost function that applies a scaling to another cost function.
Definition itkScaledSingleValuedCostFunction.h:40
itk::ScaledSingleValuedCostFunction::Pointer
SmartPointer< Self > Pointer
Definition itkScaledSingleValuedCostFunction.h:47
itk::ScaledSingleValuedNonLinearOptimizer::Pointer
SmartPointer< Self > Pointer
Definition itkScaledSingleValuedNonLinearOptimizer.h:70
itk::ScaledSingleValuedNonLinearOptimizer::m_UnscaledCurrentPosition
ParametersType m_UnscaledCurrentPosition
Definition itkScaledSingleValuedNonLinearOptimizer.h:190
itk::ScaledSingleValuedNonLinearOptimizer::InitializeScales
virtual void InitializeScales()
itk::ScaledSingleValuedNonLinearOptimizer::SetUseScales
virtual void SetUseScales(bool arg)
itk::ScaledSingleValuedNonLinearOptimizer::ScaledSingleValuedNonLinearOptimizer
ScaledSingleValuedNonLinearOptimizer()
itk::ScaledSingleValuedNonLinearOptimizer::GetScaledDerivative
virtual void GetScaledDerivative(const ParametersType &parameters, DerivativeType &derivative) const
itk::ScaledSingleValuedNonLinearOptimizer::ScaledCostFunctionPointer
ScaledCostFunctionType::Pointer ScaledCostFunctionPointer
Definition itkScaledSingleValuedNonLinearOptimizer.h:87
itk::ScaledSingleValuedNonLinearOptimizer::m_Maximize
bool m_Maximize
Definition itkScaledSingleValuedNonLinearOptimizer.h:191
itk::ScaledSingleValuedNonLinearOptimizer::ScalesType
NonLinearOptimizer::ScalesType ScalesType
Definition itkScaledSingleValuedNonLinearOptimizer.h:85
itk::ScaledSingleValuedNonLinearOptimizer::GetScaledValueAndDerivative
virtual void GetScaledValueAndDerivative(const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
itk::ScaledSingleValuedNonLinearOptimizer::SetCostFunction
void SetCostFunction(CostFunctionType *costFunction) override
itk::ScaledSingleValuedNonLinearOptimizer::Superclass
SingleValuedNonLinearOptimizer Superclass
Definition itkScaledSingleValuedNonLinearOptimizer.h:69
itk::ScaledSingleValuedNonLinearOptimizer::ScaledCostFunctionType
ScaledSingleValuedCostFunction ScaledCostFunctionType
Definition itkScaledSingleValuedNonLinearOptimizer.h:86
itk::ScaledSingleValuedNonLinearOptimizer::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(ScaledSingleValuedNonLinearOptimizer)
itk::ScaledSingleValuedNonLinearOptimizer::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkScaledSingleValuedNonLinearOptimizer.h:71
itk::ScaledSingleValuedNonLinearOptimizer::GetUseScales
bool GetUseScales() const
itk::ScaledSingleValuedNonLinearOptimizer::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::ScaledSingleValuedNonLinearOptimizer::SetScaledCurrentPosition
virtual void SetScaledCurrentPosition(const ParametersType &parameters)
itk::ScaledSingleValuedNonLinearOptimizer::GetScaledValue
virtual MeasureType GetScaledValue(const ParametersType &parameters) const
itk::ScaledSingleValuedNonLinearOptimizer::Self
ScaledSingleValuedNonLinearOptimizer Self
Definition itkScaledSingleValuedNonLinearOptimizer.h:68
itk::ScaledSingleValuedNonLinearOptimizer::SetMaximize
virtual void SetMaximize(bool _arg)
itk::ScaledSingleValuedNonLinearOptimizer::m_ScaledCostFunction
ScaledCostFunctionPointer m_ScaledCostFunction
Definition itkScaledSingleValuedNonLinearOptimizer.h:146
itk::ScaledSingleValuedNonLinearOptimizer::GetCurrentPosition
const ParametersType & GetCurrentPosition() const override
itk::ScaledSingleValuedNonLinearOptimizer::SetCurrentPosition
void SetCurrentPosition(const ParametersType &param) override
itk::ScaledSingleValuedNonLinearOptimizer::m_ScaledCurrentPosition
ParametersType m_ScaledCurrentPosition
Definition itkScaledSingleValuedNonLinearOptimizer.h:145
itk::ScaledSingleValuedNonLinearOptimizer::~ScaledSingleValuedNonLinearOptimizer
~ScaledSingleValuedNonLinearOptimizer() override=default
itkScaledSingleValuedCostFunction.h
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |