ITK  5.2.0
Insight Toolkit
itkNormalizedCorrelationImageToImageMetric.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 : public ImageToImageMetric<TFixedImage, TMovingImage>
47 {
48 public:
49  ITK_DISALLOW_COPY_AND_MOVE(NormalizedCorrelationImageToImageMetric);
50 
56 
58  itkNewMacro(Self);
59 
62 
64  using RealType = typename Superclass::RealType;
65  using TransformType = typename Superclass::TransformType;
66  using TransformPointer = typename Superclass::TransformPointer;
67  using TransformParametersType = typename Superclass::TransformParametersType;
68  using TransformJacobianType = typename Superclass::TransformJacobianType;
69  using GradientPixelType = typename Superclass::GradientPixelType;
70  using OutputPointType = typename Superclass::OutputPointType;
71  using InputPointType = typename Superclass::InputPointType;
72 
73  using MeasureType = typename Superclass::MeasureType;
74  using DerivativeType = typename Superclass::DerivativeType;
75  using FixedImageType = typename Superclass::FixedImageType;
76  using MovingImageType = typename Superclass::MovingImageType;
77  using FixedImageConstPointer = typename Superclass::FixedImageConstPointer;
78  using MovingImageConstPointer = typename Superclass::MovingImageConstPointer;
79 
81  void
82  GetDerivative(const TransformParametersType & parameters, DerivativeType & derivative) const override;
83 
86  GetValue(const TransformParametersType & parameters) const override;
87 
89  void
90  GetValueAndDerivative(const TransformParametersType & parameters,
91  MeasureType & value,
92  DerivativeType & derivative) const override;
93 
98  itkSetMacro(SubtractMean, bool);
99  itkGetConstReferenceMacro(SubtractMean, bool);
100  itkBooleanMacro(SubtractMean);
102 
103 protected:
105  ~NormalizedCorrelationImageToImageMetric() override = default;
106  void
107  PrintSelf(std::ostream & os, Indent indent) const override;
108 
109 private:
111 };
112 } // end namespace itk
113 
114 #ifndef ITK_MANUAL_INSTANTIATION
115 # include "itkNormalizedCorrelationImageToImageMetric.hxx"
116 #endif
117 
118 #endif
itk::ImageToImageMetric::FixedImageConstPointer
typename FixedImageType::ConstPointer FixedImageConstPointer
Definition: itkImageToImageMetric.h:77
itk::ImageToImageMetric
Computes similarity between regions of two images.
Definition: itkImageToImageMetric.h:52
itk::SingleValuedCostFunction::MeasureType
double MeasureType
Definition: itkSingleValuedCostFunction.h:50
itk::ImageToImageMetric::TransformParametersType
typename TransformType::ParametersType TransformParametersType
Definition: itkImageToImageMetric.h:90
itkPoint.h
itk::ImageToImageMetric::RealType
typename NumericTraits< MovingImagePixelType >::RealType RealType
Definition: itkImageToImageMetric.h:106
itk::ImageToImageMetric::TransformJacobianType
typename TransformType::JacobianType TransformJacobianType
Definition: itkImageToImageMetric.h:91
itk::NormalizedCorrelationImageToImageMetric
Computes similarity between two images to be registered.
Definition: itkNormalizedCorrelationImageToImageMetric.h:46
itk::ImageToImageMetric::FixedImageType
TFixedImage FixedImageType
Definition: itkImageToImageMetric.h:75
itk::ImageToImageMetric::OutputPointType
typename TransformType::OutputPointType OutputPointType
Definition: itkImageToImageMetric.h:89
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ImageToImageMetric::InputPointType
typename TransformType::InputPointType InputPointType
Definition: itkImageToImageMetric.h:88
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::NormalizedCorrelationImageToImageMetric::m_SubtractMean
bool m_SubtractMean
Definition: itkNormalizedCorrelationImageToImageMetric.h:110
itkImageToImageMetric.h
itk::ImageToImageMetric::MovingImageConstPointer
typename MovingImageType::ConstPointer MovingImageConstPointer
Definition: itkImageToImageMetric.h:72
itk::CovariantVector
A templated class holding a n-Dimensional covariant vector.
Definition: itkCovariantVector.h:70
itk::ImageToImageMetric::TransformPointer
typename TransformType::Pointer TransformPointer
Definition: itkImageToImageMetric.h:87
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ImageToImageMetric::MovingImageType
TMovingImage MovingImageType
Definition: itkImageToImageMetric.h:70
itk::Array
Array class with size defined at construction time.
Definition: itkArray.h:47
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itk::Transform
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:82