go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxGradientDifferenceMetric.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 #ifndef __elxGradientDifferenceMetric_H__
00015 #define __elxGradientDifferenceMetric_H__
00016 
00017 #include "elxIncludes.h"
00018 #include "itkGradientDifferenceImageToImageMetric2.h"
00019 
00020 #include "elxTimer.h"
00021 
00022 namespace elastix
00023 {
00024 using namespace itk;
00025 
00035 template <class TElastix >
00036 class GradientDifferenceMetric:
00037 public
00038 GradientDifferenceImageToImageMetric<
00039   ITK_TYPENAME MetricBase<TElastix>::FixedImageType,
00040   ITK_TYPENAME MetricBase<TElastix>::MovingImageType >,
00041   public MetricBase<TElastix>
00042 {
00043 public:
00044 
00046   typedef GradientDifferenceMetric                             Self;
00047   typedef GradientDifferenceImageToImageMetric<
00048     typename MetricBase<TElastix>::FixedImageType,
00049     typename MetricBase<TElastix>::MovingImageType >    Superclass1;
00050   typedef MetricBase<TElastix>                          Superclass2;
00051   typedef SmartPointer<Self>                            Pointer;
00052   typedef SmartPointer<const Self>                      ConstPointer;
00053 
00055   itkNewMacro( Self );
00056 
00058   itkTypeMacro( GradientDifferenceMetric, GradientDifferenceImageToImageMetric );
00059 
00064   elxClassNameMacro( "GradientDifference" );
00065 
00067   typedef typename 
00068     Superclass1::CoordinateRepresentationType              CoordinateRepresentationType;
00069   typedef typename Superclass1::MovingImageType            MovingImageType;
00070   typedef typename Superclass1::MovingImagePixelType       MovingImagePixelType;
00071   typedef typename Superclass1::MovingImageConstPointer    MovingImageConstPointer;
00072   typedef typename Superclass1::FixedImageType             FixedImageType;
00073   typedef typename Superclass1::FixedImageConstPointer     FixedImageConstPointer;
00074   typedef typename Superclass1::FixedImageRegionType       FixedImageRegionType;
00075   typedef typename Superclass1::TransformType              TransformType;
00076   typedef typename Superclass1::TransformPointer           TransformPointer;
00077   typedef typename Superclass1::InputPointType             InputPointType;
00078   typedef typename Superclass1::OutputPointType            OutputPointType;
00079   typedef typename Superclass1::TransformParametersType    TransformParametersType;
00080   typedef typename Superclass1::TransformJacobianType      TransformJacobianType;
00081   typedef typename Superclass1::InterpolatorType           InterpolatorType;
00082   typedef typename Superclass1::InterpolatorPointer        InterpolatorPointer;
00083   typedef typename Superclass1::RealType                   RealType;
00084   typedef typename Superclass1::GradientPixelType          GradientPixelType;
00085   typedef typename Superclass1::GradientImageType          GradientImageType;
00086   typedef typename Superclass1::GradientImagePointer       GradientImagePointer;
00087   typedef typename Superclass1::GradientImageFilterType    GradientImageFilterType;
00088   typedef typename Superclass1::GradientImageFilterPointer GradientImageFilterPointer;
00089   typedef typename Superclass1::FixedImageMaskType         FixedImageMaskType;
00090   typedef typename Superclass1::FixedImageMaskPointer      FixedImageMaskPointer;
00091   typedef typename Superclass1::MovingImageMaskType        MovingImageMaskType;
00092   typedef typename Superclass1::MovingImageMaskPointer     MovingImageMaskPointer;
00093   typedef typename Superclass1::MeasureType                MeasureType;
00094   typedef typename Superclass1::DerivativeType             DerivativeType;
00095   typedef typename Superclass1::ParametersType             ParametersType;
00096   typedef typename Superclass1::FixedImagePixelType        FixedImagePixelType;
00097   typedef typename Superclass1::MovingImageRegionType      MovingImageRegionType;
00098   typedef typename Superclass1::ImageSamplerType           ImageSamplerType;
00099   typedef typename Superclass1::ImageSamplerPointer        ImageSamplerPointer;
00100   typedef typename Superclass1::ImageSampleContainerType   ImageSampleContainerType;
00101   typedef typename
00102     Superclass1::ImageSampleContainerPointer               ImageSampleContainerPointer;
00103   typedef typename Superclass1::FixedImageLimiterType      FixedImageLimiterType;
00104   typedef typename Superclass1::MovingImageLimiterType     MovingImageLimiterType;
00105   typedef typename
00106     Superclass1::FixedImageLimiterOutputType               FixedImageLimiterOutputType;
00107   typedef typename
00108     Superclass1::MovingImageLimiterOutputType              MovingImageLimiterOutputType;
00109   typedef typename
00110     Superclass1::MovingImageDerivativeScalesType           MovingImageDerivativeScalesType;
00111 
00113   itkStaticConstMacro( FixedImageDimension, unsigned int,
00114     FixedImageType::ImageDimension );
00115 
00117   itkStaticConstMacro( MovingImageDimension, unsigned int,
00118     MovingImageType::ImageDimension );
00119 
00121   typedef typename Superclass2::ElastixType               ElastixType;
00122   typedef typename Superclass2::ElastixPointer            ElastixPointer;
00123   typedef typename Superclass2::ConfigurationType         ConfigurationType;
00124   typedef typename Superclass2::ConfigurationPointer      ConfigurationPointer;
00125   typedef typename Superclass2::RegistrationType          RegistrationType;
00126   typedef typename Superclass2::RegistrationPointer       RegistrationPointer;
00127   typedef typename Superclass2::ITKBaseType               ITKBaseType;
00128 
00130   typedef tmr::Timer          TimerType;
00131   
00133   typedef TimerType::Pointer  TimerPointer;
00134 
00138   virtual void Initialize(void) throw (ExceptionObject);
00139 
00146   virtual void BeforeRegistration( void );
00147 
00148   virtual void BeforeEachResolution( void );
00149 
00150 protected:
00151 
00153   GradientDifferenceMetric(){};
00154   
00156   virtual ~GradientDifferenceMetric() {}
00157 
00158 private:
00159 
00161   GradientDifferenceMetric( const Self& ); // purposely not implemented
00163   void operator=( const Self& );              // purposely not implemented
00164 
00165 }; // end class GradientDifferenceMetric
00166 
00167 
00168 } // end namespace elastix
00169 
00170 
00171 #ifndef ITK_MANUAL_INSTANTIATION
00172 #include "elxGradientDifferenceMetric.hxx"
00173 #endif
00174 
00175 #endif // end #ifndef __elxGradientDifferenceMetric_H__


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