ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkFRPROptimizer.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkFRPROptimizer_h
19 #define __itkFRPROptimizer_h
20 
21 #include "itkPowellOptimizer.h"
22 
23 namespace itk
24 {
50  public PowellOptimizer
51 {
52 public:
58 
60 
62  itkNewMacro(Self);
63 
66 
70 
72  itkSetMacro(UseUnitLengthGradient, bool);
73  itkGetConstMacro(UseUnitLengthGradient, bool);
75 
77  virtual void StartOptimization() ITK_OVERRIDE;
78 
80  void SetToFletchReeves();
81 
83  void SetToPolakRibiere();
84 
85 protected:
86  FRPROptimizer();
87  virtual ~FRPROptimizer();
88 
89  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
90 
94  virtual void GetValueAndDerivative(ParametersType & p, double *val,
95  ParametersType *xi);
96 
97  virtual void LineOptimize(ParametersType *p, ParametersType & xi,
98  double *val);
99 
100  virtual void LineOptimize(ParametersType *p, ParametersType & xi,
101  double *val,
102  ParametersType & tempCoord);
103 
104 private:
105  FRPROptimizer(const FRPROptimizer &); // not implemented
106 
107  typedef enum {
111 
113 
115 }; // end of class
116 } // end of namespace itk
117 
118 #endif
This class is a base for the CostFunctions returning a single value.
Light weight base class for most itk classes.
SingleValuedCostFunction CostFunctionType
virtual void GetValueAndDerivative(ParametersType &p, double *val, ParametersType *xi)
SingleValuedNonLinearOptimizer::ParametersType ParametersType
virtual void StartOptimization() ITK_OVERRIDE
Implements Powell optimization using Brent line search.
SmartPointer< const Self > ConstPointer
Implements Fletch-Reeves &amp; Polak-Ribiere optimization using dBrent line search.
CostFunctionType::Pointer CostFunctionPointer
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
SmartPointer< Self > Pointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
OptimizationType m_OptimizationType
PowellOptimizer Superclass
virtual void LineOptimize(ParametersType *p, ParametersType &xi, double *val)
FRPROptimizer Self