go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxConjugateGradient.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 __elxConjugateGradient_h
19#define __elxConjugateGradient_h
20
21#include "elxIncludes.h" // include first to avoid MSVS warning
24
25namespace elastix
26{
27
90template< class TElastix >
92 public
94 public
95 OptimizerBase< TElastix >
96{
97public:
98
103 typedef itk::SmartPointer< Self > Pointer;
104 typedef itk::SmartPointer< const Self > ConstPointer;
105
107 itkNewMacro( Self );
108
111
116 elxClassNameMacro( "ConjugateGradient" );
117
120 typedef Superclass1::CostFunctionPointer CostFunctionPointer;
125
134
138 typedef itk::ReceptorMemberCommand< Self > EventPassThroughType;
139 typedef typename EventPassThroughType::Pointer EventPassThroughPointer;
140
143 void StartOptimization( void ) override;
144
147 void BeforeRegistration( void ) override;
148
149 void BeforeEachResolution( void ) override;
150
151 void AfterEachResolution( void ) override;
152
153 void AfterEachIteration( void ) override;
154
155 void AfterRegistration( void ) override;
156
157 itkGetConstMacro( StartLineSearch, bool );
158
159protected:
160
162 ~ConjugateGradient() override {}
163
165
167 virtual std::string GetLineSearchStopCondition( void ) const;
168
171 virtual std::string DeterminePhase( void ) const;
172
176 bool TestConvergence( bool firstLineSearchDone ) override;
177
183 const ParametersType searchDir,
184 double & step,
185 ParametersType & x,
186 MeasureType & f,
187 DerivativeType & g ) override;
188
189private:
190
191 ConjugateGradient( const Self & ); // purposely not implemented
192 void operator=( const Self & ); // purposely not implemented
193
194 void InvokeIterationEvent( const itk::EventObject & event );
195
202
203};
204
205} // end namespace elastix
206
207#ifndef ITK_MANUAL_INSTANTIATION
208#include "elxConjugateGradient.hxx"
209#endif
210
211#endif // end #ifndef __elxConjugateGradient_h
A class that deals with user given parameters and command line arguments.
An optimizer based on the itk::GenericConjugateGradientOptimizer.
virtual std::string GetLineSearchStopCondition(void) const
void operator=(const Self &)
elxClassNameMacro("ConjugateGradient")
Superclass2::ConfigurationType ConfigurationType
EventPassThroughType::Pointer EventPassThroughPointer
EventPassThroughPointer m_EventPasser
void AfterEachResolution(void) override
itk::SmartPointer< const Self > ConstPointer
void AfterRegistration(void) override
Superclass1::ScalesType ScalesType
GenericConjugateGradientOptimizer Superclass1
Superclass2::RegistrationPointer RegistrationPointer
void BeforeRegistration(void) override
bool TestConvergence(bool firstLineSearchDone) override
Superclass1::ParametersType ParametersType
itk::SmartPointer< Self > Pointer
void StartOptimization(void) override
void AfterEachIteration(void) override
Superclass2::ITKBaseType ITKBaseType
Superclass2::ElastixPointer ElastixPointer
Superclass2::ElastixType ElastixType
Superclass1::DerivativeType DerivativeType
void BeforeEachResolution(void) override
Superclass1::CostFunctionPointer CostFunctionPointer
ConjugateGradient(const Self &)
itk::ReceptorMemberCommand< Self > EventPassThroughType
virtual std::string DeterminePhase(void) const
void LineSearch(const ParametersType searchDir, double &step, ParametersType &x, MeasureType &f, DerivativeType &g) override
Superclass2::ConfigurationPointer ConfigurationPointer
LineOptimizerType::Pointer LineOptimizerPointer
LineOptimizerPointer m_LineOptimizer
OptimizerBase< TElastix > Superclass2
Superclass2::RegistrationType RegistrationType
Superclass1::CostFunctionType CostFunctionType
itk::MoreThuenteLineSearchOptimizer LineOptimizerType
void InvokeIterationEvent(const itk::EventObject &event)
Superclass1::StopConditionType StopConditionType
This class is the elastix base class for all Optimizers.
Superclass::ConfigurationPointer ConfigurationPointer
itk::Optimizer ITKBaseType
Superclass::ElastixType ElastixType
Superclass::ElastixPointer ElastixPointer
Superclass::RegistrationPointer RegistrationPointer
Superclass::RegistrationType RegistrationType
ITK version of the MoreThuente line search algorithm.


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo