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 #include "itkImageToImageMetric.h"
00021 #include "itkCovariantVector.h"
00022 #include "itkPoint.h"
00023
00024
00025 namespace itk
00026 {
00042 template < class TFixedImage, class TMovingImage >
00043 class ITK_EXPORT MeanSquaresImageToImageMetric :
00044 public ImageToImageMetric< TFixedImage, TMovingImage>
00045 {
00046 public:
00047
00049 typedef MeanSquaresImageToImageMetric Self;
00050 typedef ImageToImageMetric<TFixedImage, TMovingImage > Superclass;
00051
00052 typedef SmartPointer<Self> Pointer;
00053 typedef SmartPointer<const Self> ConstPointer;
00054
00056 itkNewMacro(Self);
00057
00059 itkTypeMacro(MeanSquaresImageToImageMetric, ImageToImageMetric);
00060
00061
00063 typedef typename Superclass::RealType RealType;
00064 typedef typename Superclass::TransformType TransformType;
00065 typedef typename Superclass::TransformPointer TransformPointer;
00066 typedef typename Superclass::TransformParametersType TransformParametersType;
00067 typedef typename Superclass::TransformJacobianType TransformJacobianType;
00068 typedef typename Superclass::GradientPixelType GradientPixelType;
00069
00070 typedef typename Superclass::MeasureType MeasureType;
00071 typedef typename Superclass::DerivativeType DerivativeType;
00072 typedef typename Superclass::FixedImageType FixedImageType;
00073 typedef typename Superclass::MovingImageType MovingImageType;
00074 typedef typename Superclass::FixedImageConstPointer FixedImageConstPointer;
00075 typedef typename Superclass::MovingImageConstPointer MovingImageConstPointer;
00076
00077
00079 void GetDerivative( const TransformParametersType & parameters,
00080 DerivativeType & derivative ) const;
00081
00083 MeasureType GetValue( const TransformParametersType & parameters ) const;
00084
00086 void GetValueAndDerivative( const TransformParametersType & parameters,
00087 MeasureType& Value, DerivativeType& Derivative ) const;
00088
00089 #ifdef ITK_USE_CONCEPT_CHECKING
00090
00091 itkConceptMacro(MovingPixelTypeHasNumericTraitsCheck,
00092 (Concept::HasNumericTraits<typename TMovingImage::PixelType>));
00093 itkConceptMacro(MovingRealTypeAdditivieOperatorsCheck,
00094 (Concept::AdditiveOperators<
00095 typename NumericTraits<typename TMovingImage::PixelType>::RealType>));
00096 itkConceptMacro(MovingRealTypeMultiplyOperatorCheck,
00097 (Concept::MultiplyOperator<
00098 typename NumericTraits<typename TMovingImage::PixelType>::RealType>));
00100
00102 #endif
00103
00104 protected:
00105 MeanSquaresImageToImageMetric();
00106 virtual ~MeanSquaresImageToImageMetric() {};
00107
00108 private:
00109 MeanSquaresImageToImageMetric(const Self&);
00110 void operator=(const Self&);
00111
00112 };
00113
00114 }
00115
00116 #ifndef ITK_MANUAL_INSTANTIATION
00117 #include "itkMeanSquaresImageToImageMetric.txx"
00118 #endif
00119
00120 #endif
00121
00122
00123
00124