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 
70  typedef SmartPointer< Self > Pointer;
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  void SetCostFunction( CostFunctionType * costFunction ) override;
101 
105  virtual void SetUseScales( bool arg );
106 
107  bool GetUseScales( void ) const;
108 
110  itkGetConstReferenceMacro( ScaledCurrentPosition, ParametersType );
111 
115  const ParametersType & GetCurrentPosition( void ) const override;
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 override;
138 
142 
144  virtual void SetScaledCurrentPosition( const ParametersType & parameters );
145 
157  void SetCurrentPosition( const ParametersType & param ) override;
158 
163  const ParametersType & parameters ) const;
164 
169  virtual void GetScaledDerivative(
170  const ParametersType & parameters,
171  DerivativeType & derivative ) const;
172 
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 
192 
193 };
194 
195 } // end namespace itk
196 
197 #endif //#ifndef __ScaledSingleValuedNonLinearOptimizer_h
A cost function that applies a scaling to another cost function.
virtual void GetScaledDerivative(const ParametersType &parameters, DerivativeType &derivative) const
const ParametersType & GetCurrentPosition(void) const override
virtual void GetScaledValueAndDerivative(const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
void SetCostFunction(CostFunctionType *costFunction) override
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void SetScaledCurrentPosition(const ParametersType &parameters)
virtual MeasureType GetScaledValue(const ParametersType &parameters) const
void SetCurrentPosition(const ParametersType &param) override


Generated on 1667476801 for elastix by doxygen 1.9.1 elastix logo