Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkImageRegistrationMethod.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkImageRegistrationMethod.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/12/13 22:20:27 $
00007   Version:   $Revision: 1.11 $
00008 
00009   Copyright (c) 2002 Insight Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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&); //purposely not implemented
00164   void operator=(const Self&); //purposely not implemented
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 } // end namespace itk
00185 
00186 
00187 #ifndef ITK_MANUAL_INSTANTIATION
00188 #include "itkImageRegistrationMethod.txx"
00189 #endif
00190 
00191 #endif
00192 
00193 
00194 

Generated at Fri May 21 01:14:55 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000