ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkObjectToObjectOptimizerBase.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 __itkObjectToObjectOptimizerBase_h
19 #define __itkObjectToObjectOptimizerBase_h
20 
21 #include "itkOptimizerParameters.h"
24 #include "itkIntTypes.h"
25 
26 namespace itk
27 {
79 template< typename TInternalComputationValueType = double>
81 {
82 public:
85  typedef Object Superclass;
88 
91 
95 
98 
102 
105 
108 
111 
113  typedef std::string StopConditionReturnStringType;
114 
116  typedef std::ostringstream StopConditionDescriptionType;
117 
119  itkSetObjectMacro( Metric, MetricType );
120  itkGetModifiableObjectMacro(Metric, MetricType );
122 
126  itkGetConstReferenceMacro( CurrentMetricValue, MeasureType );
127 
133  virtual const MeasureType & GetValue() const;
134 
136  //itkSetMacro( Scales, ScalesType );
137  virtual void SetScales(const ScalesType & scales)
138  {
139  this->m_Scales = scales;
140  }
142 
144  itkGetConstReferenceMacro( Scales, ScalesType );
145 
147  itkGetConstReferenceMacro( ScalesAreIdentity, bool );
148 
150  itkSetMacro( Weights, ScalesType );
151 
154  itkGetConstReferenceMacro( Weights, ScalesType );
155 
157  itkGetConstReferenceMacro( WeightsAreIdentity, bool );
158 
161  bool GetScalesInitialized( void ) const;
162 
172  itkSetObjectMacro(ScalesEstimator, ScalesEstimatorType);
173 
179  itkSetMacro(DoEstimateScales, bool);
180  itkGetConstReferenceMacro(DoEstimateScales, bool);
181  itkBooleanMacro(DoEstimateScales);
183 
187  virtual void SetNumberOfThreads( ThreadIdType number );
188 
190  itkGetConstReferenceMacro( NumberOfThreads, ThreadIdType );
191 
193  itkGetConstMacro(CurrentIteration, SizeValueType);
194 
196  itkSetMacro(NumberOfIterations, SizeValueType);
197 
199  itkGetConstMacro(NumberOfIterations, SizeValueType);
200 
204  virtual const ParametersType & GetCurrentPosition() const;
205 
213  virtual void StartOptimization( bool doOnlyInitialization = false );
214 
217 
218 protected:
219 
224 
229 
232 
236 
242 
245 
248 
251 
256 
257  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
258 
259 private:
260 
261  //purposely not implemented
263  //purposely not implemented
264  void operator=( const Self& );
265 
266 };
267 
270 
271 } // end namespace itk
272 
273 #ifndef ITK_MANUAL_INSTANTIATION
274 #include "itkObjectToObjectOptimizerBase.hxx"
275 #endif
276 
277 #endif
virtual void StartOptimization(bool doOnlyInitialization=false)
OptimizerParameters< TInternalComputationValueType > ScalesType
Light weight base class for most itk classes.
OptimizerParameters< TInternalComputationValueType > ParametersType
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
Base class for all object-to-object similarlity metrics added in ITKv4.
unsigned long SizeValueType
Definition: itkIntTypes.h:143
ObjectToObjectMetricBaseTemplate< TInternalComputationValueType > MetricType
OptimizerParameterScalesEstimatorTemplate< TInternalComputationValueType > ScalesEstimatorType
OptimizerParameterScalesEstimatorTemplate is the base class offering a empty method of estimating the...
virtual const MeasureType & GetValue() const
virtual const ParametersType & GetCurrentPosition() const
MetricType::NumberOfParametersType NumberOfParametersType
ObjectToObjectOptimizerBaseTemplate< double > ObjectToObjectOptimizerBase
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual void SetNumberOfThreads(ThreadIdType number)
Base class for most ITK classes.
Definition: itkObject.h:57
Abstract base for object-to-object optimizers.
virtual void SetScales(const ScalesType &scales)
virtual const StopConditionReturnStringType GetStopConditionDescription() const =0
unsigned int ThreadIdType
Definition: itkIntTypes.h:159