ITK  6.0.0
Insight Toolkit
itkManifoldParzenWindowsPointSetFunction.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 itkManifoldParzenWindowsPointSetFunction_h
19#define itkManifoldParzenWindowsPointSetFunction_h
20
21#include "itkPointSetFunction.h"
22
24#include "itkMatrix.h"
25#include "itkPointSet.h"
26#include "itkPointsLocator.h"
27#include "itkVector.h"
29
30#include <vector>
31
32namespace itk
33{
34
45template <typename TPointSet, typename TOutput = double, typename TCoordinate = double>
47 : public PointSetFunction<TPointSet, TOutput, TCoordinate>
48{
49public:
50 ITK_DISALLOW_COPY_AND_MOVE(ManifoldParzenWindowsPointSetFunction);
51
56
58 itkNewMacro(Self);
59
61 static constexpr unsigned int PointDimension = TPointSet::PointDimension;
62
63 using typename Superclass::InputPointSetType;
64 using typename Superclass::InputPointType;
65
67 using PointSetType = TPointSet;
69 using PointsContainer = typename PointSetType::PointsContainer;
70 using PointIdentifier = typename PointsContainer::ElementIdentifier;
71
73 using RealType = TOutput;
74 using OutputType = TOutput;
75 using CoordinateType = TCoordinate;
76#ifndef ITK_FUTURE_LEGACY_REMOVE
77 using CoordRepType ITK_FUTURE_DEPRECATED(
78 "ITK 6 discourages using `CoordRepType`. Please use `CoordinateType` instead!") = CoordinateType;
79#endif
80
84
88 using GaussianContainerType = std::vector<GaussianPointer>;
89 using CovarianceMatrixType = typename GaussianType::CovarianceMatrixType;
90
98 itkSetMacro(CovarianceKNeighborhood, unsigned int);
99
101 itkGetConstMacro(CovarianceKNeighborhood, unsigned int);
102
109 itkSetMacro(EvaluationKNeighborhood, unsigned int);
110
112 itkGetConstMacro(EvaluationKNeighborhood, unsigned int);
113
118 itkSetMacro(RegularizationSigma, RealType);
119
121 itkGetConstMacro(RegularizationSigma, RealType);
122
128 itkSetMacro(KernelSigma, RealType);
129
131 itkGetConstMacro(KernelSigma, RealType);
132
137 itkSetMacro(Normalize, bool);
138
143 itkGetConstMacro(Normalize, bool);
144
149 itkBooleanMacro(Normalize);
150
156 itkSetMacro(UseAnisotropicCovariances, bool);
157
163 itkGetConstMacro(UseAnisotropicCovariances, bool);
164
170 itkBooleanMacro(UseAnisotropicCovariances);
171
173 void
175
177 TOutput
178 Evaluate(const InputPointType &) const override;
179
182
184 itkGetModifiableObjectMacro(PointsLocator, PointsLocatorType);
185
186protected:
189 void
190 PrintSelf(std::ostream & os, Indent indent) const override;
191
192 void
194
195private:
196 typename PointsLocatorType::Pointer m_PointsLocator{};
197
198 unsigned int m_CovarianceKNeighborhood{ 5 };
199 unsigned int m_EvaluationKNeighborhood{ 50 };
200 RealType m_RegularizationSigma{};
201 RealType m_KernelSigma{};
202
204 bool m_Normalize{ true };
205 bool m_UseAnisotropicCovariances{ true };
206
207 MultiThreaderBase::Pointer m_MultiThreader{};
208};
209
210} // end namespace itk
211
212#ifndef ITK_MANUAL_INSTANTIATION
213# include "itkManifoldParzenWindowsPointSetFunction.hxx"
214#endif
215
216#endif
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Point set function based on n-dimensional parzen windowing.
~ManifoldParzenWindowsPointSetFunction() override=default
typename Statistics::GaussianMembershipFunction< PointType > GaussianType
typename GaussianType::CovarianceMatrixType CovarianceMatrixType
void SetInputPointSet(const InputPointSetType *) override
TOutput Evaluate(const InputPointType &) const override
GaussianConstPointer GetGaussian(PointIdentifier) const
void PrintSelf(std::ostream &os, Indent indent) const override
typename PointsLocatorType::NeighborsIdentifierType NeighborsIdentifierType
typename PointsContainer::ElementIdentifier PointIdentifier
Evaluates a function of an image at specified position.
typename InputPointSetType::PointType InputPointType
Accelerate geometric searches for points.
typename TreeType::InstanceIdentifierVectorType NeighborsIdentifierType
GaussianMembershipFunction models class membership through a multivariate Gaussian function.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....