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


Generated on 24-05-2012 for elastix by doxygen 1.7.6.1 elastix logo