ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkMeanReciprocalSquareDifferenceImageToImageMetric.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkMeanReciprocalSquareDifferenceImageToImageMetric_h
19 #define __itkMeanReciprocalSquareDifferenceImageToImageMetric_h
20 
21 #include "itkImageToImageMetric.h"
22 #include "itkPoint.h"
23 
24 namespace itk
25 {
45 template< class TFixedImage, class TMovingImage >
47  public ImageToImageMetric< TFixedImage, TMovingImage >
48 {
49 public:
50 
56 
58  itkNewMacro(Self);
59 
62 
64  typedef typename Superclass::TransformType TransformType;
65  typedef typename Superclass::TransformPointer TransformPointer;
66  typedef typename Superclass::TransformParametersType TransformParametersType;
67  typedef typename Superclass::TransformJacobianType TransformJacobianType;
68  typedef typename Superclass::InputPointType InputPointType;
69  typedef typename Superclass::OutputPointType OutputPointType;
70 
71  typedef typename Superclass::MeasureType MeasureType;
72  typedef typename Superclass::DerivativeType DerivativeType;
73  typedef typename Superclass::FixedImageType FixedImageType;
74  typedef typename Superclass::MovingImageType MovingImageType;
75  typedef typename Superclass::FixedImageConstPointer FixedImageConstPointer;
76  typedef typename Superclass::MovingImageConstPointer MovingImageConstPointer;
77 
79  void GetDerivative(const TransformParametersType & parameters,
80  DerivativeType & derivative) const;
81 
83  MeasureType GetValue(const TransformParametersType & parameters) const;
84 
86  void GetValueAndDerivative(const TransformParametersType & parameters,
87  MeasureType & Value, DerivativeType & derivative) const;
88 
91  itkGetConstMacro(Lambda, double);
92  itkSetMacro(Lambda, double);
94 
97  itkGetConstMacro(Delta, double);
98  itkSetMacro(Delta, double);
100 
101 protected:
104  void PrintSelf(std::ostream & os, Indent indent) const;
105 
106 private:
107  MeanReciprocalSquareDifferenceImageToImageMetric(const Self &); //purposely
108  // not
109  // implemented
110  void operator=(const Self &); //purposely
111  // not
112  // implemented
113 
114  double m_Lambda;
115  double m_Delta;
116 };
117 } // end namespace itk
118 
119 #ifndef ITK_MANUAL_INSTANTIATION
120 #include "itkMeanReciprocalSquareDifferenceImageToImageMetric.hxx"
121 #endif
122 
123 #endif
124