ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkMeanReciprocalSquareDifferenceImageToImageMetric.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkMeanReciprocalSquareDifferenceImageToImageMetric_h
00019 #define __itkMeanReciprocalSquareDifferenceImageToImageMetric_h
00020 
00021 #include "itkImageToImageMetric.h"
00022 #include "itkPoint.h"
00023 
00024 namespace itk
00025 {
00045 template< class TFixedImage, class TMovingImage >
00046 class ITK_EXPORT MeanReciprocalSquareDifferenceImageToImageMetric:
00047   public ImageToImageMetric< TFixedImage, TMovingImage >
00048 {
00049 public:
00050 
00052   typedef MeanReciprocalSquareDifferenceImageToImageMetric Self;
00053   typedef ImageToImageMetric< TFixedImage, TMovingImage >  Superclass;
00054   typedef SmartPointer< Self >                             Pointer;
00055   typedef SmartPointer< const Self >                       ConstPointer;
00056 
00058   itkNewMacro(Self);
00059 
00061   itkTypeMacro(MeanReciprocalSquareDifferenceImageToImageMetric, ImageToImageMetric);
00062 
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::InputPointType          InputPointType;
00069   typedef typename Superclass::OutputPointType         OutputPointType;
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 
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 
00091   itkGetConstMacro(Lambda, double);
00092   itkSetMacro(Lambda, double);
00094 
00097   itkGetConstMacro(Delta, double);
00098   itkSetMacro(Delta, double);
00099 protected:
00100   MeanReciprocalSquareDifferenceImageToImageMetric();
00101   virtual ~MeanReciprocalSquareDifferenceImageToImageMetric() {}
00102   void PrintSelf(std::ostream & os, Indent indent) const;
00104 
00105 private:
00106   MeanReciprocalSquareDifferenceImageToImageMetric(const Self &); //purposely
00107                                                                   // not
00108                                                                   // implemented
00109   void operator=(const Self &);                                   //purposely
00110                                                                   // not
00111                                                                   // implemented
00112 
00113   double m_Lambda;
00114   double m_Delta;
00115 };
00116 } // end namespace itk
00117 
00118 #ifndef ITK_MANUAL_INSTANTIATION
00119 #include "itkMeanReciprocalSquareDifferenceImageToImageMetric.hxx"
00120 #endif
00121 
00122 #endif
00123