Loading...
Searching...
No Matches
elxStandardGradientDescent.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 elxStandardGradientDescent_h
#define elxStandardGradientDescent_h
#include "elxIncludes.h" // include first to avoid MSVS warning
#include "itkStandardGradientDescentOptimizer.h"
namespace elastix
{
template <class TElastix>
class ITK_TEMPLATE_EXPORT StandardGradientDescent
: public itk::StandardGradientDescentOptimizer
, public OptimizerBase<TElastix>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(StandardGradientDescent);
using Self = StandardGradientDescent;
using Superclass1 = StandardGradientDescentOptimizer;
using Superclass2 = OptimizerBase<TElastix>;
using Pointer = itk::SmartPointer<Self>;
using ConstPointer = itk::SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(StandardGradientDescent, StandardGradientDescentOptimizer);
elxClassNameMacro("StandardGradientDescent");
using Superclass1::CostFunctionType;
using Superclass1::CostFunctionPointer;
using Superclass1::StopConditionType;
using typename Superclass2::ElastixType;
using typename Superclass2::RegistrationType;
using ITKBaseType = typename Superclass2::ITKBaseType;
using typename Superclass1::ParametersType;
void
BeforeRegistration() override;
void
BeforeEachResolution() override;
void
AfterEachResolution() override;
void
AfterEachIteration() override;
void
AfterRegistration() override;
void
StartOptimization() override;
void
MetricErrorResponse(itk::ExceptionObject & err) override;
void
SetCurrentPositionPublic(const ParametersType & param) override
{
this->Superclass1::SetCurrentPosition(param);
}
itkSetMacro(MaximumNumberOfSamplingAttempts, unsigned long);
itkGetConstReferenceMacro(MaximumNumberOfSamplingAttempts, unsigned long);
protected:
StandardGradientDescent();
~StandardGradientDescent() override = default;
private:
elxOverrideGetSelfMacro;
unsigned long m_MaximumNumberOfSamplingAttempts;
unsigned long m_CurrentNumberOfSamplingAttempts;
unsigned long m_PreviousErrorAtIteration;
};
} // end namespace elastix
#ifndef ITK_MANUAL_INSTANTIATION
# include "elxStandardGradientDescent.hxx"
#endif
#endif // end #ifndef elxStandardGradientDescent_h
elastix::OptimizerBase::OptimizerBase
OptimizerBase()=default
elastix::OptimizerBase::RegistrationType
typename ElastixType::RegistrationBaseType RegistrationType
Definition elxBaseComponentSE.h:62
elastix::OptimizerBase::ElastixType
TElastix ElastixType
Definition elxBaseComponentSE.h:57
elastix::OptimizerBase::ITKBaseType
itk::Optimizer ITKBaseType
Definition elxOptimizerBase.h:70
elastix::OptimizerBase::ParametersType
typename ITKBaseType::ParametersType ParametersType
Definition elxOptimizerBase.h:73
elastix::StandardGradientDescent::AfterEachIteration
void AfterEachIteration() override
elastix::StandardGradientDescent::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(StandardGradientDescent)
elastix::StandardGradientDescent::BeforeRegistration
void BeforeRegistration() override
elastix::StandardGradientDescent::ITKBaseType
typename Superclass2::ITKBaseType ITKBaseType
Definition elxStandardGradientDescent.h:102
elastix::StandardGradientDescent::Superclass2
OptimizerBase< TElastix > Superclass2
Definition elxStandardGradientDescent.h:78
elastix::StandardGradientDescent::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition elxStandardGradientDescent.h:80
elastix::StandardGradientDescent::m_PreviousErrorAtIteration
unsigned long m_PreviousErrorAtIteration
Definition elxStandardGradientDescent.h:159
elastix::StandardGradientDescent::elxOverrideGetSelfMacro
elxOverrideGetSelfMacro
Definition elxStandardGradientDescent.h:154
elastix::StandardGradientDescent::Self
StandardGradientDescent Self
Definition elxStandardGradientDescent.h:76
elastix::StandardGradientDescent::elxClassNameMacro
elxClassNameMacro("StandardGradientDescent")
elastix::StandardGradientDescent::Pointer
itk::SmartPointer< Self > Pointer
Definition elxStandardGradientDescent.h:79
elastix::StandardGradientDescent::MetricErrorResponse
void MetricErrorResponse(itk::ExceptionObject &err) override
elastix::StandardGradientDescent::m_MaximumNumberOfSamplingAttempts
unsigned long m_MaximumNumberOfSamplingAttempts
Definition elxStandardGradientDescent.h:157
elastix::StandardGradientDescent::SetCurrentPositionPublic
void SetCurrentPositionPublic(const ParametersType &param) override
Definition elxStandardGradientDescent.h:137
elastix::StandardGradientDescent::BeforeEachResolution
void BeforeEachResolution() override
elastix::StandardGradientDescent::Superclass1
StandardGradientDescentOptimizer Superclass1
Definition elxStandardGradientDescent.h:77
elastix::StandardGradientDescent::AfterEachResolution
void AfterEachResolution() override
elastix::StandardGradientDescent::StartOptimization
void StartOptimization() override
elastix::StandardGradientDescent::StandardGradientDescent
StandardGradientDescent()
elastix::StandardGradientDescent::AfterRegistration
void AfterRegistration() override
elastix::StandardGradientDescent::m_CurrentNumberOfSamplingAttempts
unsigned long m_CurrentNumberOfSamplingAttempts
Definition elxStandardGradientDescent.h:158
elastix::StandardGradientDescent::~StandardGradientDescent
~StandardGradientDescent() override=default
itk::ScaledSingleValuedNonLinearOptimizer::SetCurrentPosition
void SetCurrentPosition(const ParametersType &param) override
itk::StandardGradientDescentOptimizer
This class implements a gradient descent optimizer with a decaying gain.
Definition itkStandardGradientDescentOptimizer.h:66
itk::StandardGradientDescentOptimizer::StandardGradientDescentOptimizer
StandardGradientDescentOptimizer()
itk::StandardGradientDescentOptimizer::StopConditionType
StopConditionType
Definition itkGradientDescentOptimizer2.h:84
elxIncludes.h
itkStandardGradientDescentOptimizer.h
elastix
Definition elxDefaultConstruct.h:25

Generated on 1768596610 for elastix by 1.15.0 |