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: 2002/09/17 02:36:50 $
00007   Version:   $Revision: 1.4 $
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 __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::Pointer         FixedImageConstPointer;
00084   typedef typename FixedImageType::RegionType      FixedImageRegionType;
00085 
00087   typedef          TMovingImage                    MovingImageType;
00088   typedef typename MovingImageType::Pointer        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   itkSetObjectMacro( FixedImage, FixedImageType );
00130   itkGetObjectMacro( FixedImage, FixedImageType ); 
00131 
00133   itkSetObjectMacro( MovingImage, MovingImageType );
00134   itkGetObjectMacro( 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 
00169   itkGetMacro( CurrentLevel, unsigned long );
00170 
00172   itkSetMacro( InitialTransformParameters, ParametersType );
00173   itkGetConstReferenceMacro( InitialTransformParameters, ParametersType );
00174 
00178   itkSetMacro( InitialTransformParametersOfNextLevel, ParametersType );
00179   itkGetConstReferenceMacro( InitialTransformParametersOfNextLevel, ParametersType );
00180 
00183   itkGetConstReferenceMacro( LastTransformParameters, ParametersType );  
00184 
00185 protected:
00186   MultiResolutionImageRegistrationMethod();
00187   virtual ~MultiResolutionImageRegistrationMethod() {};
00188   void PrintSelf(std::ostream& os, Indent indent) const;
00189 
00194   void Initialize() throw (ExceptionObject);
00195 
00197   void PreparePyramids( void );
00198   
00199 private:
00200   MultiResolutionImageRegistrationMethod(const Self&); //purposely not implemented
00201   void operator=(const Self&); //purposely not implemented
00202   
00203   MetricPointer                    m_Metric;
00204   OptimizerType::Pointer           m_Optimizer;
00205 
00206   MovingImageConstPointer          m_MovingImage;
00207   FixedImageConstPointer           m_FixedImage;
00208 
00209   TransformPointer                 m_Transform;
00210   InterpolatorPointer              m_Interpolator;
00211 
00212   MovingImagePyramidPointer        m_MovingImagePyramid;
00213   FixedImagePyramidPointer         m_FixedImagePyramid;
00214 
00215   ParametersType                   m_InitialTransformParameters;
00216   ParametersType                   m_InitialTransformParametersOfNextLevel;
00217   ParametersType                   m_LastTransformParameters;
00218 
00219   FixedImageRegionType               m_FixedImageRegion;
00220   std::vector<FixedImageRegionType>  m_FixedImageRegionPyramid;
00221 
00222   unsigned long                    m_NumberOfLevels;
00223   unsigned long                    m_CurrentLevel;
00224 
00225   bool                             m_Stop;
00226   
00227 };
00228 
00229 
00230 } // end namespace itk
00231 
00232 
00233 #ifndef ITK_MANUAL_INSTANTIATION
00234 #include "itkMultiResolutionImageRegistrationMethod.txx"
00235 #endif
00236 
00237 #endif
00238 
00239 
00240 

Generated at Wed Mar 12 01:13:07 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000