ITK  4.13.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>
46 class ITK_TEMPLATE_EXPORT MultiGradientOptimizerv4Template
47 : public GradientDescentOptimizerv4Template<TInternalComputationValueType>
48 {
49 public:
55 
58 
60  itkNewMacro(Self);
61 
64  typedef typename Superclass::ParametersType ParametersType;
67  typedef std::vector< LocalOptimizerPointer > OptimizersListType;
68  typedef typename OptimizersListType::size_type OptimizersListSizeType;
69 
71 
73  typedef typename Superclass::StopConditionReturnStringType StopConditionReturnStringType;
74 
76  typedef typename Superclass::StopConditionDescriptionType StopConditionDescriptionType;
77 
79  typedef TInternalComputationValueType InternalComputationValueType;
80 
82  typedef typename Superclass::MetricType MetricType;
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 
113  OptimizersListType & GetOptimizersList();
114 
116  void SetOptimizersList(OptimizersListType & p);
117 
119  const MetricValuesListType & GetMetricValuesList() const;
120 
121  protected:
122 
125  virtual ~MultiGradientOptimizerv4Template() ITK_OVERRIDE;
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;
132  StopConditionType m_StopCondition;
133  StopConditionDescriptionType m_StopConditionDescription;
134  OptimizersListType m_OptimizersList;
135  MetricValuesListType m_MetricValuesList;
136  MeasureType m_MinimumMetricValue;
137  MeasureType m_MaximumMetricValue;
138 
139  private:
140  ITK_DISALLOW_COPY_AND_ASSIGN(MultiGradientOptimizerv4Template);
141 
142 };
143 
145 typedef MultiGradientOptimizerv4Template<double> MultiGradientOptimizerv4;
146 
147 } // end namespace itk
148 
149 #ifndef ITK_MANUAL_INSTANTIATION
150 #include "itkMultiGradientOptimizerv4.hxx"
151 #endif
152 
153 #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
itk::GradientDescentOptimizerv4Template< TInternalComputationValueType >::Pointer LocalOptimizerPointer
ObjectToObjectOptimizerBaseTemplate< TInternalComputationValueType > OptimizerType
GradientDescentOptimizerv4Template< TInternalComputationValueType > Superclass
Superclass::StopConditionDescriptionType StopConditionDescriptionType
Superclass::StopConditionType StopConditionType
TInternalComputationValueType InternalComputationValueType
Superclass::StopConditionReturnStringType StopConditionReturnStringType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
std::vector< LocalOptimizerPointer > OptimizersListType
Abstract base for object-to-object optimizers.