Loading...
Searching...
No Matches
elxOptimizerBase.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 elxOptimizerBase_h
#define elxOptimizerBase_h
#include "elxMacro.h"
#include "elxBaseComponentSE.h"
#include "itkOptimizer.h"
namespace elastix
{
template <class TElastix>
class ITK_TEMPLATE_EXPORT OptimizerBase : public BaseComponentSE<TElastix>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(OptimizerBase);
using Self = OptimizerBase;
using Superclass = BaseComponentSE<TElastix>;
itkTypeMacro(OptimizerBase, BaseComponentSE);
using typename Superclass::ElastixType;
using typename Superclass::RegistrationType;
using ITKBaseType = itk::Optimizer;
using ParametersType = typename ITKBaseType::ParametersType;
ITKBaseType *
GetAsITKBaseType()
{
return &(this->GetSelf());
}
const ITKBaseType *
GetAsITKBaseType() const
{
return &(this->GetSelf());
}
virtual void
SetCurrentPositionPublic(const ParametersType & param);
void
BeforeEachResolutionBase() override;
void
AfterRegistrationBase() override;
virtual void
SetSinusScales(double amplitude, double frequency, unsigned long numberOfParameters);
protected:
OptimizerBase() = default;
~OptimizerBase() override = default;
virtual void
SelectNewSamples();
virtual bool
GetNewSamplesEveryIteration() const;
struct SettingsType
{
double a, A, alpha, fmax, fmin, omega;
};
using SettingsVectorType = typename std::vector<SettingsType>;
static void
PrintSettingsVector(const SettingsVectorType & settings);
private:
elxDeclarePureVirtualGetSelfMacro(ITKBaseType);
bool m_NewSamplesEveryIteration{ false };
};
} // end namespace elastix
#ifndef ITK_MANUAL_INSTANTIATION
# include "elxOptimizerBase.hxx"
#endif
#endif // end #ifndef elxOptimizerBase_h
elastix::BaseComponentSE::BaseComponentSE
BaseComponentSE()=default
elastix::BaseComponentSE::RegistrationType
typename ElastixType::RegistrationBaseType RegistrationType
Definition elxBaseComponentSE.h:62
elastix::BaseComponentSE::ElastixType
TElastix ElastixType
Definition elxBaseComponentSE.h:57
elastix::BaseComponentSE::GetSelf
virtual const itk::Object & GetSelf() const =0
elastix::OptimizerBase::AfterRegistrationBase
void AfterRegistrationBase() override
elastix::OptimizerBase::SetSinusScales
virtual void SetSinusScales(double amplitude, double frequency, unsigned long numberOfParameters)
elastix::OptimizerBase::GetAsITKBaseType
ITKBaseType * GetAsITKBaseType()
Definition elxOptimizerBase.h:77
elastix::OptimizerBase::Superclass
BaseComponentSE< TElastix > Superclass
Definition elxOptimizerBase.h:60
elastix::OptimizerBase::SelectNewSamples
virtual void SelectNewSamples()
elastix::OptimizerBase::PrintSettingsVector
static void PrintSettingsVector(const SettingsVectorType &settings)
elastix::OptimizerBase::OptimizerBase
OptimizerBase()=default
elastix::OptimizerBase::~OptimizerBase
~OptimizerBase() override=default
elastix::OptimizerBase::elxDeclarePureVirtualGetSelfMacro
elxDeclarePureVirtualGetSelfMacro(ITKBaseType)
elastix::OptimizerBase::SetCurrentPositionPublic
virtual void SetCurrentPositionPublic(const ParametersType &param)
elastix::OptimizerBase::GetAsITKBaseType
const ITKBaseType * GetAsITKBaseType() const
Definition elxOptimizerBase.h:85
elastix::OptimizerBase::GetNewSamplesEveryIteration
virtual bool GetNewSamplesEveryIteration() const
elastix::OptimizerBase::ITKBaseType
itk::Optimizer ITKBaseType
Definition elxOptimizerBase.h:70
elastix::OptimizerBase::SettingsVectorType
typename std::vector< SettingsType > SettingsVectorType
Definition elxOptimizerBase.h:133
elastix::OptimizerBase::ParametersType
typename ITKBaseType::ParametersType ParametersType
Definition elxOptimizerBase.h:73
elastix::OptimizerBase::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(OptimizerBase)
elastix::OptimizerBase::Self
OptimizerBase Self
Definition elxOptimizerBase.h:59
elastix::OptimizerBase< Self >::m_NewSamplesEveryIteration
bool m_NewSamplesEveryIteration
Definition elxOptimizerBase.h:145
elastix::OptimizerBase::BeforeEachResolutionBase
void BeforeEachResolutionBase() override
elxBaseComponentSE.h
elxMacro.h
elastix
Definition elxDefaultConstruct.h:25
elastix::OptimizerBase::SettingsType
Definition elxOptimizerBase.h:130
elastix::OptimizerBase::SettingsType::alpha
double alpha
Definition elxOptimizerBase.h:131
elastix::OptimizerBase::SettingsType::omega
double omega
Definition elxOptimizerBase.h:131
elastix::OptimizerBase::SettingsType::fmin
double fmin
Definition elxOptimizerBase.h:131
elastix::OptimizerBase::SettingsType::a
double a
Definition elxOptimizerBase.h:131
elastix::OptimizerBase::SettingsType::A
double A
Definition elxOptimizerBase.h:131
elastix::OptimizerBase::SettingsType::fmax
double fmax
Definition elxOptimizerBase.h:131

Generated on 1768596610 for elastix by 1.15.0 |