00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkImageRegistrationMethod_h
00018 #define __itkImageRegistrationMethod_h
00019
00020 #include "itkProcessObject.h"
00021 #include "itkImage.h"
00022 #include "itkImageToImageMetric.h"
00023 #include "itkSingleValuedNonLinearOptimizer.h"
00024
00025 namespace itk
00026 {
00027
00061 template <typename TFixedImage, typename TMovingImage>
00062 class ITK_EXPORT ImageRegistrationMethod : public ProcessObject
00063 {
00064 public:
00066 typedef ImageRegistrationMethod Self;
00067 typedef ProcessObject Superclass;
00068 typedef SmartPointer<Self> Pointer;
00069 typedef SmartPointer<const Self> ConstPointer;
00070
00072 itkNewMacro(Self);
00073
00075 itkTypeMacro(ImageRegistrationMethod, ProcessObject);
00076
00078 typedef TFixedImage FixedImageType;
00079 typedef typename FixedImageType::ConstPointer FixedImageConstPointer;
00080
00082 typedef TMovingImage MovingImageType;
00083 typedef typename MovingImageType::ConstPointer MovingImageConstPointer;
00084
00086 typedef ImageToImageMetric< FixedImageType,
00087 MovingImageType > MetricType;
00088 typedef typename MetricType::Pointer MetricPointer;
00089 typedef typename MetricType::FixedImageRegionType FixedImageRegionType;
00090
00092 typedef typename MetricType::TransformType TransformType;
00093 typedef typename TransformType::Pointer TransformPointer;
00094
00096 typedef typename MetricType::InterpolatorType InterpolatorType;
00097 typedef typename InterpolatorType::Pointer InterpolatorPointer;
00098
00100 typedef SingleValuedNonLinearOptimizer OptimizerType;
00101
00104 typedef typename MetricType::TransformParametersType ParametersType;
00105
00107 void StartRegistration(void);
00108
00110 itkSetConstObjectMacro( FixedImage, FixedImageType );
00111 itkGetConstObjectMacro( FixedImage, FixedImageType );
00112
00114 itkSetConstObjectMacro( MovingImage, MovingImageType );
00115 itkGetConstObjectMacro( MovingImage, MovingImageType );
00116
00118 itkSetObjectMacro( Optimizer, OptimizerType );
00119 itkGetObjectMacro( Optimizer, OptimizerType );
00120
00122 itkSetObjectMacro( Metric, MetricType );
00123 itkGetObjectMacro( Metric, MetricType );
00124
00126 itkSetObjectMacro( Transform, TransformType );
00127 itkGetObjectMacro( Transform, TransformType );
00128
00130 itkSetObjectMacro( Interpolator, InterpolatorType );
00131 itkGetObjectMacro( Interpolator, InterpolatorType );
00132
00134 virtual void SetInitialTransformParameters( const ParametersType & param );
00135 itkGetConstReferenceMacro( InitialTransformParameters, ParametersType );
00136
00139 itkGetConstReferenceMacro( LastTransformParameters, ParametersType );
00140
00148 void SetFixedImageRegion( const FixedImageRegionType & region );
00149
00151 void Initialize() throw (ExceptionObject);
00152
00153 protected:
00154 ImageRegistrationMethod();
00155 virtual ~ImageRegistrationMethod() {};
00156 void PrintSelf(std::ostream& os, Indent indent) const;
00157
00159 itkGetMacro( FixedImageRegionDefined, bool );
00160 itkGetConstReferenceMacro( FixedImageRegion, FixedImageRegionType );
00161
00162 private:
00163 ImageRegistrationMethod(const Self&);
00164 void operator=(const Self&);
00165
00166 MetricPointer m_Metric;
00167 OptimizerType::Pointer m_Optimizer;
00168
00169 MovingImageConstPointer m_MovingImage;
00170 FixedImageConstPointer m_FixedImage;
00171
00172 TransformPointer m_Transform;
00173 InterpolatorPointer m_Interpolator;
00174
00175 ParametersType m_InitialTransformParameters;
00176 ParametersType m_LastTransformParameters;
00177
00178 bool m_FixedImageRegionDefined;
00179 FixedImageRegionType m_FixedImageRegion;
00180
00181 };
00182
00183
00184 }
00185
00186
00187 #ifndef ITK_MANUAL_INSTANTIATION
00188 #include "itkImageRegistrationMethod.txx"
00189 #endif
00190
00191 #endif
00192
00193
00194