ITK  4.4.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< class TFixedPointSet, class TMovingImage >
45  public PointSetToImageMetric< TFixedPointSet, TMovingImage >
46 {
47 public:
48 
54 
56  itkNewMacro(Self);
57 
61 
63  typedef typename Superclass::RealType RealType;
64  typedef typename Superclass::TransformType TransformType;
65  typedef typename Superclass::TransformPointer TransformPointer;
66  typedef typename Superclass::TransformParametersType TransformParametersType;
67  typedef typename Superclass::TransformJacobianType TransformJacobianType;
68  typedef typename Superclass::GradientPixelType GradientPixelType;
69 
70  typedef typename Superclass::MeasureType MeasureType;
71  typedef typename Superclass::DerivativeType DerivativeType;
72  typedef typename Superclass::FixedPointSetType FixedPointSetType;
73  typedef typename Superclass::MovingImageType MovingImageType;
74  typedef typename Superclass::FixedPointSetConstPointer FixedPointSetConstPointer;
75  typedef typename Superclass::MovingImageConstPointer MovingImageConstPointer;
76 
77  typedef typename Superclass::PointIterator PointIterator;
78  typedef typename Superclass::PointDataIterator PointDataIterator;
79  typedef typename Superclass::InputPointType InputPointType;
80  typedef typename Superclass::OutputPointType OutputPointType;
81 
83  void GetDerivative(const TransformParametersType & parameters,
84  DerivativeType & Derivative) const;
85 
87  MeasureType GetValue(const TransformParametersType & parameters) const;
88 
90  void GetValueAndDerivative(const TransformParametersType & parameters,
91  MeasureType & Value, DerivativeType & Derivative) const;
92 
97  itkSetMacro(SubtractMean, bool);
98  itkGetConstReferenceMacro(SubtractMean, bool);
99  itkBooleanMacro(SubtractMean);
101 
102 protected:
105  void PrintSelf(std::ostream & os, Indent indent) const;
106 
107 private:
108  NormalizedCorrelationPointSetToImageMetric(const Self &); //purposely not
109  // implemented
110  void operator=(const Self &); //purposely not
111  // implemented
112 
114 };
115 } // end namespace itk
116 
117 #ifndef ITK_MANUAL_INSTANTIATION
118 #include "itkNormalizedCorrelationPointSetToImageMetric.hxx"
119 #endif
120 
121 #endif
122