ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkNormalizedCorrelationPointSetToImageMetric.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 itkNormalizedCorrelationPointSetToImageMetric_h
19 #define itkNormalizedCorrelationPointSetToImageMetric_h
20 
22 #include "itkCovariantVector.h"
23 #include "itkPoint.h"
24 
25 namespace itk
26 {
43 template< typename TFixedPointSet, typename TMovingImage >
45  public PointSetToImageMetric< TFixedPointSet, TMovingImage >
46 {
47 public:
48  ITK_DISALLOW_COPY_AND_ASSIGN(NormalizedCorrelationPointSetToImageMetric);
49 
55 
57  itkNewMacro(Self);
58 
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 
71  using MeasureType = typename Superclass::MeasureType;
72  using DerivativeType = typename Superclass::DerivativeType;
73  using FixedPointSetType = typename Superclass::FixedPointSetType;
74  using MovingImageType = typename Superclass::MovingImageType;
75  using FixedPointSetConstPointer = typename Superclass::FixedPointSetConstPointer;
76  using MovingImageConstPointer = typename Superclass::MovingImageConstPointer;
77 
78  using PointIterator = typename Superclass::PointIterator;
79  using PointDataIterator = typename Superclass::PointDataIterator;
80  using InputPointType = typename Superclass::InputPointType;
81  using OutputPointType = typename Superclass::OutputPointType;
82 
84  void GetDerivative(const TransformParametersType & parameters,
85  DerivativeType & Derivative) const override;
86 
88  MeasureType GetValue(const TransformParametersType & parameters) const override;
89 
91  void GetValueAndDerivative(const TransformParametersType & parameters,
92  MeasureType & Value, DerivativeType & Derivative) const override;
93 
98  itkSetMacro(SubtractMean, bool);
99  itkGetConstReferenceMacro(SubtractMean, bool);
100  itkBooleanMacro(SubtractMean);
102 
103 protected:
105  ~NormalizedCorrelationPointSetToImageMetric() override = default;
106  void PrintSelf(std::ostream & os, Indent indent) const override;
107 
108 private:
110 };
111 } // end namespace itk
112 
113 #ifndef ITK_MANUAL_INSTANTIATION
114 #include "itkNormalizedCorrelationPointSetToImageMetric.hxx"
115 #endif
116 
117 #endif
Array class with size defined at construction time.
Definition: itkArray.h:46
Light weight base class for most itk classes.
Computes similarity between a point set and an image.
typename Superclass::FixedPointSetConstPointer FixedPointSetConstPointer
Computes similarity between pixel values of a point set and intensity values of an image...
Control indentation during Print() invocation.
Definition: itkIndent.h:49