ITK  4.4.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 {
49 class ITK_EXPORT FRPROptimizer:
50  public PowellOptimizer
51 {
52 public:
58 
60 
62  itkNewMacro(Self);
63 
66 
70 
72  itkSetMacro(UseUnitLengthGradient, bool);
73  itkGetConstMacro(UseUnitLengthGradient, bool);
75 
77  void StartOptimization();
78 
80  void SetToFletchReeves();
81 
83  void SetToPolakRibiere();
84 
85 protected:
86  FRPROptimizer();
87  virtual ~FRPROptimizer();
88 
89  void PrintSelf(std::ostream & os, Indent indent) const;
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 {
109  PolakRibiere
110  } OptimizationType;
111 
113 
115 }; // end of class
116 } // end of namespace itk
117 
118 #endif
119