ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkNormalizedCorrelationImageToImageMetric.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 __itkNormalizedCorrelationImageToImageMetric_h
19 #define __itkNormalizedCorrelationImageToImageMetric_h
20 
21 #include "itkImageToImageMetric.h"
22 #include "itkPoint.h"
23 
24 namespace itk
25 {
41 template< class TFixedImage, class TMovingImage >
43  public ImageToImageMetric< TFixedImage, TMovingImage >
44 {
45 public:
46 
52 
54  itkNewMacro(Self);
55 
58 
60  typedef typename Superclass::RealType RealType;
62  typedef typename Superclass::TransformPointer TransformPointer;
63  typedef typename Superclass::TransformParametersType TransformParametersType;
64  typedef typename Superclass::TransformJacobianType TransformJacobianType;
65  typedef typename Superclass::GradientPixelType GradientPixelType;
66  typedef typename Superclass::OutputPointType OutputPointType;
67  typedef typename Superclass::InputPointType InputPointType;
68 
69  typedef typename Superclass::MeasureType MeasureType;
70  typedef typename Superclass::DerivativeType DerivativeType;
71  typedef typename Superclass::FixedImageType FixedImageType;
72  typedef typename Superclass::MovingImageType MovingImageType;
73  typedef typename Superclass::FixedImageConstPointer FixedImageConstPointer;
74  typedef typename Superclass::MovingImageConstPointer MovingImageConstPointer;
75 
77  void GetDerivative(const TransformParametersType & parameters,
78  DerivativeType & Derivative) const;
79 
81  MeasureType GetValue(const TransformParametersType & parameters) const;
82 
84  void GetValueAndDerivative(const TransformParametersType & parameters,
85  MeasureType & Value, DerivativeType & Derivative) const;
86 
91  itkSetMacro(SubtractMean, bool);
92  itkGetConstReferenceMacro(SubtractMean, bool);
93  itkBooleanMacro(SubtractMean);
94 protected:
97  void PrintSelf(std::ostream & os, Indent indent) const;
99 
100 private:
101  NormalizedCorrelationImageToImageMetric(const Self &); //purposely not
102  // implemented
103  void operator=(const Self &); //purposely not
104  // implemented
105 
107 };
108 } // end namespace itk
109 
110 #ifndef ITK_MANUAL_INSTANTIATION
111 #include "itkNormalizedCorrelationImageToImageMetric.hxx"
112 #endif
113 
114 #endif
115