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 typedef SmartPointer<Self> Pointer;
00051 typedef SmartPointer<const Self> ConstPointer;
00052
00054 itkNewMacro(Self);
00055
00057 itkTypeMacro(NormalizedCorrelationImageToImageMetric, Object);
00058
00059
00061 typedef typename Superclass::RealType RealType;
00062 typedef typename Superclass::TransformType TransformType;
00063 typedef typename Superclass::TransformPointer TransformPointer;
00064 typedef typename Superclass::TransformParametersType TransformParametersType;
00065 typedef typename Superclass::TransformJacobianType TransformJacobianType;
00066 typedef typename Superclass::GradientPixelType GradientPixelType;
00067 typedef typename Superclass::OutputPointType OutputPointType;
00068 typedef typename Superclass::InputPointType InputPointType;
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
00093 itkSetMacro( SubtractMean, bool );
00094 itkGetConstReferenceMacro( SubtractMean, bool );
00095 itkBooleanMacro( SubtractMean );
00097
00098 protected:
00099 NormalizedCorrelationImageToImageMetric();
00100 virtual ~NormalizedCorrelationImageToImageMetric() {};
00101 void PrintSelf(std::ostream& os, Indent indent) const;
00102
00103 private:
00104 NormalizedCorrelationImageToImageMetric(const Self&);
00105 void operator=(const Self&);
00106
00107 bool m_SubtractMean;
00108
00109 };
00110
00111 }
00112
00113 #ifndef ITK_MANUAL_INSTANTIATION
00114 #include "itkNormalizedCorrelationImageToImageMetric.txx"
00115 #endif
00116
00117 #endif
00118