ITK  4.8.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 #include "ITKOptimizersExport.h"
23 
24 namespace itk
25 {
50 class ITKOptimizers_EXPORT FRPROptimizer:
51  public PowellOptimizer
52 {
53 public:
59 
61 
63  itkNewMacro(Self);
64 
67 
71 
73  itkSetMacro(UseUnitLengthGradient, bool);
74  itkGetConstMacro(UseUnitLengthGradient, bool);
76 
78  virtual void StartOptimization() ITK_OVERRIDE;
79 
81  void SetToFletchReeves();
82 
84  void SetToPolakRibiere();
85 
86 protected:
87  FRPROptimizer();
88  virtual ~FRPROptimizer();
89 
90  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
91 
95  virtual void GetValueAndDerivative(ParametersType & p, double *val,
96  ParametersType *xi);
97 
98  virtual void LineOptimize(ParametersType *p, ParametersType & xi,
99  double *val);
100 
101  virtual void LineOptimize(ParametersType *p, ParametersType & xi,
102  double *val,
103  ParametersType & tempCoord);
104 
105 private:
106  FRPROptimizer(const FRPROptimizer &); // not implemented
107 
108  typedef enum {
110  PolakRibiere
111  } OptimizationType;
112 
114 
116 }; // end of class
117 } // end of namespace itk
118 
119 #endif
This class is a base for the CostFunctions returning a single value.
Light weight base class for most itk classes.
SingleValuedCostFunction CostFunctionType
SingleValuedNonLinearOptimizer::ParametersType ParametersType
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
SmartPointer< Self > Pointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
OptimizationType m_OptimizationType
PowellOptimizer Superclass
FRPROptimizer Self