ITK  5.2.0
Insight Toolkit
itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.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 itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4_h
19 #define itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4_h
20 
22 
24 
25 namespace itk
26 {
27 
71 template <typename TPointSet, class TInternalComputationValueType = double>
73  : public PointSetToPointSetMetricv4<TPointSet, TPointSet, TInternalComputationValueType>
74 {
75 public:
76  ITK_DISALLOW_COPY_AND_MOVE(JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4);
77 
83 
85  itkSimpleNewMacro(Self);
86 
89 
90  using PointSetType = TPointSet;
91  using PointsContainer = typename PointSetType::PointsContainer;
92  using PointsContainerConstIterator = typename PointsContainer::ConstIterator;
93 
94  static constexpr unsigned int PointDimension = TPointSet::PointDimension;
95 
97  using MeasureType = typename Superclass::MeasureType;
98  using DerivativeType = typename Superclass::DerivativeType;
99  using DerivativeValueType = typename Superclass::DerivativeValueType;
100  using LocalDerivativeType = typename Superclass::LocalDerivativeType;
102  using PixelType = typename Superclass::PixelType;
103  using CoordRepType = typename Superclass::CoordRepType;
104  using PointIdentifier = typename Superclass::PointIdentifier;
105  using NeighborsIdentifierType = typename Superclass::NeighborsIdentifierType;
106  using NumberOfParametersType = typename Superclass::NumberOfParametersType;
107 
108  using JacobianType = typename Superclass::JacobianType;
109  using FixedTransformJacobianType = typename Superclass::FixedTransformJacobianType;
110  using MovingTransformJacobianType = typename Superclass::MovingTransformJacobianType;
111 
113 
120 
123  void
124  Initialize() override;
125 
135  itkSetClampMacro(Alpha, RealType, 1.0, 2.0);
136 
140  itkGetConstMacro(Alpha, RealType);
141 
147  itkSetMacro(PointSetSigma, RealType);
148 
150  itkGetConstMacro(PointSetSigma, RealType);
151 
156  itkSetMacro(EvaluationKNeighborhood, unsigned int);
157 
162  itkGetConstMacro(EvaluationKNeighborhood, unsigned int);
163 
168  itkSetMacro(UseAnisotropicCovariances, bool);
169 
174  itkGetConstMacro(UseAnisotropicCovariances, bool);
175 
180  itkBooleanMacro(UseAnisotropicCovariances);
181 
187  itkSetMacro(CovarianceKNeighborhood, unsigned int);
188 
194  itkGetConstMacro(CovarianceKNeighborhood, unsigned int);
195 
203  itkSetMacro(KernelSigma, RealType);
204 
206  itkGetConstMacro(KernelSigma, RealType);
207 
209  GetLocalNeighborhoodValue(const PointType & point, const PixelType & pixel = 0) const override;
210 
211  void
212  GetLocalNeighborhoodValueAndDerivative(const PointType &,
213  MeasureType &,
215  const PixelType & pixel = 0) const override;
216 
219  typename LightObject::Pointer
220  InternalClone() const override;
221 
222 protected:
225 
226  void
227  ComputeValueAndDerivative(const PointType & samplePoint,
228  MeasureType & value,
229  LocalDerivativeType & derivativeReturn,
230  bool calcValue,
231  bool calcDerivative) const;
232 
233  void
234  PrintSelf(std::ostream & os, Indent indent) const override;
235 
236  bool
237  RequiresFixedPointsLocator() const override
238  {
239  return false;
240  }
241 
242  bool
244  {
245  return false;
246  }
247 
248 private:
250 
251  bool m_UseAnisotropicCovariances{ false };
252 
257 
259 
264 };
265 
266 
267 } // end namespace itk
268 
269 #ifndef ITK_MANUAL_INSTANTIATION
270 # include "itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.hxx"
271 #endif
272 
273 #endif
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::PointsContainerConstIterator
typename PointsContainer::ConstIterator PointsContainerConstIterator
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:92
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::PointsContainer
typename PointSetType::PointsContainer PointsContainer
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:91
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::DensityFunctionPointer
typename DensityFunctionType::Pointer DensityFunctionPointer
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:119
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::m_CovarianceKNeighborhood
unsigned int m_CovarianceKNeighborhood
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:255
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::PointIdentifier
typename Superclass::PointIdentifier PointIdentifier
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:104
itk::ObjectToObjectMetricBaseTemplate::NumberOfParametersType
unsigned int NumberOfParametersType
Definition: itkObjectToObjectMetricBase.h:176
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::m_EvaluationKNeighborhood
unsigned int m_EvaluationKNeighborhood
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:256
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::LocalDerivativeType
typename Superclass::LocalDerivativeType LocalDerivativeType
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:100
itk::ManifoldParzenWindowsPointSetFunction
Point set function based on n-dimensional parzen windowing.
Definition: itkManifoldParzenWindowsPointSetFunction.h:46
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::m_Prefactor1
RealType m_Prefactor1
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:263
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ManifoldParzenWindowsPointSetFunction::GaussianType
typename Statistics::GaussianMembershipFunction< PointType > GaussianType
Definition: itkManifoldParzenWindowsPointSetFunction.h:80
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::PixelType
typename Superclass::PixelType PixelType
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:102
itk::ObjectToObjectMetricBaseTemplate::DerivativeValueType
typename DerivativeType::ValueType DerivativeValueType
Definition: itkObjectToObjectMetricBase.h:113
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::m_PointSetSigma
RealType m_PointSetSigma
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:253
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::m_KernelSigma
RealType m_KernelSigma
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:254
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::RealType
MeasureType RealType
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:112
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::JacobianType
typename Superclass::JacobianType JacobianType
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:108
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::RequiresMovingPointsLocator
bool RequiresMovingPointsLocator() const override
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:243
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::PointType
typename Superclass::PointType PointType
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:101
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::m_TotalNumberOfPoints
RealType m_TotalNumberOfPoints
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:261
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::FixedTransformJacobianType
typename Superclass::FixedTransformJacobianType FixedTransformJacobianType
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:109
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::CoordRepType
typename Superclass::CoordRepType CoordRepType
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:103
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::PointSetType
TPointSet PointSetType
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:90
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4
Implementation of the Jensen Havrda Charvat Tsallis Point Set metric.
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:72
itkPointSetToPointSetMetricv4.h
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::NeighborsIdentifierType
typename Superclass::NeighborsIdentifierType NeighborsIdentifierType
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:105
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::m_MovingDensityFunction
DensityFunctionPointer m_MovingDensityFunction
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:249
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::m_Alpha
RealType m_Alpha
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:258
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::GaussianType
typename DensityFunctionType::GaussianType GaussianType
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:118
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itkManifoldParzenWindowsPointSetFunction.h
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::MeasureType
typename Superclass::MeasureType MeasureType
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:97
itk::ObjectToObjectMetricBaseTemplate::DerivativeType
typename Superclass::DerivativeType DerivativeType
Definition: itkObjectToObjectMetricBase.h:112
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::m_Prefactor0
RealType m_Prefactor0
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:262
itk::PointSetToPointSetMetricv4
Computes similarity between two point sets.
Definition: itkPointSetToPointSetMetricv4.h:68
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::MovingTransformJacobianType
typename Superclass::MovingTransformJacobianType MovingTransformJacobianType
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:110
itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4::RequiresFixedPointsLocator
bool RequiresFixedPointsLocator() const override
Definition: itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h:237