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 );
00153
itkGetConstReferenceMacro( FixedImageRegion,
FixedImageRegionType );
00156
itkGetMacro( FixedImageRegionDefined,
bool );
00161
itkSetMacro( FixedImageRegionDefined,
bool );
00162
00164
virtual void Initialize() throw (ExceptionObject);
00165
00166 protected:
00167 ImageRegistrationMethod();
00168 virtual ~ImageRegistrationMethod() {};
00169
void PrintSelf(std::ostream& os,
Indent indent)
const;
00170
00171
private:
00172 ImageRegistrationMethod(
const Self&);
00173
void operator=(
const Self&);
00174
00175 MetricPointer m_Metric;
00176 OptimizerType::Pointer m_Optimizer;
00177
00178 MovingImageConstPointer m_MovingImage;
00179
FixedImageConstPointer m_FixedImage;
00180
00181
TransformPointer m_Transform;
00182
InterpolatorPointer m_Interpolator;
00183
00184
ParametersType m_InitialTransformParameters;
00185
ParametersType m_LastTransformParameters;
00186
00187
bool m_FixedImageRegionDefined;
00188
FixedImageRegionType m_FixedImageRegion;
00189
00190 };
00191
00192
00193 }
00194
00195
00196
#ifndef ITK_MANUAL_INSTANTIATION
00197
#include "itkImageRegistrationMethod.txx"
00198
#endif
00199
00200
#endif
00201
00202
00203