ITK  4.13.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 {
45 template< typename TFixedImage, typename TMovingImage >
46 class ITK_TEMPLATE_EXPORT NormalizedCorrelationImageToImageMetric:
47  public ImageToImageMetric< TFixedImage, TMovingImage >
48 {
49 public:
50 
56 
58  itkNewMacro(Self);
59 
62 
64  typedef typename Superclass::RealType RealType;
65  typedef typename Superclass::TransformType TransformType;
66  typedef typename Superclass::TransformPointer TransformPointer;
67  typedef typename Superclass::TransformParametersType TransformParametersType;
68  typedef typename Superclass::TransformJacobianType TransformJacobianType;
69  typedef typename Superclass::GradientPixelType GradientPixelType;
70  typedef typename Superclass::OutputPointType OutputPointType;
71  typedef typename Superclass::InputPointType InputPointType;
72 
73  typedef typename Superclass::MeasureType MeasureType;
74  typedef typename Superclass::DerivativeType DerivativeType;
75  typedef typename Superclass::FixedImageType FixedImageType;
76  typedef typename Superclass::MovingImageType MovingImageType;
77  typedef typename Superclass::FixedImageConstPointer FixedImageConstPointer;
78  typedef typename Superclass::MovingImageConstPointer MovingImageConstPointer;
79 
81  void GetDerivative(const TransformParametersType & parameters,
82  DerivativeType & Derivative) const ITK_OVERRIDE;
83 
85  MeasureType GetValue(const TransformParametersType & parameters) const ITK_OVERRIDE;
86 
88  void GetValueAndDerivative(const TransformParametersType & parameters,
89  MeasureType & Value, DerivativeType & Derivative) const ITK_OVERRIDE;
90 
95  itkSetMacro(SubtractMean, bool);
96  itkGetConstReferenceMacro(SubtractMean, bool);
97  itkBooleanMacro(SubtractMean);
99 
100 protected:
103  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
104 
105 private:
106  ITK_DISALLOW_COPY_AND_ASSIGN(NormalizedCorrelationImageToImageMetric);
107 
108  bool m_SubtractMean;
109 };
110 } // end namespace itk
111 
112 #ifndef ITK_MANUAL_INSTANTIATION
113 #include "itkNormalizedCorrelationImageToImageMetric.hxx"
114 #endif
115 
116 #endif
Array class with size defined at construction time.
Definition: itkArray.h:50
Light weight base class for most itk classes.
Computes similarity between two images to be registered.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ImageToImageMetric< TFixedImage, TMovingImage > Superclass
Base class for most ITK classes.
Definition: itkObject.h:59
Computes similarity between regions of two images.
TransformType::ParametersType TransformParametersType