00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkCorrelationCoefficientHistogramImageToImageMetric_h
00018 #define __itkCorrelationCoefficientHistogramImageToImageMetric_h
00019
00020 #include "itkHistogramImageToImageMetric.h"
00021
00022 namespace itk
00023 {
00035 template <class TFixedImage, class TMovingImage>
00036 class ITK_EXPORT CorrelationCoefficientHistogramImageToImageMetric :
00037 public HistogramImageToImageMetric<TFixedImage, TMovingImage>
00038 {
00039 public:
00041 typedef CorrelationCoefficientHistogramImageToImageMetric Self;
00042 typedef HistogramImageToImageMetric<TFixedImage, TMovingImage> Superclass;
00043 typedef SmartPointer<Self> Pointer;
00044 typedef SmartPointer<const Self> ConstPointer;
00045
00047 itkNewMacro(Self);
00048
00050 itkTypeMacro(CorrelationCoefficientHistogramImageToImageMetric,
00051 HistogramImageToImageMetric);
00052
00054 typedef typename Superclass::RealType RealType;
00055 typedef typename Superclass::TransformType TransformType;
00056 typedef typename Superclass::TransformPointer TransformPointer;
00057 typedef typename Superclass::TransformParametersType TransformParametersType;
00058 typedef typename Superclass::TransformJacobianType TransformJacobianType;
00059 typedef typename Superclass::GradientPixelType GradientPixelType;
00060
00061 typedef typename Superclass::MeasureType MeasureType;
00062 typedef typename Superclass::DerivativeType DerivativeType;
00063 typedef typename Superclass::FixedImageType FixedImageType;
00064 typedef typename Superclass::MovingImageType MovingImageType;
00065 typedef typename Superclass::FixedImageConstPointer FixedImageConstPointer;
00066 typedef typename Superclass::MovingImageConstPointer MovingImageConstPointer;
00067
00068 typedef typename Superclass::HistogramType HistogramType;
00069 typedef typename HistogramType::FrequencyType HistogramFrequencyType;
00070 typedef typename HistogramType::Iterator HistogramIteratorType;
00071 typedef typename HistogramType::MeasurementVectorType
00072 HistogramMeasurementVectorType;
00073
00074 protected:
00077 CorrelationCoefficientHistogramImageToImageMetric(){}
00078 virtual ~CorrelationCoefficientHistogramImageToImageMetric(){}
00079
00081 virtual MeasureType EvaluateMeasure(HistogramType& histogram) const;
00082
00083 private:
00085 MeasureType MeanX(HistogramType& histogram) const;
00086
00088 MeasureType MeanY(HistogramType& histogram) const;
00089
00091 MeasureType VarianceX(HistogramType& histogram) const;
00092
00094 MeasureType VarianceY(HistogramType& histogram) const;
00095
00097 MeasureType Covariance(HistogramType& histogram) const;
00098
00099
00100 CorrelationCoefficientHistogramImageToImageMetric(Self const&);
00101 void operator=(Self const&);
00102 };
00103
00104 }
00105
00106 #ifndef ITK_MANUAL_INSTANTIATION
00107 #include "itkCorrelationCoefficientHistogramImageToImageMetric.txx"
00108 #endif
00109
00110 #endif // __itkCorrelationCoefficientHistogramImageToImageMetric_h