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

itkMultiResolutionImageRegistrationMethod.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkMultiResolutionImageRegistrationMethod.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/09/10 14:28:35 $
00007   Version:   $Revision: 1.8 $
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 __itkMultiResolutionImageRegistrationMethod_h
00018 #define __itkMultiResolutionImageRegistrationMethod_h
00019 
00020 #include "itkProcessObject.h"
00021 #include "itkImageToImageMetric.h"
00022 #include "itkSingleValuedNonLinearOptimizer.h"
00023 #include "itkMultiResolutionPyramidImageFilter.h"
00024 #include "itkNumericTraits.h"
00025 
00026 namespace itk
00027 {
00028 
00065 template <typename TFixedImage, typename TMovingImage>
00066 class ITK_EXPORT MultiResolutionImageRegistrationMethod : public ProcessObject 
00067 {
00068 public:
00070   typedef MultiResolutionImageRegistrationMethod  Self;
00071   typedef ProcessObject  Superclass;
00072   typedef SmartPointer<Self>   Pointer;
00073   typedef SmartPointer<const Self>  ConstPointer;
00074 
00076   itkNewMacro(Self);
00077   
00079   itkTypeMacro(MultiResolutionImageRegistrationMethod, ProcessObject);
00080 
00082   typedef          TFixedImage                     FixedImageType;
00083   typedef typename FixedImageType::ConstPointer    FixedImageConstPointer;
00084   typedef typename FixedImageType::RegionType      FixedImageRegionType;
00085 
00087   typedef          TMovingImage                    MovingImageType;
00088   typedef typename MovingImageType::ConstPointer   MovingImageConstPointer;
00089 
00091   typedef ImageToImageMetric< FixedImageType,
00092                               MovingImageType >    MetricType;
00093   typedef typename MetricType::Pointer             MetricPointer;
00094 
00096   typedef typename MetricType::TransformType       TransformType;
00097   typedef typename TransformType::Pointer          TransformPointer;
00098 
00100   typedef typename MetricType::InterpolatorType    InterpolatorType;
00101   typedef typename InterpolatorType::Pointer       InterpolatorPointer;
00102 
00104   typedef SingleValuedNonLinearOptimizer           OptimizerType;
00105 
00107   typedef MultiResolutionPyramidImageFilter< FixedImageType,
00108                                              FixedImageType >
00109   FixedImagePyramidType;
00110   typedef typename FixedImagePyramidType::Pointer  FixedImagePyramidPointer;
00111 
00113   typedef MultiResolutionPyramidImageFilter< MovingImageType,
00114                                              MovingImageType >
00115   MovingImagePyramidType;
00116   typedef typename MovingImagePyramidType::Pointer MovingImagePyramidPointer;
00117 
00120   typedef  typename MetricType::TransformParametersType    ParametersType;
00121 
00123   void StartRegistration();
00124 
00126   void StopRegistration();
00127 
00129   itkSetConstObjectMacro( FixedImage, FixedImageType );
00130   itkGetConstObjectMacro( FixedImage, FixedImageType ); 
00131 
00133   itkSetConstObjectMacro( MovingImage, MovingImageType );
00134   itkGetConstObjectMacro( MovingImage, MovingImageType );
00135 
00137   itkSetObjectMacro( Optimizer,  OptimizerType );
00138   itkGetObjectMacro( Optimizer,  OptimizerType );
00139 
00141   itkSetObjectMacro( Metric, MetricType );
00142   itkGetObjectMacro( Metric, MetricType );
00143 
00145   itkSetMacro( FixedImageRegion, FixedImageRegionType );
00146   itkGetConstReferenceMacro( FixedImageRegion, FixedImageRegionType );
00147 
00149   itkSetObjectMacro( Transform, TransformType );
00150   itkGetObjectMacro( Transform, TransformType );
00151 
00153   itkSetObjectMacro( Interpolator, InterpolatorType );
00154   itkGetObjectMacro( Interpolator, InterpolatorType );
00155 
00157   itkSetObjectMacro( FixedImagePyramid, FixedImagePyramidType );
00158   itkGetObjectMacro( FixedImagePyramid, FixedImagePyramidType ); 
00159 
00161   itkSetObjectMacro( MovingImagePyramid, MovingImagePyramidType );
00162   itkGetObjectMacro( MovingImagePyramid, MovingImagePyramidType );
00163 
00165   itkSetClampMacro( NumberOfLevels, unsigned long, 1,
00166                     NumericTraits<unsigned long>::max() );
00167   itkGetMacro( NumberOfLevels, unsigned long );
00168 
00170   itkGetMacro( CurrentLevel, unsigned long );
00171 
00173   itkSetMacro( InitialTransformParameters, ParametersType );
00174   itkGetConstReferenceMacro( InitialTransformParameters, ParametersType );
00175 
00179   itkSetMacro( InitialTransformParametersOfNextLevel, ParametersType );
00180   itkGetConstReferenceMacro( InitialTransformParametersOfNextLevel, ParametersType );
00181 
00184   itkGetConstReferenceMacro( LastTransformParameters, ParametersType );  
00185 
00186 protected:
00187   MultiResolutionImageRegistrationMethod();
00188   virtual ~MultiResolutionImageRegistrationMethod() {};
00189   void PrintSelf(std::ostream& os, Indent indent) const;
00190 
00195   void Initialize() throw (ExceptionObject);
00196 
00198   void PreparePyramids( void );
00199 
00201   itkSetMacro( CurrentLevel, unsigned long );
00202 
00203 private:
00204   MultiResolutionImageRegistrationMethod(const Self&); //purposely not implemented
00205   void operator=(const Self&); //purposely not implemented
00206   
00207   MetricPointer                    m_Metric;
00208   OptimizerType::Pointer           m_Optimizer;
00209 
00210   MovingImageConstPointer          m_MovingImage;
00211   FixedImageConstPointer           m_FixedImage;
00212 
00213   TransformPointer                 m_Transform;
00214   InterpolatorPointer              m_Interpolator;
00215 
00216   MovingImagePyramidPointer        m_MovingImagePyramid;
00217   FixedImagePyramidPointer         m_FixedImagePyramid;
00218 
00219   ParametersType                   m_InitialTransformParameters;
00220   ParametersType                   m_InitialTransformParametersOfNextLevel;
00221   ParametersType                   m_LastTransformParameters;
00222 
00223   FixedImageRegionType               m_FixedImageRegion;
00224   std::vector<FixedImageRegionType>  m_FixedImageRegionPyramid;
00225 
00226   unsigned long                    m_NumberOfLevels;
00227   unsigned long                    m_CurrentLevel;
00228 
00229   bool                             m_Stop;
00230   
00231 };
00232 
00233 
00234 } // end namespace itk
00235 
00236 
00237 #ifndef ITK_MANUAL_INSTANTIATION
00238 #include "itkMultiResolutionImageRegistrationMethod.txx"
00239 #endif
00240 
00241 #endif
00242 
00243 
00244 

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