Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkNormalizedCorrelationImageToImageMetric.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkNormalizedCorrelationImageToImageMetric.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/08/10 00:11:24 $
00007   Version:   $Revision: 1.25 $
00008 
00009   Copyright (c) Insight Software 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 {
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 
00069   typedef typename Superclass::MeasureType              MeasureType;
00070   typedef typename Superclass::DerivativeType           DerivativeType;
00071   typedef typename Superclass::FixedImageType           FixedImageType;
00072   typedef typename Superclass::MovingImageType          MovingImageType;
00073   typedef typename Superclass::FixedImageConstPointer   FixedImageConstPointer;
00074   typedef typename Superclass::MovingImageConstPointer  MovingImageConstPointer;
00075 
00076 
00078   void GetDerivative( const TransformParametersType & parameters,
00079                       DerivativeType & Derivative ) const;
00080 
00082   MeasureType GetValue( const TransformParametersType & parameters ) const;
00083 
00085   void GetValueAndDerivative( const TransformParametersType & parameters,
00086                               MeasureType& Value, DerivativeType& Derivative ) const;
00087 
00092   itkSetMacro( SubtractMean, bool );
00093   itkGetConstReferenceMacro( SubtractMean, bool );
00094   itkBooleanMacro( SubtractMean );
00096 
00097 protected:
00098   NormalizedCorrelationImageToImageMetric();
00099   virtual ~NormalizedCorrelationImageToImageMetric() {};
00100   void PrintSelf(std::ostream& os, Indent indent) const;
00101 
00102 private:
00103   NormalizedCorrelationImageToImageMetric(const Self&); //purposely not implemented
00104   void operator=(const Self&); //purposely not implemented
00105 
00106   bool    m_SubtractMean;
00107 
00108 };
00109 
00110 } // end namespace itk
00111 
00112 #ifndef ITK_MANUAL_INSTANTIATION
00113 #include "itkNormalizedCorrelationImageToImageMetric.txx"
00114 #endif
00115 
00116 #endif
00117 
00118 
00119 
00120 

Generated at Sun Sep 23 13:44:49 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000