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

itkMeanSquaresImageToImageMetric.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkMeanSquaresImageToImageMetric.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-02-03 04:05:28 $
00007   Version:   $Revision: 1.31 $
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 __itkMeanSquaresImageToImageMetric_h
00018 #define __itkMeanSquaresImageToImageMetric_h
00019 
00020 // First make sure that the configuration is available.
00021 // This line can be removed once the optimized versions
00022 // gets integrated into the main directories.
00023 #include "itkConfigure.h"
00024 
00025 #ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
00026 #include "itkOptMeanSquaresImageToImageMetric.h"
00027 #else
00028 
00029 #include "itkImageToImageMetric.h"
00030 #include "itkCovariantVector.h"
00031 #include "itkPoint.h"
00032 
00033 
00034 namespace itk
00035 {
00051 template < class TFixedImage, class TMovingImage > 
00052 class ITK_EXPORT MeanSquaresImageToImageMetric : 
00053     public ImageToImageMetric< TFixedImage, TMovingImage>
00054 {
00055 public:
00056 
00058   typedef MeanSquaresImageToImageMetric    Self;
00059   typedef ImageToImageMetric<TFixedImage, TMovingImage >  Superclass;
00060 
00061   typedef SmartPointer<Self>         Pointer;
00062   typedef SmartPointer<const Self>   ConstPointer;
00063 
00065   itkNewMacro(Self);
00066 
00068   itkTypeMacro(MeanSquaresImageToImageMetric, ImageToImageMetric);
00069 
00070  
00072   typedef typename Superclass::RealType                 RealType;
00073   typedef typename Superclass::TransformType            TransformType;
00074   typedef typename Superclass::TransformPointer         TransformPointer;
00075   typedef typename Superclass::TransformParametersType  TransformParametersType;
00076   typedef typename Superclass::TransformJacobianType    TransformJacobianType;
00077   typedef typename Superclass::GradientPixelType        GradientPixelType;
00078   typedef typename Superclass::GradientImageType        GradientImageType;
00079   typedef typename Superclass::InputPointType           InputPointType;
00080   typedef typename Superclass::OutputPointType          OutputPointType;
00081 
00082   typedef typename Superclass::MeasureType              MeasureType;
00083   typedef typename Superclass::DerivativeType           DerivativeType;
00084   typedef typename Superclass::FixedImageType           FixedImageType;
00085   typedef typename Superclass::MovingImageType          MovingImageType;
00086   typedef typename Superclass::FixedImageConstPointer   FixedImageConstPointer;
00087   typedef typename Superclass::MovingImageConstPointer  MovingImageConstPointer;
00088 
00089 
00091   void GetDerivative( const TransformParametersType & parameters,
00092                       DerivativeType & derivative ) const;
00093 
00095   MeasureType GetValue( const TransformParametersType & parameters ) const;
00096 
00098   void GetValueAndDerivative( const TransformParametersType & parameters,
00099                               MeasureType& Value, DerivativeType& Derivative ) const;
00100 
00101 #ifdef ITK_USE_CONCEPT_CHECKING
00102 
00103   itkConceptMacro(MovingPixelTypeHasNumericTraitsCheck,
00104     (Concept::HasNumericTraits<typename TMovingImage::PixelType>));
00105   itkConceptMacro(MovingRealTypeAdditivieOperatorsCheck,
00106     (Concept::AdditiveOperators<
00107      typename NumericTraits<typename TMovingImage::PixelType>::RealType>));
00108   itkConceptMacro(MovingRealTypeMultiplyOperatorCheck,
00109     (Concept::MultiplyOperator<
00110      typename NumericTraits<typename TMovingImage::PixelType>::RealType>));
00112 
00114 #endif
00115 
00116 protected:
00117   MeanSquaresImageToImageMetric();
00118   virtual ~MeanSquaresImageToImageMetric() {};
00119 
00120 private:
00121   MeanSquaresImageToImageMetric(const Self&); //purposely not implemented
00122   void operator=(const Self&); //purposely not implemented
00123 
00124 };
00125 
00126 } // end namespace itk
00127 
00128 #ifndef ITK_MANUAL_INSTANTIATION
00129 #include "itkMeanSquaresImageToImageMetric.txx"
00130 #endif
00131 
00132 #endif
00133 
00134 #endif
00135 
00136 
00137 

Generated at Mon Apr 14 13:30:50 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000