Home
|
Main Page
|
Modules
|
Namespace List
|
Class Hierarchy
|
Alphabetical List
|
Data Structures
|
File List
|
Namespace Members
|
Data Fields
|
Globals
|
Related Pages
src
Common
itkScaledSingleValuedNonLinearOptimizer.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 __ScaledSingleValuedNonLinearOptimizer_h
16
#define __ScaledSingleValuedNonLinearOptimizer_h
17
18
#include "itkSingleValuedNonLinearOptimizer.h"
19
#include "
itkScaledSingleValuedCostFunction.h
"
20
21
namespace
itk
22
{
59
class
ScaledSingleValuedNonLinearOptimizer
:
60
public
SingleValuedNonLinearOptimizer
61
{
62
public
:
63
65
typedef
ScaledSingleValuedNonLinearOptimizer
Self
;
66
typedef
SingleValuedNonLinearOptimizer
Superclass
;
67
typedef
SmartPointer<Self>
Pointer
;
68
typedef
SmartPointer<const Self>
ConstPointer
;
69
71
itkNewMacro(
Self
);
72
74
itkTypeMacro(
ScaledSingleValuedNonLinearOptimizer
,
75
SingleValuedNonLinearOptimizer
);
76
78
typedef
Superclass::MeasureType
MeasureType
;
79
typedef
Superclass::ParametersType
ParametersType
;
80
typedef
Superclass::DerivativeType
DerivativeType
;
81
typedef
Superclass::CostFunctionType
CostFunctionType
;
82
83
typedef
NonLinearOptimizer::ScalesType
ScalesType
;
84
typedef
ScaledSingleValuedCostFunction
ScaledCostFunctionType
;
85
typedef
ScaledCostFunctionType::Pointer
ScaledCostFunctionPointer
;
86
94
virtual
void
InitializeScales
(
void
);
95
97
virtual
void
SetCostFunction
(
CostFunctionType
*costFunction);
98
102
virtual
void
SetUseScales
(
bool
arg );
103
bool
GetUseScales
(
void
)
const
;
104
106
itkGetConstReferenceMacro( ScaledCurrentPosition,
ParametersType
);
107
111
virtual
const
ParametersType
&
GetCurrentPosition
(
void
)
const
;
112
114
itkGetConstObjectMacro( ScaledCostFunction,
ScaledCostFunctionType
);
115
120
itkBooleanMacro( Maximize );
121
virtual
void
SetMaximize
(
bool
_arg );
122
itkGetConstMacro( Maximize,
bool
);
123
124
protected
:
125
127
ScaledSingleValuedNonLinearOptimizer
();
129
virtual
~ScaledSingleValuedNonLinearOptimizer
() {};
130
132
void
PrintSelf
( std::ostream & os, Indent indent )
const
;
133
135
ParametersType
m_ScaledCurrentPosition
;
136
ScaledCostFunctionPointer
m_ScaledCostFunction
;
137
139
virtual
void
SetScaledCurrentPosition
(
const
ParametersType
& parameters );
140
152
virtual
void
SetCurrentPosition
(
const
ParametersType
¶m );
153
157
virtual
MeasureType
GetScaledValue
(
158
const
ParametersType
& parameters )
const
;
159
164
virtual
void
GetScaledDerivative
(
165
const
ParametersType
& parameters,
166
DerivativeType
& derivative )
const
;
167
169
virtual
void
GetScaledValueAndDerivative
(
170
const
ParametersType
& parameters,
171
MeasureType
& value,
172
DerivativeType
& derivative )
const
;
173
174
private
:
175
177
ScaledSingleValuedNonLinearOptimizer
(
const
Self
& );
// purposely not implemented
179
void
operator=
(
const
Self
& );
// purposely not implemented
180
185
mutable
ParametersType
m_UnscaledCurrentPosition
;
186
bool
m_Maximize
;
187
188
};
// end class ScaledSingleValuedNonLinearOptimizer
189
190
191
}
// end namespace itk
192
193
#endif //#ifndef __ScaledSingleValuedNonLinearOptimizer_h
194
Generated on 27-06-2013 for elastix by
1.8.3.1