ITK  4.5.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 
73  typedef std::string StopConditionReturnStringType;
74 
76  typedef std::ostringstream StopConditionDescriptionType;
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  itkGetConstReferenceMacro(StopCondition, StopConditionType);
94 
96  itkSetMacro(NumberOfIterations, SizeValueType);
97 
99  itkGetConstReferenceMacro(NumberOfIterations, SizeValueType);
100 
102  itkGetConstMacro(CurrentIteration, SizeValueType);
103 
105  virtual void StartOptimization( bool doOnlyInitialization = false );
106 
109  virtual void StopOptimization(void);
110 
113  virtual void ResumeOptimization();
114 
117 
120 
123 
126 
127  protected:
128 
133 
134  virtual void PrintSelf(std::ostream & os, Indent indent) const;
135 
136  /* Common variables for optimization control and reporting */
137  bool m_Stop;
146 
147  private:
148  MultiGradientOptimizerv4Template( const Self & ); //purposely not implemented
149  void operator=( const Self& ); //purposely not implemented
150 
151 };
152 
155 
156 } // end namespace itk
157 
158 #ifndef ITK_MANUAL_INSTANTIATION
159 #include "itkMultiGradientOptimizerv4.hxx"
160 #endif
161 
162 #endif
Multiple gradient-based optimizers are combined in order to perform a multi-objective optimization...
Light weight base class for most itk classes.
itk::GradientDescentOptimizerv4Template< TInternalComputationValueType > LocalOptimizerType
OptimizersListType::size_type OptimizersListSizeType
itk::GradientDescentOptimizerv4Template< TInternalComputationValueType >::Pointer LocalOptimizerPointer
ObjectToObjectOptimizerBaseTemplate< TInternalComputationValueType > OptimizerType
const MetricValuesListType & GetMetricValuesList() const
void SetOptimizersList(OptimizersListType &p)
GradientDescentOptimizerv4Template< TInternalComputationValueType > Superclass
unsigned long SizeValueType
Definition: itkIntTypes.h:143
virtual void StartOptimization(bool doOnlyInitialization=false)
Superclass::StopConditionType StopConditionType
virtual void PrintSelf(std::ostream &os, Indent indent) const
virtual const StopConditionReturnStringType GetStopConditionDescription() const
TInternalComputationValueType InternalComputationValueType
MultiGradientOptimizerv4Template< double > MultiGradientOptimizerv4
StopConditionDescriptionType m_StopConditionDescription
Control indentation during Print() invocation.
Definition: itkIndent.h:49
std::vector< LocalOptimizerPointer > OptimizersListType
Abstract base for object-to-object optimizers.
OptimizersListType & GetOptimizersList()