ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkMultiGradientOptimizerv4.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 itkMultiGradientOptimizerv4_h
19 #define itkMultiGradientOptimizerv4_h
20 
23 
24 namespace itk
25 {
45 template<typename TInternalComputationValueType>
47 : public GradientDescentOptimizerv4Template<TInternalComputationValueType>
48 {
49 public:
55 
58 
60  itkNewMacro(Self);
61 
67  typedef std::vector< LocalOptimizerPointer > OptimizersListType;
68  typedef typename OptimizersListType::size_type OptimizersListSizeType;
69 
71 
74 
77 
79  typedef TInternalComputationValueType InternalComputationValueType;
80 
83  typedef typename MetricType::Pointer MetricTypePointer;
84 
86  typedef typename MetricType::DerivativeType DerivativeType;
87 
90  typedef std::vector< MeasureType > MetricValuesListType;
91 
93  virtual const StopConditionType & GetStopCondition() const ITK_OVERRIDE
94  {
95  return this->m_StopCondition;
96  }
97 
99  virtual void StartOptimization( bool doOnlyInitialization = false ) ITK_OVERRIDE;
100 
103  virtual void StopOptimization(void) ITK_OVERRIDE;
104 
107  virtual void ResumeOptimization() ITK_OVERRIDE;
108 
110  virtual const StopConditionReturnStringType GetStopConditionDescription() const ITK_OVERRIDE;
111 
114 
117 
120 
121  protected:
122 
125  virtual ~MultiGradientOptimizerv4Template();
127 
128  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
129 
130  /* Common variables for optimization control and reporting */
131  bool m_Stop;
138 
139  private:
140  MultiGradientOptimizerv4Template( const Self & ); //purposely not implemented
141  void operator=( const Self& ); //purposely not implemented
142 
143 };
144 
146 typedef MultiGradientOptimizerv4Template<double> MultiGradientOptimizerv4;
147 
148 } // end namespace itk
149 
150 #ifndef ITK_MANUAL_INSTANTIATION
151 #include "itkMultiGradientOptimizerv4.hxx"
152 #endif
153 
154 #endif
Multiple gradient-based optimizers are combined in order to perform a multi-objective optimization...
Light weight base class for most itk classes.
virtual const StopConditionType & GetStopCondition() const override
Superclass::StopConditionDescriptionType StopConditionDescriptionType
itk::GradientDescentOptimizerv4Template< TInternalComputationValueType > LocalOptimizerType
OptimizersListType::size_type OptimizersListSizeType
Superclass::StopConditionReturnStringType StopConditionReturnStringType
itk::GradientDescentOptimizerv4Template< TInternalComputationValueType >::Pointer LocalOptimizerPointer
ObjectToObjectOptimizerBaseTemplate< TInternalComputationValueType > OptimizerType
const MetricValuesListType & GetMetricValuesList() const
void SetOptimizersList(OptimizersListType &p)
GradientDescentOptimizerv4Template< TInternalComputationValueType > Superclass
Superclass::StopConditionDescriptionType StopConditionDescriptionType
virtual void PrintSelf(std::ostream &os, Indent indent) const override
virtual void ResumeOptimization() override
Superclass::StopConditionType StopConditionType
TInternalComputationValueType InternalComputationValueType
virtual void StopOptimization(void) override
StopConditionDescriptionType m_StopConditionDescription
virtual const StopConditionReturnStringType GetStopConditionDescription() const override
Superclass::StopConditionReturnStringType StopConditionReturnStringType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
std::vector< LocalOptimizerPointer > OptimizersListType
Abstract base for object-to-object optimizers.
OptimizersListType & GetOptimizersList()
virtual void StartOptimization(bool doOnlyInitialization=false) override