go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxMultiMetricMultiResolutionRegistration.h
Go to the documentation of this file.
00001 /*======================================================================
00002 
00003   This file is part of the elastix software.
00004 
00005   Copyright (c) University Medical Center Utrecht. All rights reserved.
00006   See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
00007   details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE. See the above copyright notices for more information.
00012 
00013 ======================================================================*/
00014 
00015 #ifndef __elxMultiMetricMultiResolutionRegistration_H__
00016 #define __elxMultiMetricMultiResolutionRegistration_H__
00017 
00018 #include "itkMultiMetricMultiResolutionImageRegistrationMethod.h"
00019 
00020 #include "elxIncludes.h"
00021 
00022 namespace elastix
00023 {
00024 using namespace itk;
00025 
00094 template <class TElastix>
00095 class MultiMetricMultiResolutionRegistration
00096   : public
00097   MultiMetricMultiResolutionImageRegistrationMethod<
00098   ITK_TYPENAME RegistrationBase<TElastix>::FixedImageType,
00099   ITK_TYPENAME RegistrationBase<TElastix>::MovingImageType >,
00100   public RegistrationBase<TElastix>
00101 {
00102 public:
00103 
00105   typedef MultiMetricMultiResolutionRegistration      Self;
00106 
00108   typedef MultiMetricMultiResolutionImageRegistrationMethod<
00109     typename RegistrationBase<TElastix>::FixedImageType,
00110     typename RegistrationBase<TElastix>::MovingImageType >
00111                                                       Superclass1;
00112   typedef RegistrationBase<TElastix>                  Superclass2;
00113 
00115   typedef SmartPointer<Self>                          Pointer;
00116   typedef SmartPointer<const Self>                    ConstPointer;
00117 
00119   itkNewMacro( Self );
00120 
00122   itkTypeMacro( MultiMetricMultiResolutionRegistration,
00123     MultiMetricMultiResolutionImageRegistrationMethod );
00124 
00129   elxClassNameMacro( "MultiMetricMultiResolutionRegistration" );
00130 
00134   typedef typename Superclass1::FixedImageType            FixedImageType;
00135   typedef typename Superclass1::FixedImageConstPointer    FixedImageConstPointer;
00136   typedef typename Superclass1::FixedImageRegionType      FixedImageRegionType;
00137 
00139   typedef typename Superclass1::MovingImageType           MovingImageType;
00140   typedef typename Superclass1::MovingImageConstPointer   MovingImageConstPointer;
00141 
00143   typedef typename Superclass1::MetricType                MetricType;
00144   typedef typename Superclass1::MetricPointer             MetricPointer;
00145 
00147   typedef typename Superclass1::TransformType             TransformType;
00148   typedef typename Superclass1::TransformPointer          TransformPointer;
00149 
00151   typedef typename Superclass1::InterpolatorType          InterpolatorType;
00152   typedef typename Superclass1::InterpolatorPointer       InterpolatorPointer;
00153 
00155   typedef typename Superclass1::OptimizerType             OptimizerType;
00156   typedef typename Superclass1::OptimizerPointer          OptimizerPointer;
00157 
00159   typedef typename Superclass1::FixedImagePyramidType     FixedImagePyramidType;
00160   typedef typename Superclass1::FixedImagePyramidPointer  FixedImagePyramidPointer;
00161 
00163   typedef typename Superclass1::MovingImagePyramidType    MovingImagePyramidType ;
00164   typedef typename Superclass1::MovingImagePyramidPointer MovingImagePyramidPointer;
00165 
00169   typedef typename Superclass1::ParametersType            ParametersType;
00170 
00172   typedef typename Superclass1::CombinationMetricType     CombinationMetricType;
00173   typedef typename Superclass1::CombinationMetricPointer  CombinationMetricPointer;
00174 
00176   typedef typename Superclass2::ElastixType           ElastixType;
00177   typedef typename Superclass2::ElastixPointer        ElastixPointer;
00178   typedef typename Superclass2::ConfigurationType     ConfigurationType;
00179   typedef typename Superclass2::ConfigurationPointer  ConfigurationPointer;
00180   typedef typename Superclass2::RegistrationType      RegistrationType;
00181   typedef typename Superclass2::RegistrationPointer   RegistrationPointer;
00182   typedef typename Superclass2::ITKBaseType           ITKBaseType;
00183   typedef typename Superclass2::UseMaskErosionArrayType UseMaskErosionArrayType;
00184 
00186   itkStaticConstMacro( FixedImageDimension, unsigned int, Superclass2::FixedImageDimension );
00188   itkStaticConstMacro( MovingImageDimension, unsigned int, Superclass2::MovingImageDimension );
00189 
00196   virtual void BeforeRegistration( void );
00197 
00202   virtual void BeforeEachResolution( void );
00203 
00207   virtual void AfterEachIteration( void );
00208 
00209 protected:
00210 
00212   MultiMetricMultiResolutionRegistration();
00214   virtual ~MultiMetricMultiResolutionRegistration() {};
00215 
00217   typedef tmr::Timer          TimerType;
00219   typedef TimerType::Pointer  TimerPointer;
00220 
00222   typedef typename Superclass2::MaskPixelType                   MaskPixelType;
00223   typedef typename Superclass2::FixedMaskImageType              FixedMaskImageType;
00224   typedef typename Superclass2::MovingMaskImageType             MovingMaskImageType;
00225   typedef typename Superclass2::FixedMaskImagePointer           FixedMaskImagePointer;
00226   typedef typename Superclass2::MovingMaskImagePointer          MovingMaskImagePointer;
00227   typedef typename Superclass2::FixedMaskSpatialObjectType      FixedMaskSpatialObjectType;
00228   typedef typename Superclass2::MovingMaskSpatialObjectType     MovingMaskSpatialObjectType;
00229   typedef typename Superclass2::FixedMaskSpatialObjectPointer   FixedMaskSpatialObjectPointer;
00230   typedef typename Superclass2::MovingMaskSpatialObjectPointer  MovingMaskSpatialObjectPointer;
00231 
00233   void UpdateFixedMasks( unsigned int level );
00234   void UpdateMovingMasks( unsigned int level );
00235 
00237   virtual void SetComponents( void );
00238 
00239   bool m_ShowExactMetricValue;
00240 
00241 private:
00242 
00244   MultiMetricMultiResolutionRegistration( const Self& );  // purposely not implemented
00246   void operator=( const Self& );              // purposely not implemented
00247 
00248 }; // end class MultiMetricMultiResolutionRegistration
00249 
00250 
00251 } // end namespace elastix
00252 
00253 #ifndef ITK_MANUAL_INSTANTIATION
00254 #include "elxMultiMetricMultiResolutionRegistration.hxx"
00255 #endif
00256 
00257 #endif // end #ifndef __elxMultiMetricMultiResolutionRegistration_H__


Generated on 24-10-2011 for elastix by doxygen 1.7.4 elastix logo