ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkMeanReciprocalSquareDifferencePointSetToImageMetric.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 __itkMeanReciprocalSquareDifferencePointSetToImageMetric_h
00019 #define __itkMeanReciprocalSquareDifferencePointSetToImageMetric_h
00020 
00021 #include "itkPointSetToImageMetric.h"
00022 #include "itkCovariantVector.h"
00023 #include "itkPoint.h"
00024 
00025 namespace itk
00026 {
00045 template< class TFixedPointSet, class TMovingImage >
00046 class ITK_EXPORT MeanReciprocalSquareDifferencePointSetToImageMetric:
00047   public PointSetToImageMetric< TFixedPointSet, TMovingImage >
00048 {
00049 public:
00050 
00052   typedef  MeanReciprocalSquareDifferencePointSetToImageMetric  Self;
00053   typedef PointSetToImageMetric< TFixedPointSet, TMovingImage > Superclass;
00054   typedef SmartPointer< Self >                                  Pointer;
00055   typedef SmartPointer< const Self >                            ConstPointer;
00056 
00058   itkNewMacro(Self);
00059 
00061   itkTypeMacro(MeanReciprocalSquareDifferencePointSetToImageMetric, Object);
00062 
00064   typedef typename Superclass::RealType                RealType;
00065   typedef typename Superclass::TransformType           TransformType;
00066   typedef typename Superclass::TransformPointer        TransformPointer;
00067   typedef typename Superclass::TransformParametersType TransformParametersType;
00068   typedef typename Superclass::TransformJacobianType   TransformJacobianType;
00069   typedef typename Superclass::InputPointType          InputPointType;
00070   typedef typename Superclass::OutputPointType         OutputPointType;
00071   typedef typename Superclass::GradientPixelType       GradientPixelType;
00072 
00073   typedef typename Superclass::MeasureType               MeasureType;
00074   typedef typename Superclass::DerivativeType            DerivativeType;
00075   typedef typename Superclass::FixedPointSetType         FixedPointSetType;
00076   typedef typename Superclass::MovingImageType           MovingImageType;
00077   typedef typename Superclass::FixedPointSetConstPointer FixedPointSetConstPointer;
00078   typedef typename Superclass::MovingImageConstPointer   MovingImageConstPointer;
00079 
00080   typedef typename Superclass::PointIterator     PointIterator;
00081   typedef typename Superclass::PointDataIterator PointDataIterator;
00082 
00084   void GetDerivative(const TransformParametersType & parameters,
00085                      DerivativeType & Derivative) const;
00086 
00088   MeasureType GetValue(const TransformParametersType & parameters) const;
00089 
00091   void GetValueAndDerivative(const TransformParametersType & parameters,
00092                              MeasureType & Value, DerivativeType & Derivative) const;
00093 
00096   itkSetMacro(Lambda, double);
00097   itkGetConstMacro(Lambda, double);
00098 protected:
00099   MeanReciprocalSquareDifferencePointSetToImageMetric();
00100   virtual ~MeanReciprocalSquareDifferencePointSetToImageMetric() {}
00101   virtual void PrintSelf(std::ostream & os, Indent indent) const;
00103 
00104 private:
00105   MeanReciprocalSquareDifferencePointSetToImageMetric(const Self &); //purposely
00106                                                                      // not
00107                                                                      // implemented
00108   void operator=(const Self &);                                      //purposely
00109                                                                      // not
00110                                                                      // implemented
00111 
00112   double m_Lambda;
00113 };
00114 } // end namespace itk
00115 
00116 #ifndef ITK_MANUAL_INSTANTIATION
00117 #include "itkMeanReciprocalSquareDifferencePointSetToImageMetric.hxx"
00118 #endif
00119 
00120 #endif
00121