ITK
4.1.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 "itkObjectToObjectMetric.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 ObjectToObjectMetric MetricType; 00079 typedef MetricType::Pointer MetricTypePointer; 00080 00082 typedef MetricType::NumberOfParametersType NumberOfParametersType; 00083 00085 typedef MetricType::MeasureType MeasureType; 00086 00088 typedef MetricType::InternalComputationValueType 00089 InternalComputationValueType; 00090 00092 itkGetObjectMacro( Metric, MetricType ); 00093 itkSetObjectMacro( Metric, MetricType ); 00095 00097 itkGetConstReferenceMacro( Value, MeasureType ); 00098 00100 itkSetMacro( Scales, ScalesType ); 00101 00103 itkGetConstReferenceMacro( Scales, ScalesType ); 00104 00106 itkGetConstReferenceMacro( ScalesAreIdentity, bool ); 00107 00111 virtual void SetNumberOfThreads( ThreadIdType number ); 00112 00114 itkGetConstReferenceMacro( NumberOfThreads, ThreadIdType ); 00115 00119 const ParametersType & GetCurrentPosition(); 00120 00124 virtual void StartOptimization(); 00125 00126 protected: 00127 00129 ObjectToObjectOptimizerBase(); 00130 virtual ~ObjectToObjectOptimizerBase(); 00132 00133 MetricTypePointer m_Metric; 00134 ThreadIdType m_NumberOfThreads; 00135 00137 MeasureType m_Value; 00138 00141 ScalesType m_Scales; 00142 00143 00145 bool m_ScalesAreIdentity; 00146 00147 virtual void PrintSelf(std::ostream & os, Indent indent) const; 00148 00149 private: 00150 00151 //purposely not implemented 00152 ObjectToObjectOptimizerBase( const Self & ); 00153 //purposely not implemented 00154 void operator=( const Self& ); 00155 00156 }; 00157 00158 } // end namespace itk 00159 00160 #endif 00161