ITK  4.2.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 {
42 class ITK_EXPORT MultiGradientOptimizerv4
44 {
45 public:
51 
54 
56  itkNewMacro(Self);
57 
60  typedef Superclass::ParametersType ParametersType;
63  typedef std::vector< LocalOptimizerPointer > OptimizersListType;
64  typedef OptimizersListType::size_type OptimizersListSizeType;
65 
67  typedef std::string StopConditionReturnStringType;
68 
70  typedef std::ostringstream StopConditionDescriptionType;
71 
73  typedef Superclass::MetricType MetricType;
75 
78 
81  typedef std::vector< MeasureType > MetricValuesListType;
82 
84  typedef Superclass::InternalComputationValueType InternalComputationValueType;
85 
87  itkGetConstReferenceMacro(StopCondition, StopConditionType);
88 
90  itkSetMacro(NumberOfIterations, SizeValueType);
91 
93  itkGetConstReferenceMacro(NumberOfIterations, SizeValueType);
94 
96  itkGetConstMacro(CurrentIteration, SizeValueType);
97 
99  virtual void StartOptimization(void);
100 
103  virtual void StopOptimization(void);
104 
107  virtual void ResumeOptimization();
108 
110  virtual const StopConditionReturnStringType GetStopConditionDescription() const;
111 
113  OptimizersListType & GetOptimizersList();
114 
116  void SetOptimizersList(OptimizersListType & p);
117 
119  const MetricValuesListType & GetMetricValuesList() const;
120 
121 protected:
122 
125  virtual ~MultiGradientOptimizerv4();
127 
128  virtual void PrintSelf(std::ostream & os, Indent indent) const;
129 
130  /* Common variables for optimization control and reporting */
131  bool m_Stop;
140 
141 private:
142  MultiGradientOptimizerv4( const Self & ); //purposely not implemented
143  void operator=( const Self& ); //purposely not implemented
144 
145 };
146 
147 } // end namespace itk
148 
149 #endif
150