ITK  4.5.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"
23 #include "itkIntTypes.h"
24 
25 namespace itk
26 {
66 template< typename TInternalComputationValueType>
68 {
69 public:
72  typedef Object Superclass;
75 
78 
81 
84 
88 
91 
94 
96  itkSetObjectMacro( Metric, MetricType );
97  itkGetModifiableObjectMacro(Metric, MetricType );
99 
103  itkGetConstReferenceMacro( CurrentMetricValue, MeasureType );
104 
110  virtual const MeasureType & GetValue() const;
111 
113  itkSetMacro( Scales, ScalesType );
114 
116  itkGetConstReferenceMacro( Scales, ScalesType );
117 
119  itkGetConstReferenceMacro( ScalesAreIdentity, bool );
120 
122  itkSetMacro( Weights, ScalesType );
123 
126  itkGetConstReferenceMacro( Weights, ScalesType );
127 
129  itkGetConstReferenceMacro( WeightsAreIdentity, bool );
130 
134  virtual void SetNumberOfThreads( ThreadIdType number );
135 
137  itkGetConstReferenceMacro( NumberOfThreads, ThreadIdType );
138 
142  virtual const ParametersType & GetCurrentPosition() const;
143 
151  virtual void StartOptimization( bool doOnlyInitialization = false );
152 
153 protected:
154 
159 
162 
165 
169 
175 
178 
181 
182  virtual void PrintSelf(std::ostream & os, Indent indent) const;
183 
184 private:
185 
186  //purposely not implemented
188  //purposely not implemented
189  void operator=( const Self& );
190 
191 };
192 
195 
196 } // end namespace itk
197 
198 #ifndef ITK_MANUAL_INSTANTIATION
199 #include "itkObjectToObjectOptimizerBase.hxx"
200 #endif
201 
202 #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
Base class for all object-to-object similarlity metrics added in ITKv4.
ObjectToObjectMetricBaseTemplate< TInternalComputationValueType > MetricType
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.
unsigned int ThreadIdType
Definition: itkIntTypes.h:159