ITK  4.4.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
22 
23 namespace itk
24 {
45 class ITK_EXPORT MultiGradientOptimizerv4
47 {
48 public:
54 
57 
59  itkNewMacro(Self);
60 
63  typedef Superclass::ParametersType ParametersType;
66  typedef std::vector< LocalOptimizerPointer > OptimizersListType;
67  typedef OptimizersListType::size_type OptimizersListSizeType;
68 
70  typedef std::string StopConditionReturnStringType;
71 
73  typedef std::ostringstream StopConditionDescriptionType;
74 
76  typedef Superclass::MetricType MetricType;
78 
81 
84  typedef std::vector< MeasureType > MetricValuesListType;
85 
87  typedef Superclass::InternalComputationValueType InternalComputationValueType;
88 
90  itkGetConstReferenceMacro(StopCondition, StopConditionType);
91 
93  itkSetMacro(NumberOfIterations, SizeValueType);
94 
96  itkGetConstReferenceMacro(NumberOfIterations, SizeValueType);
97 
99  itkGetConstMacro(CurrentIteration, SizeValueType);
100 
102  virtual void StartOptimization( bool doOnlyInitialization = false );
103 
106  virtual void StopOptimization(void);
107 
110  virtual void ResumeOptimization();
111 
113  virtual const StopConditionReturnStringType GetStopConditionDescription() const;
114 
116  OptimizersListType & GetOptimizersList();
117 
119  void SetOptimizersList(OptimizersListType & p);
120 
122  const MetricValuesListType & GetMetricValuesList() const;
123 
124 protected:
125 
128  virtual ~MultiGradientOptimizerv4();
130 
131  virtual void PrintSelf(std::ostream & os, Indent indent) const;
132 
133  /* Common variables for optimization control and reporting */
134  bool m_Stop;
143 
144 private:
145  MultiGradientOptimizerv4( const Self & ); //purposely not implemented
146  void operator=( const Self& ); //purposely not implemented
147 
148 };
149 
150 } // end namespace itk
151 
152 #endif
153