![]() |
ITK
4.2.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkObjectToObjectOptimizerBase_h 00019 #define __itkObjectToObjectOptimizerBase_h 00020 00021 #include "itkOptimizerParameters.h" 00022 #include "itkObjectToObjectMetricBase.h" 00023 #include "itkIntTypes.h" 00024 00025 namespace itk 00026 { 00059 class ITK_EXPORT ObjectToObjectOptimizerBase : public Object 00060 { 00061 public: 00063 typedef ObjectToObjectOptimizerBase Self; 00064 typedef Object Superclass; 00065 typedef SmartPointer< Self > Pointer; 00066 typedef SmartPointer< const Self > ConstPointer; 00067 00069 itkTypeMacro(ObjectToObjectOptimizerBase, Object); 00070 00072 typedef OptimizerParameters< double > ScalesType; 00073 00075 typedef OptimizerParameters< double > ParametersType; 00076 00078 typedef ObjectToObjectMetricBase MetricType; 00079 typedef MetricType::Pointer MetricTypePointer; 00080 00082 typedef MetricType::NumberOfParametersType NumberOfParametersType; 00083 00085 typedef MetricType::MeasureType MeasureType; 00086 00088 typedef MetricType::InternalComputationValueType InternalComputationValueType; 00089 00091 itkGetObjectMacro( Metric, MetricType ); 00092 itkSetObjectMacro( Metric, MetricType ); 00094 00096 itkGetConstReferenceMacro( Value, MeasureType ); 00097 00099 itkSetMacro( Scales, ScalesType ); 00100 00102 itkGetConstReferenceMacro( Scales, ScalesType ); 00103 00105 itkGetConstReferenceMacro( ScalesAreIdentity, bool ); 00106 00110 virtual void SetNumberOfThreads( ThreadIdType number ); 00111 00113 itkGetConstReferenceMacro( NumberOfThreads, ThreadIdType ); 00114 00118 const ParametersType & GetCurrentPosition(); 00119 00123 virtual void StartOptimization(); 00124 00125 protected: 00126 00128 ObjectToObjectOptimizerBase(); 00129 virtual ~ObjectToObjectOptimizerBase(); 00131 00132 MetricTypePointer m_Metric; 00133 ThreadIdType m_NumberOfThreads; 00134 00136 MeasureType m_Value; 00137 00140 ScalesType m_Scales; 00141 00142 00144 bool m_ScalesAreIdentity; 00145 00146 virtual void PrintSelf(std::ostream & os, Indent indent) const; 00147 00148 private: 00149 00150 //purposely not implemented 00151 ObjectToObjectOptimizerBase( const Self & ); 00152 //purposely not implemented 00153 void operator=( const Self& ); 00154 00155 }; 00156 00157 } // end namespace itk 00158 00159 #endif 00160
1.7.6.1