00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkNormalizedCorrelationImageToImageMetric.h,v $ 00005 Language: C++ 00006 Date: $Date: 2002/06/17 21:19:07 $ 00007 Version: $Revision: 1.20 $ 00008 00009 Copyright (c) 2002 Insight Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 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 { 00042 template < class TFixedImage, class TMovingImage > 00043 class ITK_EXPORT NormalizedCorrelationImageToImageMetric : 00044 public ImageToImageMetric< TFixedImage, TMovingImage> 00045 { 00046 public: 00047 00049 typedef NormalizedCorrelationImageToImageMetric 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(NormalizedCorrelationImageToImageMetric, Object); 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 protected: 00090 NormalizedCorrelationImageToImageMetric(); 00091 virtual ~NormalizedCorrelationImageToImageMetric() {}; 00092 00093 private: 00094 NormalizedCorrelationImageToImageMetric(const Self&); //purposely not implemented 00095 void operator=(const Self&); //purposely not implemented 00096 00097 }; 00098 00099 } // end namespace itk 00100 00101 #ifndef ITK_MANUAL_INSTANTIATION 00102 #include "itkNormalizedCorrelationImageToImageMetric.txx" 00103 #endif 00104 00105 #endif 00106 00107 00108