ITK  6.0.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 * https://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
22#include "itkPoint.h"
23
24namespace itk
25{
45template <typename TFixedImage, typename TMovingImage>
46class ITK_TEMPLATE_EXPORT NormalizedCorrelationImageToImageMetric : public ImageToImageMetric<TFixedImage, TMovingImage>
47{
48public:
49 ITK_DISALLOW_COPY_AND_MOVE(NormalizedCorrelationImageToImageMetric);
50
56
58 itkNewMacro(Self);
59
61 itkOverrideGetNameOfClassMacro(NormalizedCorrelationImageToImageMetric);
62
64 using typename Superclass::RealType;
65 using typename Superclass::TransformType;
66 using typename Superclass::TransformPointer;
67 using typename Superclass::TransformParametersType;
68 using typename Superclass::TransformJacobianType;
69 using typename Superclass::GradientPixelType;
70 using typename Superclass::OutputPointType;
71 using typename Superclass::InputPointType;
72
73 using typename Superclass::MeasureType;
74 using typename Superclass::DerivativeType;
75 using typename Superclass::FixedImageType;
76 using typename Superclass::MovingImageType;
77 using typename Superclass::FixedImageConstPointer;
78 using 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
91 MeasureType & value,
92 DerivativeType & derivative) const override;
93
98 itkSetMacro(SubtractMean, bool);
99 itkGetConstReferenceMacro(SubtractMean, bool);
100 itkBooleanMacro(SubtractMean);
103protected:
106 void
107 PrintSelf(std::ostream & os, Indent indent) const override;
108
109private:
110 bool m_SubtractMean{};
111};
112} // end namespace itk
113
114#ifndef ITK_MANUAL_INSTANTIATION
115# include "itkNormalizedCorrelationImageToImageMetric.hxx"
116#endif
117
118#endif
Array class with size defined at construction time.
Definition: itkArray.h:48
Computes similarity between regions of two images.
typename TransformType::ParametersType TransformParametersType
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Computes similarity between two images to be registered.
void PrintSelf(std::ostream &os, Indent indent) const override
~NormalizedCorrelationImageToImageMetric() override=default
void GetDerivative(const TransformParametersType &parameters, DerivativeType &derivative) const override
void GetValueAndDerivative(const TransformParametersType &parameters, MeasureType &value, DerivativeType &derivative) const override
MeasureType GetValue(const TransformParametersType &parameters) const override
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....