itkMeanSquaresImageToImageMetric.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkMeanSquaresImageToImageMetric_h
00018 #define __itkMeanSquaresImageToImageMetric_h
00019
00020
00021
00022
00023 #include "itkConfigure.h"
00024
00025 #ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
00026 #include "itkOptMeanSquaresImageToImageMetric.h"
00027 #else
00028
00029 #include "itkImageToImageMetric.h"
00030 #include "itkCovariantVector.h"
00031 #include "itkPoint.h"
00032
00033
00034 namespace itk
00035 {
00051 template < class TFixedImage, class TMovingImage >
00052 class ITK_EXPORT MeanSquaresImageToImageMetric :
00053 public ImageToImageMetric< TFixedImage, TMovingImage>
00054 {
00055 public:
00056
00058 typedef MeanSquaresImageToImageMetric Self;
00059 typedef ImageToImageMetric<TFixedImage, TMovingImage > Superclass;
00060 typedef SmartPointer<Self> Pointer;
00061 typedef SmartPointer<const Self> ConstPointer;
00062
00064 itkNewMacro(Self);
00065
00067 itkTypeMacro(MeanSquaresImageToImageMetric, ImageToImageMetric);
00068
00069
00071 typedef typename Superclass::RealType RealType;
00072 typedef typename Superclass::TransformType TransformType;
00073 typedef typename Superclass::TransformPointer TransformPointer;
00074 typedef typename Superclass::TransformParametersType TransformParametersType;
00075 typedef typename Superclass::TransformJacobianType TransformJacobianType;
00076 typedef typename Superclass::GradientPixelType GradientPixelType;
00077 typedef typename Superclass::GradientImageType GradientImageType;
00078 typedef typename Superclass::InputPointType InputPointType;
00079 typedef typename Superclass::OutputPointType OutputPointType;
00080
00081 typedef typename Superclass::MeasureType MeasureType;
00082 typedef typename Superclass::DerivativeType DerivativeType;
00083 typedef typename Superclass::FixedImageType FixedImageType;
00084 typedef typename Superclass::MovingImageType MovingImageType;
00085 typedef typename Superclass::FixedImageConstPointer FixedImageConstPointer;
00086 typedef typename Superclass::MovingImageConstPointer MovingImageConstPointer;
00087
00088
00090 void GetDerivative( const TransformParametersType & parameters,
00091 DerivativeType & derivative ) const;
00092
00094 MeasureType GetValue( const TransformParametersType & parameters ) const;
00095
00097 void GetValueAndDerivative( const TransformParametersType & parameters,
00098 MeasureType& Value, DerivativeType& Derivative ) const;
00099
00100 #ifdef ITK_USE_CONCEPT_CHECKING
00101
00102 itkConceptMacro(MovingPixelTypeHasNumericTraitsCheck,
00103 (Concept::HasNumericTraits<typename TMovingImage::PixelType>));
00104 itkConceptMacro(MovingRealTypeAdditivieOperatorsCheck,
00105 (Concept::AdditiveOperators<
00106 typename NumericTraits<typename TMovingImage::PixelType>::RealType>));
00107 itkConceptMacro(MovingRealTypeMultiplyOperatorCheck,
00108 (Concept::MultiplyOperator<
00109 typename NumericTraits<typename TMovingImage::PixelType>::RealType>));
00111
00113 #endif
00114
00115 protected:
00116 MeanSquaresImageToImageMetric();
00117 virtual ~MeanSquaresImageToImageMetric() {};
00118
00119 private:
00120 MeanSquaresImageToImageMetric(const Self&);
00121 void operator=(const Self&);
00122
00123 };
00124
00125 }
00126
00127 #ifndef ITK_MANUAL_INSTANTIATION
00128 #include "itkMeanSquaresImageToImageMetric.txx"
00129 #endif
00130
00131 #endif
00132
00133 #endif
00134