00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkNormalizedCorrelationImageToImageMetric_h
00018 #define __itkNormalizedCorrelationImageToImageMetric_h
00019
00020 #include "itkImageToImageMetric.h"
00021 #include "itkCovariantVector.h"
00022 #include "itkPoint.h"
00023
00024
00025 namespace itk
00026 {
00041 template < class TFixedImage, class TMovingImage >
00042 class ITK_EXPORT NormalizedCorrelationImageToImageMetric :
00043 public ImageToImageMetric< TFixedImage, TMovingImage>
00044 {
00045 public:
00046
00048 typedef NormalizedCorrelationImageToImageMetric Self;
00049 typedef ImageToImageMetric<TFixedImage, TMovingImage > Superclass;
00050
00051 typedef SmartPointer<Self> Pointer;
00052 typedef SmartPointer<const Self> ConstPointer;
00053
00055 itkNewMacro(Self);
00056
00058 itkTypeMacro(NormalizedCorrelationImageToImageMetric, Object);
00059
00060
00062 typedef typename Superclass::RealType RealType;
00063 typedef typename Superclass::TransformType TransformType;
00064 typedef typename Superclass::TransformPointer TransformPointer;
00065 typedef typename Superclass::TransformParametersType TransformParametersType;
00066 typedef typename Superclass::TransformJacobianType TransformJacobianType;
00067 typedef typename Superclass::GradientPixelType GradientPixelType;
00068 typedef typename Superclass::OutputPointType OutputPointType;
00069 typedef typename Superclass::InputPointType InputPointType;
00070
00071 typedef typename Superclass::MeasureType MeasureType;
00072 typedef typename Superclass::DerivativeType DerivativeType;
00073 typedef typename Superclass::FixedImageType FixedImageType;
00074 typedef typename Superclass::MovingImageType MovingImageType;
00075 typedef typename Superclass::FixedImageConstPointer FixedImageConstPointer;
00076 typedef typename Superclass::MovingImageConstPointer MovingImageConstPointer;
00077
00078
00080 void GetDerivative( const TransformParametersType & parameters,
00081 DerivativeType & Derivative ) const;
00082
00084 MeasureType GetValue( const TransformParametersType & parameters ) const;
00085
00087 void GetValueAndDerivative( const TransformParametersType & parameters,
00088 MeasureType& Value, DerivativeType& Derivative ) const;
00089
00094 itkSetMacro( SubtractMean, bool );
00095 itkGetConstReferenceMacro( SubtractMean, bool );
00096 itkBooleanMacro( SubtractMean );
00098
00099 protected:
00100 NormalizedCorrelationImageToImageMetric();
00101 virtual ~NormalizedCorrelationImageToImageMetric() {};
00102 void PrintSelf(std::ostream& os, Indent indent) const;
00103
00104 private:
00105 NormalizedCorrelationImageToImageMetric(const Self&);
00106 void operator=(const Self&);
00107
00108 bool m_SubtractMean;
00109
00110 };
00111
00112 }
00113
00114 #ifndef ITK_MANUAL_INSTANTIATION
00115 #include "itkNormalizedCorrelationImageToImageMetric.txx"
00116 #endif
00117
00118 #endif
00119
00120
00121
00122