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: 2005/11/01 21:57:22 $
00007   Version:   $Revision: 1.19 $
00008 
00009   Copyright (c) Insight Software 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 #include "itkDataObjectDecorator.h"
00025 
00026 namespace itk
00027 {
00028 
00062 template <typename TFixedImage, typename TMovingImage>
00063 class ITK_EXPORT ImageRegistrationMethod : public ProcessObject 
00064 {
00065 public:
00067   typedef ImageRegistrationMethod  Self;
00068   typedef ProcessObject  Superclass;
00069   typedef SmartPointer<Self>   Pointer;
00070   typedef SmartPointer<const Self>  ConstPointer;
00071 
00073   itkNewMacro(Self);
00074   
00076   itkTypeMacro(ImageRegistrationMethod, ProcessObject);
00077 
00079   typedef          TFixedImage                     FixedImageType;
00080   typedef typename FixedImageType::ConstPointer    FixedImageConstPointer;
00081 
00083   typedef          TMovingImage                     MovingImageType;
00084   typedef typename MovingImageType::ConstPointer    MovingImageConstPointer;
00085 
00087   typedef ImageToImageMetric< FixedImageType,
00088                               MovingImageType >       MetricType;
00089   typedef typename MetricType::Pointer                MetricPointer;
00090   typedef typename MetricType::FixedImageRegionType   FixedImageRegionType;
00091 
00093   typedef  typename MetricType::TransformType      TransformType;
00094   typedef  typename TransformType::Pointer         TransformPointer;
00095 
00098   typedef  DataObjectDecorator< TransformType >    TransformOutputType;
00099   typedef typename TransformOutputType::Pointer    TransformOutputPointer;
00100   typedef typename TransformOutputType::ConstPointer    TransformOutputConstPointer;
00101   
00103   typedef  typename MetricType::InterpolatorType   InterpolatorType;
00104   typedef  typename InterpolatorType::Pointer      InterpolatorPointer;
00105 
00107   typedef   SingleValuedNonLinearOptimizer         OptimizerType;
00108 
00111   typedef  typename MetricType::TransformParametersType    ParametersType;
00112 
00114   typedef typename DataObject::Pointer DataObjectPointer;
00115 
00120   void StartRegistration(void);
00121 
00123   void StartOptimization(void);
00124 
00126   void SetFixedImage( const FixedImageType * fixedImage );
00127   itkGetConstObjectMacro( FixedImage, FixedImageType ); 
00128 
00130   void SetMovingImage( const MovingImageType * movingImage );
00131   itkGetConstObjectMacro( MovingImage, MovingImageType );
00132 
00134   itkSetObjectMacro( Optimizer,  OptimizerType );
00135   itkGetObjectMacro( Optimizer,  OptimizerType );
00136 
00138   itkSetObjectMacro( Metric, MetricType );
00139   itkGetObjectMacro( Metric, MetricType );
00140 
00142   itkSetObjectMacro( Transform, TransformType );
00143   itkGetObjectMacro( Transform, TransformType );
00144 
00146   itkSetObjectMacro( Interpolator, InterpolatorType );
00147   itkGetObjectMacro( Interpolator, InterpolatorType );
00148 
00150   virtual void SetInitialTransformParameters( const ParametersType & param );
00151   itkGetConstReferenceMacro( InitialTransformParameters, ParametersType );
00152 
00155   itkGetConstReferenceMacro( LastTransformParameters, ParametersType );
00156 
00164   void SetFixedImageRegion( const  FixedImageRegionType & region ); 
00169   itkGetConstReferenceMacro( FixedImageRegion, FixedImageRegionType );
00172   itkGetMacro( FixedImageRegionDefined, bool );
00177   itkSetMacro( FixedImageRegionDefined, bool );
00178 
00180   virtual void Initialize() throw (ExceptionObject);
00181 
00183   const TransformOutputType * GetOutput() const;
00184 
00187   virtual DataObjectPointer MakeOutput(unsigned int idx);
00188 
00191   unsigned long GetMTime() const;  
00192     
00193 protected:
00194   ImageRegistrationMethod();
00195   virtual ~ImageRegistrationMethod() {};
00196   void PrintSelf(std::ostream& os, Indent indent) const;
00197 
00200   void  GenerateData ();
00201 
00203   itkSetMacro( LastTransformParameters, ParametersType );
00204 
00205 
00206 private:
00207   ImageRegistrationMethod(const Self&); //purposely not implemented
00208   void operator=(const Self&); //purposely not implemented
00209   
00210   MetricPointer                    m_Metric;
00211   OptimizerType::Pointer           m_Optimizer;
00212 
00213   MovingImageConstPointer          m_MovingImage;
00214   FixedImageConstPointer           m_FixedImage;
00215 
00216   TransformPointer                 m_Transform;
00217   InterpolatorPointer              m_Interpolator;
00218 
00219   ParametersType                   m_InitialTransformParameters;
00220   ParametersType                   m_LastTransformParameters;
00221   
00222   bool                             m_FixedImageRegionDefined;
00223   FixedImageRegionType             m_FixedImageRegion;
00224 
00225 };
00226 
00227 
00228 } // end namespace itk
00229 
00230 
00231 #ifndef ITK_MANUAL_INSTANTIATION
00232 #include "itkImageRegistrationMethod.txx"
00233 #endif
00234 
00235 #endif
00236 
00237 
00238 

Generated at Wed May 24 23:25:25 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000