ITK
6.0.0
Insight Toolkit
|
#include <itkSingleValuedNonLinearVnlOptimizer.h>
This class is a base for the Optimization methods that optimize a single valued function.
It is an Adaptor class for optimizers provided by the vnl library
Definition at line 39 of file itkSingleValuedNonLinearVnlOptimizer.h.
Public Member Functions | |
virtual bool | CanUseScales () const |
const char * | GetNameOfClass () const override |
void | SetCostFunction (SingleValuedCostFunction *costFunction) override=0 |
virtual const bool & | GetMaximize () const |
virtual void | SetMaximize (bool _arg) |
virtual void | MaximizeOn () |
bool | GetMinimize () const |
void | SetMinimize (bool v) |
void | MinimizeOn () |
void | MinimizeOff () |
virtual const MeasureType & | GetCachedValue () const |
virtual const DerivativeType & | GetCachedDerivative () const |
virtual const ParametersType & | GetCachedCurrentPosition () const |
Public Member Functions inherited from itk::SingleValuedNonLinearOptimizer | |
virtual CostFunctionType * | GetModifiableCostFunction () |
const char * | GetNameOfClass () const override |
MeasureType | GetValue (const ParametersType ¶meters) const |
virtual void | SetCostFunction (CostFunctionType *costFunction) |
const char * | GetNameOfClass () const override |
Public Member Functions inherited from itk::Optimizer | |
virtual const ParametersType & | GetCurrentPosition () const |
virtual const ParametersType & | GetInitialPosition () const |
const char * | GetNameOfClass () const override |
virtual std::string | GetStopConditionDescription () const |
virtual void | SetInitialPosition (const ParametersType ¶m) |
void | SetScales (const ScalesType &scales) |
virtual void | StartOptimization () |
virtual const ScalesType & | GetScales () const |
virtual const ScalesType & | GetInverseScales () const |
Public Member Functions inherited from itk::Object | |
unsigned long | AddObserver (const EventObject &event, Command *cmd) const |
unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
LightObject::Pointer | CreateAnother () const override |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
const char * | GetNameOfClass () const override |
virtual const TimeStamp & | GetTimeStamp () const |
bool | HasObserver (const EventObject &event) const |
void | InvokeEvent (const EventObject &) |
void | InvokeEvent (const EventObject &) const |
virtual void | Modified () const |
void | Register () const override |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) const |
void | SetDebug (bool debugFlag) const |
void | SetReferenceCount (int) override |
void | UnRegister () const noexcept override |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
virtual void | SetObjectName (std::string _arg) |
virtual const std::string & | GetObjectName () const |
Public Member Functions inherited from itk::LightObject | |
Pointer | Clone () const |
virtual Pointer | CreateAnother () const |
virtual void | Delete () |
virtual const char * | GetNameOfClass () const |
virtual int | GetReferenceCount () const |
void | Print (std::ostream &os, Indent indent=0) const |
virtual void | Register () const |
virtual void | SetReferenceCount (int) |
virtual void | UnRegister () const noexcept |
Protected Types | |
using | CostFunctionAdaptorType = SingleValuedVnlCostFunctionAdaptor |
Protected Member Functions | |
CostFunctionAdaptorType * | GetCostFunctionAdaptor () |
const CostFunctionAdaptorType * | GetCostFunctionAdaptor () const |
CostFunctionAdaptorType * | GetNonConstCostFunctionAdaptor () const |
void | PrintSelf (std::ostream &os, Indent indent) const override |
void | SetCostFunctionAdaptor (CostFunctionAdaptorType *adaptor) |
SingleValuedNonLinearVnlOptimizer () | |
~SingleValuedNonLinearVnlOptimizer () override | |
Protected Member Functions inherited from itk::SingleValuedNonLinearOptimizer | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
SingleValuedNonLinearOptimizer () | |
~SingleValuedNonLinearOptimizer () override=default | |
Protected Member Functions inherited from itk::NonLinearOptimizer | |
NonLinearOptimizer ()=default | |
~NonLinearOptimizer () override | |
Protected Member Functions inherited from itk::Optimizer | |
Optimizer () | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
virtual void | SetCurrentPosition (const ParametersType ¶m) |
~Optimizer () override=default | |
Protected Member Functions inherited from itk::Object | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
void | PrintSelf (std::ostream &os, Indent indent) const override |
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
~Object () override | |
Protected Member Functions inherited from itk::LightObject | |
virtual LightObject::Pointer | InternalClone () const |
LightObject () | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintSelf (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Private Member Functions | |
void | IterationReport (const EventObject &event) |
Private Attributes | |
ParametersType | m_CachedCurrentPosition {} |
DerivativeType | m_CachedDerivative {} |
MeasureType | m_CachedValue {} |
CommandType::Pointer | m_Command {} |
std::unique_ptr< CostFunctionAdaptorType > | m_CostFunctionAdaptor |
bool | m_Maximize {} |
Additional Inherited Members | |
Static Public Member Functions inherited from itk::SingleValuedNonLinearOptimizer | |
static Pointer | New () |
Static Public Member Functions inherited from itk::NonLinearOptimizer | |
static Pointer | New () |
Static Public Member Functions inherited from itk::Optimizer | |
static Pointer | New () |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Protected Attributes inherited from itk::SingleValuedNonLinearOptimizer | |
CostFunctionPointer | m_CostFunction {} |
Protected Attributes inherited from itk::Optimizer | |
ParametersType | m_CurrentPosition {} |
bool | m_ScalesInitialized { false } |
Protected Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount {} |
Command observer that will interact with the ITKVNL cost-function adaptor in order to generate iteration events. This will allow to overcome the limitation of VNL optimizers not offering callbacks for every iteration
Definition at line 57 of file itkSingleValuedNonLinearVnlOptimizer.h.
using itk::SingleValuedNonLinearVnlOptimizer::ConstPointer = SmartPointer<const Self> |
Definition at line 48 of file itkSingleValuedNonLinearVnlOptimizer.h.
|
protected |
Definition at line 121 of file itkSingleValuedNonLinearVnlOptimizer.h.
Definition at line 47 of file itkSingleValuedNonLinearVnlOptimizer.h.
Standard class type aliases.
Definition at line 45 of file itkSingleValuedNonLinearVnlOptimizer.h.
Definition at line 46 of file itkSingleValuedNonLinearVnlOptimizer.h.
|
protected |
|
overrideprotected |
|
inlinevirtual |
Returns true if derived optimizer supports using scales. For optimizers that do not support scaling, this default function is overridden to return false.
Reimplemented in itk::LBFGSBOptimizer.
Definition at line 112 of file itkSingleValuedNonLinearVnlOptimizer.h.
|
virtual |
Return Cached Values. These method have the advantage of not triggering a recomputation of the metric value, but it has the disadvantage of returning a value that may not be the one corresponding to the current parameters. For GUI update purposes, this method is a good option, for mathematical validation you should rather call GetValue().
|
virtual |
Return Cached Values. These method have the advantage of not triggering a recomputation of the metric value, but it has the disadvantage of returning a value that may not be the one corresponding to the current parameters. For GUI update purposes, this method is a good option, for mathematical validation you should rather call GetValue().
|
virtual |
Return Cached Values. These method have the advantage of not triggering a recomputation of the metric value, but it has the disadvantage of returning a value that may not be the one corresponding to the current parameters. For GUI update purposes, this method is a good option, for mathematical validation you should rather call GetValue().
|
protected |
|
protected |
|
virtual |
Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.
|
inline |
Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.
Definition at line 77 of file itkSingleValuedNonLinearVnlOptimizer.h.
|
overridevirtual |
Reimplemented from itk::SingleValuedNonLinearOptimizer.
|
protected |
The purpose of this method is to get around the lack of const-correctness in VNL cost-functions and optimizers
|
private |
Callback function for the Command Observer
|
virtual |
Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.
|
inline |
Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.
Definition at line 92 of file itkSingleValuedNonLinearVnlOptimizer.h.
|
inline |
Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.
Definition at line 87 of file itkSingleValuedNonLinearVnlOptimizer.h.
|
overrideprotectedvirtual |
Print out internal state
Reimplemented from itk::SingleValuedNonLinearOptimizer.
|
overridepure virtual |
Set the cost Function. This method has to be overloaded by derived classes because the CostFunctionAdaptor requires to know the number of parameters at construction time. This number of parameters is obtained at run-time from the itkCostFunction. As a consequence each derived optimizer should construct its own CostFunctionAdaptor when overloading this method
Implemented in itk::AmoebaOptimizer, itk::ConjugateGradientOptimizer, itk::LBFGSBOptimizer, and itk::LBFGSOptimizer.
|
protected |
|
virtual |
Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.
|
inline |
Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.
Definition at line 82 of file itkSingleValuedNonLinearVnlOptimizer.h.
|
mutableprivate |
Definition at line 152 of file itkSingleValuedNonLinearVnlOptimizer.h.
|
mutableprivate |
Definition at line 154 of file itkSingleValuedNonLinearVnlOptimizer.h.
|
mutableprivate |
Definition at line 153 of file itkSingleValuedNonLinearVnlOptimizer.h.
|
private |
Definition at line 150 of file itkSingleValuedNonLinearVnlOptimizer.h.
|
private |
Definition at line 146 of file itkSingleValuedNonLinearVnlOptimizer.h.
|
private |
Definition at line 148 of file itkSingleValuedNonLinearVnlOptimizer.h.