![]() |
Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages |
#include <elxConjugateGradientFRPR.h>
The ConjugateGradientFRPR class.
This component is based on the itkFRPROptimizer. This is a Fletcher-Reeves conjugate gradient optimizer, in combination with an exact (dBrent) line search, based on the description in Numerical Recipes in C++
This optimizer support the NewSamplesEveryIteration option. It requests new samples upon every derivative evaluation, but actually this makes no sense for a conjugate gradient optimizer. So, think twice before using it.
(Optimizer "ConjugateGradientFRPR")
(MaximumNumberOfIterations 100 100 50)
(MaximumNumberOfIterations 10 10 5)
(StepLength 2.0 1.0 0.5)
(ValueTolerance 0.001 0.00001 0.000001)
(LineSearchStepTolerance 0.001 0.00001 0.000001)
Definition at line 73 of file elxConjugateGradientFRPR.h.
typedef Superclass2::ConfigurationPointer elastix::ConjugateGradientFRPR< TElastix >::ConfigurationPointer |
Reimplemented from elastix::OptimizerBase< TElastix >.
Definition at line 109 of file elxConjugateGradientFRPR.h.
typedef Superclass2::ConfigurationType elastix::ConjugateGradientFRPR< TElastix >::ConfigurationType |
Reimplemented from elastix::OptimizerBase< TElastix >.
Definition at line 108 of file elxConjugateGradientFRPR.h.
typedef SmartPointer<const Self> elastix::ConjugateGradientFRPR< TElastix >::ConstPointer |
Definition at line 86 of file elxConjugateGradientFRPR.h.
typedef Superclass1::CostFunctionPointer elastix::ConjugateGradientFRPR< TElastix >::CostFunctionPointer |
Definition at line 99 of file elxConjugateGradientFRPR.h.
typedef Superclass1::CostFunctionType elastix::ConjugateGradientFRPR< TElastix >::CostFunctionType |
Typedef's inherited from Superclass1.
Definition at line 98 of file elxConjugateGradientFRPR.h.
typedef SingleValuedNonLinearOptimizer::DerivativeType elastix::ConjugateGradientFRPR< TElastix >::DerivativeType |
Definition at line 103 of file elxConjugateGradientFRPR.h.
typedef Superclass2::ElastixPointer elastix::ConjugateGradientFRPR< TElastix >::ElastixPointer |
Reimplemented from elastix::OptimizerBase< TElastix >.
Definition at line 107 of file elxConjugateGradientFRPR.h.
typedef Superclass2::ElastixType elastix::ConjugateGradientFRPR< TElastix >::ElastixType |
Typedef's inherited from Elastix.
Reimplemented from elastix::OptimizerBase< TElastix >.
Definition at line 106 of file elxConjugateGradientFRPR.h.
typedef Superclass2::ITKBaseType elastix::ConjugateGradientFRPR< TElastix >::ITKBaseType |
Reimplemented from elastix::OptimizerBase< TElastix >.
Definition at line 112 of file elxConjugateGradientFRPR.h.
typedef Superclass1::ParametersType elastix::ConjugateGradientFRPR< TElastix >::ParametersType |
Reimplemented from elastix::OptimizerBase< TElastix >.
Definition at line 101 of file elxConjugateGradientFRPR.h.
typedef SmartPointer<Self> elastix::ConjugateGradientFRPR< TElastix >::Pointer |
Definition at line 85 of file elxConjugateGradientFRPR.h.
typedef Superclass2::RegistrationPointer elastix::ConjugateGradientFRPR< TElastix >::RegistrationPointer |
Reimplemented from elastix::OptimizerBase< TElastix >.
Definition at line 111 of file elxConjugateGradientFRPR.h.
typedef Superclass2::RegistrationType elastix::ConjugateGradientFRPR< TElastix >::RegistrationType |
Reimplemented from elastix::OptimizerBase< TElastix >.
Definition at line 110 of file elxConjugateGradientFRPR.h.
typedef ConjugateGradientFRPR elastix::ConjugateGradientFRPR< TElastix >::Self |
Standard ITK.
Reimplemented from elastix::OptimizerBase< TElastix >.
Definition at line 82 of file elxConjugateGradientFRPR.h.
typedef FRPROptimizer elastix::ConjugateGradientFRPR< TElastix >::Superclass1 |
Definition at line 83 of file elxConjugateGradientFRPR.h.
typedef OptimizerBase<TElastix> elastix::ConjugateGradientFRPR< TElastix >::Superclass2 |
Definition at line 84 of file elxConjugateGradientFRPR.h.
elastix::ConjugateGradientFRPR< TElastix >::ConjugateGradientFRPR | ( | ) | [protected] |
virtual elastix::ConjugateGradientFRPR< TElastix >::~ConjugateGradientFRPR | ( | ) | [inline, protected, virtual] |
Definition at line 142 of file elxConjugateGradientFRPR.h.
elastix::ConjugateGradientFRPR< TElastix >::ConjugateGradientFRPR | ( | const Self & | ) | [private] |
virtual void elastix::ConjugateGradientFRPR< TElastix >::AfterEachIteration | ( | void | ) | [virtual] |
Reimplemented from elastix::BaseComponent.
virtual void elastix::ConjugateGradientFRPR< TElastix >::AfterEachResolution | ( | void | ) | [virtual] |
Reimplemented from elastix::BaseComponent.
virtual void elastix::ConjugateGradientFRPR< TElastix >::AfterRegistration | ( | void | ) | [virtual] |
Reimplemented from elastix::BaseComponent.
virtual void elastix::ConjugateGradientFRPR< TElastix >::BeforeEachResolution | ( | void | ) | [virtual] |
Reimplemented from elastix::BaseComponent.
virtual void elastix::ConjugateGradientFRPR< TElastix >::BeforeRegistration | ( | void | ) | [virtual] |
Methods to set parameters and print output at different stages in the registration process.
Reimplemented from elastix::BaseComponent.
virtual void elastix::ConjugateGradientFRPR< TElastix >::BracketedLineOptimize | ( | double | ax, |
double | bx, | ||
double | cx, | ||
double | fa, | ||
double | fb, | ||
double | fc, | ||
double * | extX, | ||
double * | extVal | ||
) | [protected, virtual] |
Given a bracketing triple of points and their function values, returns a bounded extreme. These values are in parameter space, along the current line and wrt the current origin set via SetLine. Optimization terminates based on MaximumIteration, StepTolerance, or ValueTolerance. Implemented as Brent line optimers from NRC.
This implementation sets the LineOptimizing flag to 'true', calls the the superclass's implementation, stores extX as the current step length, and sets the LineOptimizing flag to 'false' again.
const char* elastix::ConjugateGradientFRPR< TElastix >::DeterminePhase | ( | void | ) | const [private] |
elastix::ConjugateGradientFRPR< TElastix >::elxClassNameMacro | ( | "ConjugateGradientFRPR< TElastix >" | ) |
Name of this class.
virtual const char* elastix::ConjugateGradientFRPR< TElastix >::GetClassName | ( | ) | const [virtual] |
Run-time type information (and related methods).
Reimplemented from elastix::OptimizerBase< TElastix >.
virtual const double& elastix::ConjugateGradientFRPR< TElastix >::GetCurrentDerivativeMagnitude | ( | ) | [virtual] |
Return the magnitude of the cached derivative
virtual const double& elastix::ConjugateGradientFRPR< TElastix >::GetCurrentSearchDirectionMagnitude | ( | ) | [virtual] |
Get the magnitude of the line search direction
virtual const double& elastix::ConjugateGradientFRPR< TElastix >::GetCurrentStepLength | ( | ) | [virtual] |
Get the current gain
virtual bool elastix::ConjugateGradientFRPR< TElastix >::GetLineBracketing | ( | ) | const [virtual] |
virtual bool elastix::ConjugateGradientFRPR< TElastix >::GetLineOptimizing | ( | ) | const [virtual] |
Check if the optimizer is currently Bracketing the minimum, or is optimizing along a line
virtual void elastix::ConjugateGradientFRPR< TElastix >::GetValueAndDerivative | ( | ParametersType | p, |
double * | val, | ||
ParametersType * | xi | ||
) | [protected, virtual] |
Get the value of the n-dimensional cost function at this scalar step distance along the current line direction from the current line origin. Line origin and distances are set via SetLine.
This implementation calls the Superclass' implementation and caches the computed derivative's magnitude. Besides, it invokes the SelectNewSamples method.
virtual void elastix::ConjugateGradientFRPR< TElastix >::LineBracket | ( | double * | ax, |
double * | bx, | ||
double * | cx, | ||
double * | fa, | ||
double * | fb, | ||
double * | fc | ||
) | [protected, virtual] |
The LineBracket routine from NRC. Uses current origin and line direction (from SetLine) to find a triple of points (ax, bx, cx) that bracket the extreme "near" the origin. Search first considers the point StepLength distance from ax. IMPORTANT: The value of ax and the value of the function at ax (i.e., fa), must both be provided to this function.
This implementation sets the LineBracketing flag to 'true', calls the superclass' implementation, stores bx as the current step length, invokes an iteration event, and sets the LineBracketing flag to 'false'
virtual void elastix::ConjugateGradientFRPR< TElastix >::LineOptimize | ( | ParametersType * | p, |
ParametersType | xi, | ||
double * | val | ||
) | [protected, virtual] |
store the line search direction's (xi) magnitude and call the superclass' implementation.
static Pointer elastix::ConjugateGradientFRPR< TElastix >::New | ( | ) | [static] |
Method for creation through the object factory.
void elastix::ConjugateGradientFRPR< TElastix >::operator= | ( | const Self & | ) | [private] |
virtual void elastix::ConjugateGradientFRPR< TElastix >::SetInitialPosition | ( | const ParametersType & | param | ) | [virtual] |
Override the SetInitialPosition.
virtual void elastix::ConjugateGradientFRPR< TElastix >::SetLineBracketing | ( | bool | _arg | ) | [protected, virtual] |
virtual void elastix::ConjugateGradientFRPR< TElastix >::SetLineOptimizing | ( | bool | _arg | ) | [protected, virtual] |
Set if the optimizer is currently bracketing the minimum, or is optimizing along a line
double elastix::ConjugateGradientFRPR< TElastix >::m_CurrentDerivativeMagnitude [protected] |
To store the latest computed derivative's magnitude
Definition at line 142 of file elxConjugateGradientFRPR.h.
double elastix::ConjugateGradientFRPR< TElastix >::m_CurrentSearchDirectionMagnitude [protected] |
Variable to store the line search direction magnitude
Definition at line 148 of file elxConjugateGradientFRPR.h.
double elastix::ConjugateGradientFRPR< TElastix >::m_CurrentStepLength [protected] |
the current gain
Definition at line 151 of file elxConjugateGradientFRPR.h.
bool elastix::ConjugateGradientFRPR< TElastix >::m_LineBracketing [private] |
Definition at line 208 of file elxConjugateGradientFRPR.h.
bool elastix::ConjugateGradientFRPR< TElastix >::m_LineOptimizing [private] |
Definition at line 207 of file elxConjugateGradientFRPR.h.
Generated on 11-05-2012 for elastix by ![]() |
![]() |