go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkScaledSingleValuedNonLinearOptimizer.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright UMC Utrecht and contributors
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 __ScaledSingleValuedNonLinearOptimizer_h
19 #define __ScaledSingleValuedNonLinearOptimizer_h
20 
21 #include "itkSingleValuedNonLinearOptimizer.h"
23 
24 namespace itk
25 {
64 {
65 public:
66 
71  typedef SmartPointer< const Self > ConstPointer;
72 
74  itkNewMacro( Self );
75 
79 
81  typedef Superclass::MeasureType MeasureType;
82  typedef Superclass::ParametersType ParametersType;
83  typedef Superclass::DerivativeType DerivativeType;
84  typedef Superclass::CostFunctionType CostFunctionType;
85 
86  typedef NonLinearOptimizer::ScalesType ScalesType;
89 
97  virtual void InitializeScales( void );
98 
100  virtual void SetCostFunction( CostFunctionType * costFunction );
101 
105  virtual void SetUseScales( bool arg );
106 
107  bool GetUseScales( void ) const;
108 
110  itkGetConstReferenceMacro( ScaledCurrentPosition, ParametersType );
111 
115  virtual const ParametersType & GetCurrentPosition( void ) const;
116 
118  itkGetConstObjectMacro( ScaledCostFunction, ScaledCostFunctionType );
119 
124  itkBooleanMacro( Maximize );
125  virtual void SetMaximize( bool _arg );
126 
127  itkGetConstMacro( Maximize, bool );
128 
129 protected:
130 
135 
137  void PrintSelf( std::ostream & os, Indent indent ) const;
138 
140  ParametersType m_ScaledCurrentPosition;
141  ScaledCostFunctionPointer m_ScaledCostFunction;
142 
144  virtual void SetScaledCurrentPosition( const ParametersType & parameters );
145 
157  virtual void SetCurrentPosition( const ParametersType & param );
158 
162  virtual MeasureType GetScaledValue(
163  const ParametersType & parameters ) const;
164 
169  virtual void GetScaledDerivative(
170  const ParametersType & parameters,
171  DerivativeType & derivative ) const;
172 
174  virtual void GetScaledValueAndDerivative(
175  const ParametersType & parameters,
176  MeasureType & value,
177  DerivativeType & derivative ) const;
178 
179 private:
180 
182  ScaledSingleValuedNonLinearOptimizer( const Self & ); // purposely not implemented
184  void operator=( const Self & ); // purposely not implemented
185 
190  mutable ParametersType m_UnscaledCurrentPosition;
192 
193 };
194 
195 } // end namespace itk
196 
197 #endif //#ifndef __ScaledSingleValuedNonLinearOptimizer_h
virtual void SetCurrentPosition(const ParametersType &param)
virtual void GetScaledValueAndDerivative(const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
virtual void GetScaledDerivative(const ParametersType &parameters, DerivativeType &derivative) const
void PrintSelf(std::ostream &os, Indent indent) const
virtual const ParametersType & GetCurrentPosition(void) const
A cost function that applies a scaling to another cost function.
virtual MeasureType GetScaledValue(const ParametersType &parameters) const
virtual void SetScaledCurrentPosition(const ParametersType &parameters)
virtual void SetCostFunction(CostFunctionType *costFunction)


Generated on 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo