Home
|
Main Page
|
Modules
|
Namespace List
|
Class Hierarchy
|
Alphabetical List
|
Data Structures
|
File List
|
Namespace Members
|
Data Fields
|
Globals
|
Related Pages
src
Components
Optimizers
StandardGradientDescent
elxStandardGradientDescent.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 __elxStandardGradientDescent_h
16
#define __elxStandardGradientDescent_h
17
18
#include "
itkStandardGradientDescentOptimizer.h
"
19
#include "
elxIncludes.h
"
20
21
namespace
elastix
22
{
23
using namespace
itk;
24
25
66
template
<
class
TElastix>
67
class
StandardGradientDescent
:
68
public
69
itk::StandardGradientDescentOptimizer
,
70
public
71
OptimizerBase
<TElastix>
72
{
73
public
:
74
76
typedef
StandardGradientDescent
Self
;
77
typedef
StandardGradientDescentOptimizer
Superclass1
;
78
typedef
OptimizerBase<TElastix>
Superclass2
;
79
typedef
SmartPointer<Self>
Pointer
;
80
typedef
SmartPointer<const Self>
ConstPointer
;
81
83
itkNewMacro(
Self
);
84
86
itkTypeMacro(
StandardGradientDescent
,
StandardGradientDescentOptimizer
);
87
92
elxClassNameMacro
(
"StandardGradientDescent"
);
93
95
typedef
Superclass1::CostFunctionType
CostFunctionType
;
96
typedef
Superclass1::CostFunctionPointer
CostFunctionPointer
;
97
typedef
Superclass1::StopConditionType
StopConditionType
;
98
100
typedef
typename
Superclass2::ElastixType
ElastixType
;
101
typedef
typename
Superclass2::ElastixPointer
ElastixPointer
;
102
typedef
typename
Superclass2::ConfigurationType
ConfigurationType
;
103
typedef
typename
Superclass2::ConfigurationPointer
ConfigurationPointer
;
104
typedef
typename
Superclass2::RegistrationType
RegistrationType
;
105
typedef
typename
Superclass2::RegistrationPointer
RegistrationPointer
;
106
typedef
typename
Superclass2::ITKBaseType
ITKBaseType
;
107
109
typedef
typename
Superclass1::ParametersType
ParametersType
;
110
113
virtual
void
BeforeRegistration(
void
);
114
virtual
void
BeforeEachResolution(
void
);
115
virtual
void
AfterEachResolution(
void
);
116
virtual
void
AfterEachIteration(
void
);
117
virtual
void
AfterRegistration(
void
);
118
121
virtual
void
StartOptimization(
void
);
122
124
virtual
void
MetricErrorResponse( ExceptionObject & err );
125
129
virtual
void
SetCurrentPositionPublic(
const
ParametersType
¶m )
130
{
131
this->Superclass1::SetCurrentPosition( param );
132
}
133
135
itkSetMacro( MaximumNumberOfSamplingAttempts,
unsigned
long
);
136
138
itkGetConstReferenceMacro( MaximumNumberOfSamplingAttempts,
unsigned
long
);
139
140
protected
:
141
142
StandardGradientDescent
();
143
virtual
~StandardGradientDescent
() {};
144
145
146
private
:
147
148
StandardGradientDescent
(
const
Self& );
// purposely not implemented
149
void
operator=(
const
Self& );
// purposely not implemented
150
152
unsigned
long
m_MaximumNumberOfSamplingAttempts
;
153
unsigned
long
m_CurrentNumberOfSamplingAttempts
;
154
unsigned
long
m_PreviousErrorAtIteration
;
155
156
};
// end class StandardGradientDescent
157
158
159
}
// end namespace elastix
160
161
#ifndef ITK_MANUAL_INSTANTIATION
162
#include "elxStandardGradientDescent.hxx"
163
#endif
164
165
#endif // end #ifndef __elxStandardGradientDescent_h
Generated on 21-03-2014 for elastix by
1.8.1.2