18 #ifndef itkPowellOptimizerv4_h 19 #define itkPowellOptimizerv4_h 58 template<
typename TInternalComputationValueType>
80 itkSetMacro(MaximumIteration,
unsigned int);
81 itkGetConstReferenceMacro(MaximumIteration,
unsigned int);
85 itkSetMacro(MaximumLineIteration,
unsigned int);
86 itkGetConstMacro(MaximumLineIteration,
unsigned int);
91 itkSetMacro(StepLength,
double);
92 itkGetConstReferenceMacro(StepLength,
double);
97 itkSetMacro(StepTolerance,
double);
98 itkGetConstReferenceMacro(StepTolerance,
double);
104 itkSetMacro(ValueTolerance,
double);
105 itkGetConstReferenceMacro(ValueTolerance,
double);
109 itkGetConstReferenceMacro(CurrentCost, MeasureType);
114 itkGetConstReferenceMacro(CurrentLineIteration,
unsigned int);
125 itkGetConstReferenceMacro(CatchGetValueException,
bool);
126 itkSetMacro(CatchGetValueException,
bool);
128 itkGetConstReferenceMacro(MetricWorstPossibleValue,
double);
129 itkSetMacro(MetricWorstPossibleValue,
double);
137 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
139 itkSetMacro(CurrentCost,
double);
143 void SetLine(
const ParametersType & origin,
144 const vnl_vector< double > & direction);
151 double GetLineValue(
double x, ParametersType & tempCoord)
const;
159 void Swap(
double *a,
double *b)
const;
163 void Shift(
double *a,
double *b,
double *c,
double d)
const;
174 virtual void LineBracket(
double *ax,
double *bx,
double *cx,
175 double *fa,
double *fb,
double *fc);
177 virtual void LineBracket(
double *ax,
double *bx,
double *cx,
178 double *fa,
double *fb,
double *fc,
179 ParametersType & tempCoord);
187 double fa,
double fb,
double fc,
188 double *extX,
double *extVal);
191 double fa,
double fb,
double fc,
192 double *extX,
double *extVal,
193 ParametersType & tempCoord);
195 itkGetMacro(SpaceDimension,
unsigned int);
205 itkSetMacro(CurrentIteration,
unsigned int);
207 itkGetMacro(Stop,
bool);
208 itkSetMacro(Stop,
bool);
247 #ifndef ITK_MANUAL_INSTANTIATION 248 #include "itkPowellOptimizerv4.hxx" OptimizerParameters< TInternalComputationValueType > ScalesType
double GetLineValue(double x) const
virtual const MeasureType & GetCurrentCost() const
OptimizerParameters< TInternalComputationValueType > ParametersType
virtual const MeasureType & GetValue() const override
Implements Powell optimization using Brent line search.
SmartPointer< Self > Pointer
SmartPointer< const Self > ConstPointer
bool m_CatchGetValueException
MetricType::MeasureType MeasureType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
Superclass::MeasureType MeasureType
void SetLine(const ParametersType &origin, const vnl_vector< double > &direction)
virtual void LineBracket(double *ax, double *bx, double *cx, double *fa, double *fb, double *fc)
vnl_vector< double > m_LineDirection
MeasureType m_CurrentCost
ObjectToObjectOptimizerBaseTemplate< TInternalComputationValueType > Superclass
virtual void StartOptimization(bool doOnlyInitialization=false) override
virtual void PrintSelf(std::ostream &os, Indent indent) const override
void SetSpaceDimension(unsigned int dim)
double m_MetricWorstPossibleValue
Superclass::ScalesType ScalesType
std::ostringstream m_StopConditionDescription
void Shift(double *a, double *b, double *c, double d) const
unsigned int m_SpaceDimension
void SetCurrentLinePoint(double x, double fx)
virtual void Modified() const
unsigned int m_MaximumLineIteration
ParametersType m_CurrentPosition
ParametersType m_LineOrigin
Control indentation during Print() invocation.
virtual ~PowellOptimizerv4()
void Swap(double *a, double *b) const
virtual void BracketedLineOptimize(double ax, double bx, double cx, double fa, double fb, double fc, double *extX, double *extVal)
Abstract base for object-to-object optimizers.
unsigned int m_MaximumIteration
virtual const std::string GetStopConditionDescription() const override
Superclass::ParametersType ParametersType
unsigned int m_CurrentLineIteration