go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxAdvancedMattesMutualInformationMetric.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 __elxAdvancedMattesMutualInformationMetric_H__
00016 #define __elxAdvancedMattesMutualInformationMetric_H__
00017 
00018 #include "elxIncludes.h"
00019 #include "itkParzenWindowMutualInformationImageToImageMetric.h"
00020 
00021 #include "elxTimer.h"
00022 
00023 namespace elastix
00024 {
00025 using namespace itk;
00026 
00099   template <class TElastix >
00100     class AdvancedMattesMutualInformationMetric :
00101     public
00102       ParzenWindowMutualInformationImageToImageMetric<
00103         ITK_TYPENAME MetricBase<TElastix>::FixedImageType,
00104         ITK_TYPENAME MetricBase<TElastix>::MovingImageType >,
00105     public MetricBase<TElastix>
00106   {
00107   public:
00108 
00110     typedef AdvancedMattesMutualInformationMetric         Self;
00111     typedef ParzenWindowMutualInformationImageToImageMetric<
00112       typename MetricBase<TElastix>::FixedImageType,
00113       typename MetricBase<TElastix>::MovingImageType >    Superclass1;
00114     typedef MetricBase<TElastix>                          Superclass2;
00115     typedef SmartPointer<Self>                            Pointer;
00116     typedef SmartPointer<const Self>                      ConstPointer;
00117 
00119     itkNewMacro( Self );
00120 
00122     itkTypeMacro( AdvancedMattesMutualInformationMetric,
00123       ParzenWindowMutualInformationImageToImageMetric );
00124 
00129     elxClassNameMacro( "AdvancedMattesMutualInformation" );
00130 
00132     typedef typename
00133       Superclass1::CoordinateRepresentationType              CoordinateRepresentationType;
00134     typedef typename Superclass1::MovingImageType            MovingImageType;
00135     typedef typename Superclass1::MovingImagePixelType       MovingImagePixelType;
00136     typedef typename Superclass1::MovingImageConstPointer    MovingImageConstPointer;
00137     typedef typename Superclass1::FixedImageType             FixedImageType;
00138     typedef typename Superclass1::FixedImageConstPointer     FixedImageConstPointer;
00139     typedef typename Superclass1::FixedImageRegionType       FixedImageRegionType;
00140     typedef typename Superclass1::TransformType              TransformType;
00141     typedef typename Superclass1::TransformPointer           TransformPointer;
00142     typedef typename Superclass1::InputPointType             InputPointType;
00143     typedef typename Superclass1::OutputPointType            OutputPointType;
00144     typedef typename Superclass1::TransformParametersType    TransformParametersType;
00145     typedef typename Superclass1::TransformJacobianType      TransformJacobianType;
00146     typedef typename Superclass1::InterpolatorType           InterpolatorType;
00147     typedef typename Superclass1::InterpolatorPointer        InterpolatorPointer;
00148     typedef typename Superclass1::RealType                   RealType;
00149     typedef typename Superclass1::GradientPixelType          GradientPixelType;
00150     typedef typename Superclass1::GradientImageType          GradientImageType;
00151     typedef typename Superclass1::GradientImagePointer       GradientImagePointer;
00152     typedef typename Superclass1::GradientImageFilterType    GradientImageFilterType;
00153     typedef typename Superclass1::GradientImageFilterPointer GradientImageFilterPointer;
00154     typedef typename Superclass1::FixedImageMaskType         FixedImageMaskType;
00155     typedef typename Superclass1::FixedImageMaskPointer      FixedImageMaskPointer;
00156     typedef typename Superclass1::MovingImageMaskType        MovingImageMaskType;
00157     typedef typename Superclass1::MovingImageMaskPointer     MovingImageMaskPointer;
00158     typedef typename Superclass1::MeasureType                MeasureType;
00159     typedef typename Superclass1::DerivativeType             DerivativeType;
00160     typedef typename Superclass1::ParametersType             ParametersType;
00161     typedef typename Superclass1::FixedImagePixelType        FixedImagePixelType;
00162     typedef typename Superclass1::MovingImageRegionType      MovingImageRegionType;
00163     typedef typename Superclass1::ImageSamplerType           ImageSamplerType;
00164     typedef typename Superclass1::ImageSamplerPointer        ImageSamplerPointer;
00165     typedef typename Superclass1::ImageSampleContainerType   ImageSampleContainerType;
00166     typedef typename
00167       Superclass1::ImageSampleContainerPointer               ImageSampleContainerPointer;
00168     typedef typename Superclass1::FixedImageLimiterType      FixedImageLimiterType;
00169     typedef typename Superclass1::MovingImageLimiterType     MovingImageLimiterType;
00170     typedef typename
00171       Superclass1::FixedImageLimiterOutputType               FixedImageLimiterOutputType;
00172     typedef typename
00173       Superclass1::MovingImageLimiterOutputType              MovingImageLimiterOutputType;
00174     typedef typename
00175       Superclass1::MovingImageDerivativeScalesType           MovingImageDerivativeScalesType;
00176 
00178     itkStaticConstMacro( FixedImageDimension, unsigned int,
00179       FixedImageType::ImageDimension );
00180 
00182     itkStaticConstMacro( MovingImageDimension, unsigned int,
00183       MovingImageType::ImageDimension );
00184 
00186     typedef typename Superclass2::ElastixType               ElastixType;
00187     typedef typename Superclass2::ElastixPointer            ElastixPointer;
00188     typedef typename Superclass2::ConfigurationType         ConfigurationType;
00189     typedef typename Superclass2::ConfigurationPointer      ConfigurationPointer;
00190     typedef typename Superclass2::RegistrationType          RegistrationType;
00191     typedef typename Superclass2::RegistrationPointer       RegistrationPointer;
00192     typedef typename Superclass2::ITKBaseType               ITKBaseType;
00193 
00195     typedef tmr::Timer          TimerType;
00197     typedef TimerType::Pointer  TimerPointer;
00198 
00204     virtual void BeforeEachResolution( void );
00205 
00209     virtual void AfterEachIteration( void );
00210 
00213     virtual void Initialize(void) throw (ExceptionObject);
00214 
00216     itkSetMacro( Param_c, double );
00217     itkGetConstMacro( Param_c, double );
00218 
00220     itkSetMacro( Param_gamma, double );
00221     itkGetConstMacro( Param_gamma, double );
00222 
00224     itkSetMacro( CurrentIteration, unsigned int );
00225     itkGetConstMacro( CurrentIteration, unsigned int );
00226 
00227   protected:
00228 
00230     AdvancedMattesMutualInformationMetric();
00231 
00233     virtual ~AdvancedMattesMutualInformationMetric() {};
00234 
00235     unsigned long                 m_CurrentIteration;
00236 
00238     double Compute_c( unsigned long k ) const;
00239 
00240   private:
00241 
00243     AdvancedMattesMutualInformationMetric( const Self& ); // purposely not implemented
00245     void operator=( const Self& );                // purposely not implemented
00246 
00247     double                        m_Param_c;
00248     double                        m_Param_gamma;
00249 
00250 
00251 
00252   }; // end class AdvancedMattesMutualInformationMetric
00253 
00254 
00255 } // end namespace elastix
00256 
00257 
00258 #ifndef ITK_MANUAL_INSTANTIATION
00259 #include "elxAdvancedMattesMutualInformationMetric.hxx"
00260 #endif
00261 
00262 #endif // end #ifndef __elxAdvancedMattesMutualInformationMetric_H__


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