Go to the documentation of this file.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 #include "itkDataObjectDecorator.h"
00025
00026 namespace itk
00027 {
00028
00083 template <typename TFixedImage, typename TMovingSpatialObject>
00084 class ITK_EXPORT ImageToSpatialObjectRegistrationMethod : public ProcessObject
00085 {
00086 public:
00088 typedef ImageToSpatialObjectRegistrationMethod Self;
00089 typedef ProcessObject Superclass;
00090 typedef SmartPointer<Self> Pointer;
00091 typedef SmartPointer<const Self> ConstPointer;
00092
00094 itkNewMacro(Self);
00095
00097 itkTypeMacro(ImageToSpatialObjectRegistrationMethod, ProcessObject);
00098
00100 typedef TFixedImage FixedImageType;
00101 typedef typename FixedImageType::ConstPointer FixedImageConstPointer;
00102
00104 typedef TMovingSpatialObject MovingSpatialObjectType;
00105 typedef typename MovingSpatialObjectType::ConstPointer
00106 MovingSpatialObjectConstPointer;
00107
00109 typedef ImageToSpatialObjectMetric< FixedImageType,
00110 MovingSpatialObjectType > MetricType;
00111 typedef typename MetricType::Pointer MetricPointer;
00112
00114 typedef typename MetricType::TransformType TransformType;
00115 typedef typename TransformType::Pointer TransformPointer;
00116
00119 typedef DataObjectDecorator< TransformType > TransformOutputType;
00120 typedef typename TransformOutputType::Pointer TransformOutputPointer;
00121 typedef typename TransformOutputType::ConstPointer TransformOutputConstPointer;
00122
00124 typedef typename MetricType::InterpolatorType InterpolatorType;
00125 typedef typename InterpolatorType::Pointer InterpolatorPointer;
00126
00128 typedef SingleValuedNonLinearOptimizer OptimizerType;
00129
00132 typedef typename MetricType::TransformParametersType ParametersType;
00133
00135 typedef typename DataObject::Pointer DataObjectPointer;
00136
00138 void StartRegistration(void);
00139
00141 itkSetConstObjectMacro( FixedImage, FixedImageType );
00142 itkGetConstObjectMacro( FixedImage, FixedImageType );
00144
00146 itkSetConstObjectMacro( MovingSpatialObject, MovingSpatialObjectType );
00147 itkGetConstObjectMacro( MovingSpatialObject, MovingSpatialObjectType );
00149
00151 itkSetObjectMacro( Optimizer, OptimizerType );
00152 itkGetObjectMacro( Optimizer, OptimizerType );
00154
00156 itkSetObjectMacro( Metric, MetricType );
00157 itkGetObjectMacro( Metric, MetricType );
00159
00161 itkSetObjectMacro( Transform, TransformType );
00162 itkGetObjectMacro( Transform, TransformType );
00164
00166 itkSetObjectMacro( Interpolator, InterpolatorType );
00167 itkGetObjectMacro( Interpolator, InterpolatorType );
00169
00171 itkSetMacro( InitialTransformParameters, ParametersType );
00172 itkGetConstReferenceMacro( InitialTransformParameters, ParametersType );
00174
00177 itkGetConstReferenceMacro( LastTransformParameters, ParametersType );
00178
00180 const TransformOutputType * GetOutput() const;
00181
00184 virtual DataObjectPointer MakeOutput(unsigned int idx);
00185
00188 unsigned long GetMTime() const;
00189
00190 protected:
00191 ImageToSpatialObjectRegistrationMethod();
00192 virtual ~ImageToSpatialObjectRegistrationMethod() {};
00193 void PrintSelf(std::ostream& os, Indent indent) const;
00194
00197 void GenerateData ();
00198
00200 void Initialize() throw (ExceptionObject);
00201
00202 ParametersType m_InitialTransformParameters;
00203 ParametersType m_LastTransformParameters;
00204
00205 private:
00206 ImageToSpatialObjectRegistrationMethod(const Self&);
00207 void operator=(const Self&);
00208
00209 MetricPointer m_Metric;
00210 OptimizerType::Pointer m_Optimizer;
00211
00212 MovingSpatialObjectConstPointer m_MovingSpatialObject;
00213 FixedImageConstPointer m_FixedImage;
00214
00215 TransformPointer m_Transform;
00216 InterpolatorPointer m_Interpolator;
00217
00218 };
00219
00220
00221 }
00222
00223
00224 #ifndef ITK_MANUAL_INSTANTIATION
00225 #include "itkImageToSpatialObjectRegistrationMethod.txx"
00226 #endif
00227
00228 #endif
00229