ITK
4.0.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 00109 virtual void SetNumberOfThreads( ThreadIdType number ); 00110 00114 const ParametersType & GetCurrentPosition(); 00115 00119 virtual void StartOptimization(); 00120 00121 protected: 00122 00124 ObjectToObjectOptimizerBase(); 00125 virtual ~ObjectToObjectOptimizerBase(); 00127 00128 MetricTypePointer m_Metric; 00129 ThreadIdType m_NumberOfThreads; 00130 00132 MeasureType m_Value; 00133 00136 ScalesType m_Scales; 00137 00138 00140 bool m_ScalesAreIdentity; 00141 00142 virtual void PrintSelf(std::ostream & os, Indent indent) const; 00143 00144 private: 00145 00146 //purposely not implemented 00147 ObjectToObjectOptimizerBase( const Self & ); 00148 //purposely not implemented 00149 void operator=( const Self& ); 00150 00151 }; 00152 00153 } // end namespace itk 00154 00155 #endif 00156