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 __itkPointSetToImageRegistrationMethod_h 00019 #define __itkPointSetToImageRegistrationMethod_h 00020 00021 #include "itkProcessObject.h" 00022 #include "itkImage.h" 00023 #include "itkPointSetToImageMetric.h" 00024 #include "itkSingleValuedNonLinearOptimizer.h" 00025 #include "itkDataObjectDecorator.h" 00026 00027 namespace itk 00028 { 00063 template< typename TFixedPointSet, typename TMovingImage > 00064 class ITK_EXPORT PointSetToImageRegistrationMethod:public ProcessObject 00065 { 00066 public: 00068 typedef PointSetToImageRegistrationMethod Self; 00069 typedef ProcessObject Superclass; 00070 typedef SmartPointer< Self > Pointer; 00071 typedef SmartPointer< const Self > ConstPointer; 00072 00074 itkNewMacro(Self); 00075 00077 itkTypeMacro(PointSetToImageRegistrationMethod, ProcessObject); 00078 00080 typedef TFixedPointSet FixedPointSetType; 00081 typedef typename FixedPointSetType::ConstPointer FixedPointSetConstPointer; 00082 00084 typedef TMovingImage MovingImageType; 00085 typedef typename MovingImageType::ConstPointer MovingImageConstPointer; 00086 00088 typedef PointSetToImageMetric< FixedPointSetType, MovingImageType > MetricType; 00089 typedef typename MetricType::Pointer MetricPointer; 00090 00092 typedef typename MetricType::TransformType TransformType; 00093 typedef typename TransformType::Pointer TransformPointer; 00094 00097 typedef DataObjectDecorator< TransformType > TransformOutputType; 00098 typedef typename TransformOutputType::Pointer TransformOutputPointer; 00099 typedef typename TransformOutputType::ConstPointer TransformOutputConstPointer; 00100 00102 typedef typename MetricType::InterpolatorType InterpolatorType; 00103 typedef typename InterpolatorType::Pointer InterpolatorPointer; 00104 00106 typedef SingleValuedNonLinearOptimizer OptimizerType; 00107 00110 typedef typename MetricType::TransformParametersType ParametersType; 00111 00113 typedef typename DataObject::Pointer DataObjectPointer; 00114 00116 void StartRegistration(void); 00117 00119 itkSetConstObjectMacro(FixedPointSet, FixedPointSetType); 00120 itkGetConstObjectMacro(FixedPointSet, FixedPointSetType); 00122 00124 itkSetConstObjectMacro(MovingImage, MovingImageType); 00125 itkGetConstObjectMacro(MovingImage, MovingImageType); 00127 00129 itkSetObjectMacro(Optimizer, OptimizerType); 00130 itkGetObjectMacro(Optimizer, OptimizerType); 00132 00134 itkSetObjectMacro(Metric, MetricType); 00135 itkGetObjectMacro(Metric, MetricType); 00137 00139 itkSetObjectMacro(Transform, TransformType); 00140 itkGetObjectMacro(Transform, TransformType); 00142 00144 itkSetObjectMacro(Interpolator, InterpolatorType); 00145 itkGetObjectMacro(Interpolator, InterpolatorType); 00147 00149 virtual void SetInitialTransformParameters(const ParametersType & param); 00150 00151 itkGetConstReferenceMacro(InitialTransformParameters, ParametersType); 00152 00155 itkGetConstReferenceMacro(LastTransformParameters, ParametersType); 00156 00158 void Initialize() 00159 throw ( ExceptionObject ); 00160 00162 const TransformOutputType * GetOutput() const; 00163 00166 typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; 00167 using Superclass::MakeOutput; 00168 virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx); 00169 00172 unsigned long GetMTime() const; 00173 00174 protected: 00175 PointSetToImageRegistrationMethod(); 00176 virtual ~PointSetToImageRegistrationMethod() {} 00177 void PrintSelf(std::ostream & os, Indent indent) const; 00178 00181 void GenerateData(); 00182 00183 private: 00184 PointSetToImageRegistrationMethod(const Self &); //purposely not implemented 00185 void operator=(const Self &); //purposely not implemented 00186 00187 MetricPointer m_Metric; 00188 OptimizerType::Pointer m_Optimizer; 00189 00190 MovingImageConstPointer m_MovingImage; 00191 FixedPointSetConstPointer m_FixedPointSet; 00192 00193 TransformPointer m_Transform; 00194 InterpolatorPointer m_Interpolator; 00195 00196 ParametersType m_InitialTransformParameters; 00197 ParametersType m_LastTransformParameters; 00198 }; 00199 } // end namespace itk 00200 00201 #ifndef ITK_MANUAL_INSTANTIATION 00202 #include "itkPointSetToImageRegistrationMethod.hxx" 00203 #endif 00204 00205 #endif 00206