ITK
5.0.0
Insight Segmentation and Registration Toolkit
|
#include <itkLBFGSOptimizerBasev4.h>
Abstract base for vnl lbfgs algorithm optimizers in ITKv4 registration framework.
m_VnlOptimizer->get_failure_code()
. This seems to return "Failure" even when no error has occured. The same behavior is observed in the ITKv3 version of this optimizer.This code has been adapted for the ITKv4 registration framework from the v3 version, itkLBFGSOptimizer.
Definition at line 74 of file itkLBFGSOptimizerBasev4.h.
Public Member Functions | |
virtual double | GetGradientConvergenceTolerance () const |
virtual unsigned int | GetMaximumNumberOfFunctionEvaluations () const |
virtual const char * | GetNameOfClass () const |
InternalOptimizerType * | GetOptimizer () |
const StopConditionReturnStringType | GetStopConditionDescription () const override |
virtual bool | GetTrace () const |
virtual void | SetGradientConvergenceTolerance (double gtol) |
virtual void | SetMaximumNumberOfFunctionEvaluations (unsigned int n) |
void | SetMetric (MetricType *metric) override |
virtual void | SetTrace (bool flag) |
void | StartOptimization (bool doOnlyInitialization=false) override |
virtual void | TraceOff () |
virtual void | TraceOn () |
Public Member Functions inherited from itk::SingleValuedNonLinearVnlOptimizerv4 | |
void | StartOptimization (bool doOnlyInitialization=false) override |
virtual const DerivativeType & | GetCachedDerivative () const |
virtual const ParametersType & | GetCachedCurrentPosition () const |
Public Member Functions inherited from itk::ObjectToObjectOptimizerBaseTemplate< double > | |
virtual SizeValueType | GetCurrentIteration () const |
virtual const MeasureType & | GetCurrentMetricValue () const |
virtual const ParametersType & | GetCurrentPosition () const |
virtual SizeValueType | GetNumberOfIterations () const |
virtual const ThreadIdType & | GetNumberOfWorkUnits () const |
virtual const ScalesType & | GetScales () const |
virtual const bool & | GetScalesAreIdentity () const |
bool | GetScalesInitialized () const |
virtual const MeasureType & | GetValue () const |
virtual const ScalesType & | GetWeights () const |
virtual const bool & | GetWeightsAreIdentity () const |
virtual void | SetNumberOfIterations (SizeValueType _arg) |
virtual void | SetNumberOfWorkUnits (ThreadIdType number) |
virtual void | SetScalesEstimator (ScalesEstimatorType *_arg) |
virtual void | SetWeights (ScalesType _arg) |
virtual void | SetMetric (MetricType *_arg) |
virtual MetricType * | GetModifiableMetric () |
virtual const MetricType * | GetMetric () const |
virtual void | SetScales (const ScalesType &scales) |
virtual void | SetDoEstimateScales (bool _arg) |
virtual const bool & | GetDoEstimateScales () const |
virtual void | DoEstimateScalesOn () |
virtual void | DoEstimateScalesOff () |
Public Member Functions inherited from itk::Object | |
unsigned long | AddObserver (const EventObject &event, Command *) |
unsigned long | AddObserver (const EventObject &event, Command *) 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 |
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) |
void | SetDebug (bool debugFlag) const |
void | SetReferenceCount (int) override |
void | UnRegister () const noexceptoverride |
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 | |
virtual void | Delete () |
virtual int | GetReferenceCount () const |
itkCloneMacro (Self) | |
void | Print (std::ostream &os, Indent indent=0) const |
Protected Types | |
using | CostFunctionAdaptorType = Superclass::CostFunctionAdaptorType |
using | InternalOptimizerAutoPointer = std::unique_ptr< InternalOptimizerType > |
Protected Types inherited from itk::SingleValuedNonLinearVnlOptimizerv4 | |
using | CostFunctionAdaptorType = SingleValuedVnlCostFunctionAdaptorv4 |
Protected Member Functions | |
LBFGSOptimizerBasev4 () | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~LBFGSOptimizerBasev4 () override=default | |
Protected Member Functions inherited from itk::SingleValuedNonLinearVnlOptimizerv4 | |
const CostFunctionAdaptorType * | GetCostFunctionAdaptor () const |
CostFunctionAdaptorType * | GetCostFunctionAdaptor () |
CostFunctionAdaptorType * | GetNonConstCostFunctionAdaptor () const |
void | PrintSelf (std::ostream &os, Indent indent) const override |
void | SetCostFunctionAdaptor (CostFunctionAdaptorType *adaptor) |
SingleValuedNonLinearVnlOptimizerv4 () | |
~SingleValuedNonLinearVnlOptimizerv4 () override | |
Protected Member Functions inherited from itk::ObjectToObjectOptimizerBaseTemplate< double > | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
ObjectToObjectOptimizerBaseTemplate () | |
~ObjectToObjectOptimizerBaseTemplate () override | |
Protected Member Functions inherited from itk::Object | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
virtual void | SetTimeStamp (const TimeStamp &time) |
~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 | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Protected Attributes | |
double | m_CostFunctionConvergenceFactor {1e+7} |
double | m_GradientConvergenceTolerance {1e-5} |
double | m_InfinityNormOfProjectedGradient {0.0} |
unsigned int | m_MaximumNumberOfFunctionEvaluations {2000} |
bool | m_OptimizerInitialized {false} |
std::ostringstream | m_StopConditionDescription |
bool | m_Trace {false} |
InternalOptimizerAutoPointer | m_VnlOptimizer |
Protected Attributes inherited from itk::ObjectToObjectOptimizerBaseTemplate< double > | |
SizeValueType | m_CurrentIteration |
MeasureType | m_CurrentMetricValue |
bool | m_DoEstimateScales |
MetricTypePointer | m_Metric |
SizeValueType | m_NumberOfIterations |
ThreadIdType | m_NumberOfWorkUnits |
ScalesType | m_Scales |
bool | m_ScalesAreIdentity |
ScalesEstimatorType::Pointer | m_ScalesEstimator |
ScalesType | m_Weights |
bool | m_WeightsAreIdentity |
Protected Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount |
Friends | |
class | LBFGSBOptimizerHelperv4 |
class | LBFGSOptimizerBaseHelperv4< TInternalVnlOptimizerType > |
Additional Inherited Members | |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool flag) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
using itk::LBFGSOptimizerBasev4< TInternalVnlOptimizerType >::ConstPointer = SmartPointer< const Self > |
Definition at line 84 of file itkLBFGSOptimizerBasev4.h.
|
protected |
Definition at line 141 of file itkLBFGSOptimizerBasev4.h.
|
protected |
Definition at line 145 of file itkLBFGSOptimizerBasev4.h.
using itk::LBFGSOptimizerBasev4< TInternalVnlOptimizerType >::InternalOptimizerType = LBFGSOptimizerBaseHelperv4<TInternalVnlOptimizerType> |
The vnl optimizer
Definition at line 100 of file itkLBFGSOptimizerBasev4.h.
using itk::LBFGSOptimizerBasev4< TInternalVnlOptimizerType >::MetricType = Superclass::MetricType |
Definition at line 89 of file itkLBFGSOptimizerBasev4.h.
using itk::LBFGSOptimizerBasev4< TInternalVnlOptimizerType >::ParametersType = Superclass::ParametersType |
Definition at line 90 of file itkLBFGSOptimizerBasev4.h.
using itk::LBFGSOptimizerBasev4< TInternalVnlOptimizerType >::Pointer = SmartPointer< Self > |
Definition at line 83 of file itkLBFGSOptimizerBasev4.h.
using itk::LBFGSOptimizerBasev4< TInternalVnlOptimizerType >::ScalesType = Superclass::ScalesType |
Definition at line 91 of file itkLBFGSOptimizerBasev4.h.
using itk::LBFGSOptimizerBasev4< TInternalVnlOptimizerType >::Self = LBFGSOptimizerBasev4 |
Standard "Self" type alias.
Definition at line 81 of file itkLBFGSOptimizerBasev4.h.
using itk::LBFGSOptimizerBasev4< TInternalVnlOptimizerType >::StopConditionDescriptionType = Superclass::StopConditionDescriptionType |
Stop condition internal string type
Definition at line 97 of file itkLBFGSOptimizerBasev4.h.
using itk::LBFGSOptimizerBasev4< TInternalVnlOptimizerType >::StopConditionReturnStringType = Superclass::StopConditionReturnStringType |
Stop condition return string type
Definition at line 94 of file itkLBFGSOptimizerBasev4.h.
using itk::LBFGSOptimizerBasev4< TInternalVnlOptimizerType >::Superclass = SingleValuedNonLinearVnlOptimizerv4 |
Definition at line 82 of file itkLBFGSOptimizerBasev4.h.
|
protected |
|
overrideprotecteddefault |
|
virtual |
|
virtual |
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::SingleValuedNonLinearVnlOptimizerv4.
Reimplemented in itk::LBFGSOptimizerv4, and itk::LBFGSBOptimizerv4.
InternalOptimizerType* itk::LBFGSOptimizerBasev4< TInternalVnlOptimizerType >::GetOptimizer | ( | ) |
Method for getting access to the internal optimizer.
|
overridevirtual |
Get the reason for termination
Implements itk::SingleValuedNonLinearVnlOptimizerv4.
|
virtual |
|
overrideprotectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::Object.
|
virtual |
Set/Get the gradient convergence tolerance. This is a positive real number that determines the accuracy with which the solution is to be found. The optimization terminates when: ||G|| < gtol max(1,||X||) where ||.|| denotes the Euclidean norm.
|
virtual |
Set/Get the maximum number of function evaluations allowed.
|
overridevirtual |
Plug in a Cost Function into the optimizer
Implements itk::SingleValuedNonLinearVnlOptimizerv4.
|
virtual |
Set/Get the optimizer trace flag. If set to true, the optimizer prints out information every iteration.
|
overridevirtual |
Start optimization with an initial value.
Reimplemented from itk::ObjectToObjectOptimizerBaseTemplate< double >.
|
virtual |
|
virtual |
|
friend |
Definition at line 159 of file itkLBFGSOptimizerBasev4.h.
|
friend |
Definition at line 158 of file itkLBFGSOptimizerBasev4.h.
|
protected |
Definition at line 154 of file itkLBFGSOptimizerBasev4.h.
|
protected |
Definition at line 152 of file itkLBFGSOptimizerBasev4.h.
|
protected |
Definition at line 153 of file itkLBFGSOptimizerBasev4.h.
|
protected |
Definition at line 151 of file itkLBFGSOptimizerBasev4.h.
|
protected |
Definition at line 143 of file itkLBFGSOptimizerBasev4.h.
|
mutableprotected |
Definition at line 148 of file itkLBFGSOptimizerBasev4.h.
|
protected |
Definition at line 150 of file itkLBFGSOptimizerBasev4.h.
|
protected |
Definition at line 146 of file itkLBFGSOptimizerBasev4.h.