00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkImageToSpatialObjectRegistrationMethod_h
00018 #define __itkImageToSpatialObjectRegistrationMethod_h
00019
00020 #include "itkProcessObject.h"
00021 #include "itkImage.h"
00022 #include "itkImageToSpatialObjectMetric.h"
00023 #include "itkSingleValuedNonLinearOptimizer.h"
00024
00025 namespace itk
00026 {
00027
00058 template <typename TFixedImage, typename TMovingSpatialObject>
00059 class ITK_EXPORT ImageToSpatialObjectRegistrationMethod : public ProcessObject
00060 {
00061 public:
00063 typedef ImageToSpatialObjectRegistrationMethod Self;
00064 typedef ProcessObject Superclass;
00065 typedef SmartPointer<Self> Pointer;
00066 typedef SmartPointer<const Self> ConstPointer;
00067
00069 itkNewMacro(Self);
00070
00072 itkTypeMacro(ImageToSpatialObjectRegistrationMethod, ProcessObject);
00073
00075 typedef TFixedImage FixedImageType;
00076 typedef typename FixedImageType::ConstPointer FixedImageConstPointer;
00077
00079 typedef TMovingSpatialObject MovingSpatialObjectType;
00080 typedef typename MovingSpatialObjectType::ConstPointer
00081 MovingSpatialObjectConstPointer;
00082
00084 typedef ImageToSpatialObjectMetric< FixedImageType,
00085 MovingSpatialObjectType > MetricType;
00086 typedef typename MetricType::Pointer MetricPointer;
00087
00089 typedef typename MetricType::TransformType TransformType;
00090 typedef typename TransformType::Pointer TransformPointer;
00091
00093 typedef typename MetricType::InterpolatorType InterpolatorType;
00094 typedef typename InterpolatorType::Pointer InterpolatorPointer;
00095
00097 typedef SingleValuedNonLinearOptimizer OptimizerType;
00098
00101 typedef typename MetricType::TransformParametersType ParametersType;
00102
00104 void StartRegistration(void);
00105
00107 itkSetConstObjectMacro( FixedImage, FixedImageType );
00108 itkGetConstObjectMacro( FixedImage, FixedImageType );
00109
00111 itkSetConstObjectMacro( MovingSpatialObject, MovingSpatialObjectType );
00112 itkGetConstObjectMacro( MovingSpatialObject, MovingSpatialObjectType );
00113
00115 itkSetObjectMacro( Optimizer, OptimizerType );
00116 itkGetObjectMacro( Optimizer, OptimizerType );
00117
00119 itkSetObjectMacro( Metric, MetricType );
00120 itkGetObjectMacro( Metric, MetricType );
00121
00123 itkSetObjectMacro( Transform, TransformType );
00124 itkGetObjectMacro( Transform, TransformType );
00125
00127 itkSetObjectMacro( Interpolator, InterpolatorType );
00128 itkGetObjectMacro( Interpolator, InterpolatorType );
00129
00131 itkSetMacro( InitialTransformParameters, ParametersType );
00132 itkGetConstReferenceMacro( InitialTransformParameters, ParametersType );
00133
00136 itkGetConstReferenceMacro( LastTransformParameters, ParametersType );
00137
00138 protected:
00139 ImageToSpatialObjectRegistrationMethod();
00140 virtual ~ImageToSpatialObjectRegistrationMethod() {};
00141 void PrintSelf(std::ostream& os, Indent indent) const;
00142
00144 void Initialize() throw (ExceptionObject);
00145
00146 ParametersType m_InitialTransformParameters;
00147 ParametersType m_LastTransformParameters;
00148
00149 private:
00150 ImageToSpatialObjectRegistrationMethod(const Self&);
00151 void operator=(const Self&);
00152
00153 MetricPointer m_Metric;
00154 OptimizerType::Pointer m_Optimizer;
00155
00156 MovingSpatialObjectConstPointer m_MovingSpatialObject;
00157 FixedImageConstPointer m_FixedImage;
00158
00159 TransformPointer m_Transform;
00160 InterpolatorPointer m_Interpolator;
00161
00162 };
00163
00164
00165 }
00166
00167
00168 #ifndef ITK_MANUAL_INSTANTIATION
00169 #include "itkImageToSpatialObjectRegistrationMethod.txx"
00170 #endif
00171
00172 #endif