go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkScaledSingleValuedCostFunction.h
Go to the documentation of this file.
1 /*======================================================================
2 
3  This file is part of the elastix software.
4 
5  Copyright (c) University Medical Center Utrecht. All rights reserved.
6  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7  details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 
15 #ifndef __itkScaledSingleValuedCostFunction_h
16 #define __itkScaledSingleValuedCostFunction_h
17 
18 #include "itkSingleValuedCostFunction.h"
19 
20 namespace itk
21 {
35  {
36  public:
37 
41  typedef SmartPointer<Self> Pointer;
42  typedef SmartPointer<const Self> ConstPointer;
43 
45  itkNewMacro( Self );
46 
49 
51  typedef Superclass::MeasureType MeasureType;
52  typedef Superclass::DerivativeType DerivativeType;
53  typedef Superclass::ParametersType ParametersType;
54  typedef Superclass::Pointer SingleValuedCostFunctionPointer;
55 
56  typedef Array<double> ScalesType;
57 
61  virtual MeasureType GetValue( const ParametersType & parameters ) const;
62 
67  virtual void GetDerivative(
68  const ParametersType & parameters,
69  DerivativeType & derivative ) const;
70 
72  virtual void GetValueAndDerivative(
73  const ParametersType & parameters,
74  MeasureType & value,
75  DerivativeType & derivative ) const;
76 
78  virtual unsigned int GetNumberOfParameters( void ) const;
79 
81  itkSetObjectMacro( UnscaledCostFunction, Superclass );
83  itkGetObjectMacro( UnscaledCostFunction, Superclass );
84 
87  virtual void SetScales( const ScalesType & scales );
88 
90  itkGetConstReferenceMacro( Scales, ScalesType );
91 
95  virtual void SetSquaredScales( const ScalesType & squaredScales );
96 
99  itkGetConstReferenceMacro( SquaredScales, ScalesType );
100 
102  itkSetMacro( UseScales, bool );
103 
105  itkGetConstMacro( UseScales, bool );
106 
108  itkBooleanMacro( NegateCostFunction );
109 
111  itkSetMacro( NegateCostFunction, bool );
113  itkGetConstMacro( NegateCostFunction, bool );
114 
116  virtual void ConvertScaledToUnscaledParameters( ParametersType & parameters ) const;
117 
119  virtual void ConvertUnscaledToScaledParameters( ParametersType & parameters ) const;
120 
121  protected:
122 
127 
129  void PrintSelf( std::ostream & os, Indent indent ) const;
130 
131  private:
132 
134  ScaledSingleValuedCostFunction( const Self& ); // purposely not implemented
136  void operator=( const Self& ); // purposely not implemented
137 
144 
145  }; // end class ScaledSingleValuedCostFunction
146 
147 } //end namespace itk
148 
149 
150 #endif // #ifndef __itkScaledSingleValuedCostFunction_h
151 


Generated on 21-03-2014 for elastix by doxygen 1.8.1.2 elastix logo