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/08/12 13:47:59 $
00007   Version:   $Revision: 1.8 $
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, Object);
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   itkSetMacro( InitialTransformParameters, ParametersType );
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 
00158 private:
00159   ImageRegistrationMethod(const Self&); //purposely not implemented
00160   void operator=(const Self&); //purposely not implemented
00161   
00162   MetricPointer                    m_Metric;
00163   OptimizerType::Pointer           m_Optimizer;
00164 
00165   MovingImageConstPointer          m_MovingImage;
00166   FixedImageConstPointer           m_FixedImage;
00167 
00168   TransformPointer                 m_Transform;
00169   InterpolatorPointer              m_Interpolator;
00170 
00171   ParametersType                   m_InitialTransformParameters;
00172   ParametersType                   m_LastTransformParameters;
00173   
00174   bool                             m_FixedImageRegionDefined;
00175   FixedImageRegionType             m_FixedImageRegion;
00176 
00177 };
00178 
00179 
00180 } // end namespace itk
00181 
00182 
00183 #ifndef ITK_MANUAL_INSTANTIATION
00184 #include "itkImageRegistrationMethod.txx"
00185 #endif
00186 
00187 #endif
00188 
00189 
00190 

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