ITK  6.0.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 * 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 itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4_h
19#define itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4_h
20
22
24
25namespace itk
26{
27
71template <typename TPointSet, class TInternalComputationValueType = double>
73 : public PointSetToPointSetMetricv4<TPointSet, TPointSet, TInternalComputationValueType>
74{
75public:
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 typename Superclass::MeasureType;
98 using typename Superclass::DerivativeType;
99 using typename Superclass::DerivativeValueType;
100 using typename Superclass::LocalDerivativeType;
101 using typename Superclass::PointType;
102 using typename Superclass::PixelType;
103 using typename Superclass::CoordRepType;
104 using typename Superclass::PointIdentifier;
105 using typename Superclass::NeighborsIdentifierType;
106 using typename Superclass::NumberOfParametersType;
107
108 using typename Superclass::JacobianType;
109 using typename Superclass::FixedTransformJacobianType;
110 using typename Superclass::MovingTransformJacobianType;
111
113
120
122 void
123 Initialize() override;
124
134 itkSetClampMacro(Alpha, RealType, 1.0, 2.0);
135
139 itkGetConstMacro(Alpha, RealType);
140
146 itkSetMacro(PointSetSigma, RealType);
147
149 itkGetConstMacro(PointSetSigma, RealType);
150
155 itkSetMacro(EvaluationKNeighborhood, unsigned int);
156
161 itkGetConstMacro(EvaluationKNeighborhood, unsigned int);
162
167 itkSetMacro(UseAnisotropicCovariances, bool);
168
173 itkGetConstMacro(UseAnisotropicCovariances, bool);
174
179 itkBooleanMacro(UseAnisotropicCovariances);
180
186 itkSetMacro(CovarianceKNeighborhood, unsigned int);
187
193 itkGetConstMacro(CovarianceKNeighborhood, unsigned int);
194
202 itkSetMacro(KernelSigma, RealType);
203
205 itkGetConstMacro(KernelSigma, RealType);
206
208 GetLocalNeighborhoodValue(const PointType & point, const PixelType & pixel = 0) const override;
209
211 void
213 MeasureType &,
215 const PixelType & pixel = 0) const override;
216
219 typename LightObject::Pointer
220 InternalClone() const override;
221
222protected:
225
226 void
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
238 {
239 return false;
240 }
241
242 bool
244 {
245 return false;
246 }
247
248private:
249 DensityFunctionPointer m_MovingDensityFunction{};
250
251 bool m_UseAnisotropicCovariances{ false };
252
253 RealType m_PointSetSigma{};
254 RealType m_KernelSigma{};
255 unsigned int m_CovarianceKNeighborhood{};
256 unsigned int m_EvaluationKNeighborhood{};
257
258 RealType m_Alpha{};
259
261 mutable RealType m_TotalNumberOfPoints{};
262 mutable RealType m_Prefactor0{};
263 mutable RealType m_Prefactor1{};
264};
265
266
267} // end namespace itk
268
269#ifndef ITK_MANUAL_INSTANTIATION
270# include "itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.hxx"
271#endif
272
273#endif
Simulate a standard C array with copy semantics.
Definition: itkFixedArray.h:54
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Implementation of the Jensen Havrda Charvat Tsallis Point Set metric.
void ComputeValueAndDerivative(const PointType &samplePoint, MeasureType &value, LocalDerivativeType &derivativeReturn, bool calcValue, bool calcDerivative) const
LightObject::Pointer InternalClone() const override
void PrintSelf(std::ostream &os, Indent indent) const override
MeasureType GetLocalNeighborhoodValue(const PointType &point, const PixelType &pixel=0) const override
void GetLocalNeighborhoodValueAndDerivative(const PointType &, MeasureType &, LocalDerivativeType &, const PixelType &pixel=0) const override
Light weight base class for most itk classes.
Point set function based on n-dimensional parzen windowing.
typename Statistics::GaussianMembershipFunction< PointType > GaussianType
Computes similarity between two point sets.
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
*par Constraints *The filter image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents