itkFRPROptimizer.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkFRPROptimizer_h
00018 #define __itkFRPROptimizer_h
00019
00020 #include <itkVector.h>
00021 #include <itkMatrix.h>
00022 #include <itkPowellOptimizer.h>
00023
00024 namespace itk
00025 {
00026
00050 class ITK_EXPORT FRPROptimizer:
00051 public PowellOptimizer
00052 {
00053 public:
00055 typedef FRPROptimizer Self;
00056 typedef PowellOptimizer Superclass;
00057 typedef SmartPointer<Self> Pointer;
00058 typedef SmartPointer<const Self> ConstPointer;
00059
00060 typedef SingleValuedNonLinearOptimizer::ParametersType ParametersType;
00061
00063 itkNewMacro(Self);
00064
00066 itkTypeMacro(FRPROptimizer, PowellOptimizer );
00067
00069 typedef SingleValuedCostFunction CostFunctionType;
00070 typedef CostFunctionType::Pointer CostFunctionPointer;
00071
00073 itkSetMacro( UseUnitLengthGradient, bool );
00074 itkGetConstMacro( UseUnitLengthGradient, bool );
00076
00078 void StartOptimization();
00079
00081 void SetToFletchReeves();
00082
00084 void SetToPolakRibiere();
00085
00086 protected:
00087 FRPROptimizer();
00088 virtual ~FRPROptimizer();
00089
00090 void PrintSelf(std::ostream& os, Indent indent) const;
00091
00095 virtual void GetValueAndDerivative(ParametersType & p, double * val,
00096 ParametersType * xi);
00097
00098 virtual void LineOptimize(ParametersType * p, ParametersType & xi,
00099 double * val );
00100 virtual void LineOptimize(ParametersType * p, ParametersType & xi,
00101 double * val,
00102 ParametersType & tempCoord );
00103
00104
00105 private:
00106 FRPROptimizer(const FRPROptimizer&);
00107
00108 typedef enum
00109 {
00110 FletchReeves,
00111 PolakRibiere
00112 } OptimizationType;
00113
00114 OptimizationType m_OptimizationType;
00115
00116 bool m_UseUnitLengthGradient;
00117
00118 };
00119
00120 }
00121
00122 #endif
00123