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 TCoordRep = double>
46class ITK_TEMPLATE_EXPORT ManifoldParzenWindowsPointSetFunction : public PointSetFunction<TPointSet, TOutput, TCoordRep>
47{
48public:
49 ITK_DISALLOW_COPY_AND_MOVE(ManifoldParzenWindowsPointSetFunction);
50
55
57 itkNewMacro(Self);
58
60 static constexpr unsigned int PointDimension = TPointSet::PointDimension;
61
62 using typename Superclass::InputPointSetType;
63 using typename Superclass::InputPointType;
64
66 using PointSetType = TPointSet;
68 using PointsContainer = typename PointSetType::PointsContainer;
69 using PointIdentifier = typename PointsContainer::ElementIdentifier;
70
72 using RealType = TOutput;
73 using OutputType = TOutput;
74 using CoordRepType = TCoordRep;
75
79
83 using GaussianContainerType = std::vector<GaussianPointer>;
84 using CovarianceMatrixType = typename GaussianType::CovarianceMatrixType;
85
93 itkSetMacro(CovarianceKNeighborhood, unsigned int);
94
96 itkGetConstMacro(CovarianceKNeighborhood, unsigned int);
97
104 itkSetMacro(EvaluationKNeighborhood, unsigned int);
105
107 itkGetConstMacro(EvaluationKNeighborhood, unsigned int);
108
113 itkSetMacro(RegularizationSigma, RealType);
114
116 itkGetConstMacro(RegularizationSigma, RealType);
117
123 itkSetMacro(KernelSigma, RealType);
124
126 itkGetConstMacro(KernelSigma, RealType);
127
132 itkSetMacro(Normalize, bool);
133
138 itkGetConstMacro(Normalize, bool);
139
144 itkBooleanMacro(Normalize);
145
151 itkSetMacro(UseAnisotropicCovariances, bool);
152
158 itkGetConstMacro(UseAnisotropicCovariances, bool);
159
165 itkBooleanMacro(UseAnisotropicCovariances);
166
168 void
170
172 TOutput
173 Evaluate(const InputPointType &) const override;
174
177
179 itkGetModifiableObjectMacro(PointsLocator, PointsLocatorType);
180
181protected:
184 void
185 PrintSelf(std::ostream & os, Indent indent) const override;
186
187 void
189
190private:
191 typename PointsLocatorType::Pointer m_PointsLocator{};
192
193 unsigned int m_CovarianceKNeighborhood{ 5 };
194 unsigned int m_EvaluationKNeighborhood{ 50 };
195 RealType m_RegularizationSigma{};
196 RealType m_KernelSigma{};
197
199 bool m_Normalize{ true };
200 bool m_UseAnisotropicCovariances{ true };
201
202 MultiThreaderBase::Pointer m_MultiThreader{};
203};
204
205} // end namespace itk
206
207#ifndef ITK_MANUAL_INSTANTIATION
208# include "itkManifoldParzenWindowsPointSetFunction.hxx"
209#endif
210
211#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.
typename GaussianType::CovarianceMatrixType CovarianceMatrixType
typename Statistics::GaussianMembershipFunction< PointType > GaussianType
~ManifoldParzenWindowsPointSetFunction() override=default
typename PointsLocatorType::NeighborsIdentifierType NeighborsIdentifierType
typename PointsContainer::ElementIdentifier PointIdentifier
GaussianConstPointer GetGaussian(PointIdentifier) const
void SetInputPointSet(const InputPointSetType *) override
void PrintSelf(std::ostream &os, Indent indent) const override
TOutput Evaluate(const InputPointType &) const override
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....