ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkManifoldParzenWindowsPointSetFunction.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 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"
28 #include "itkMultiThreaderBase.h"
29 
30 #include <vector>
31 
32 namespace itk
33 {
34 
45 template <typename TPointSet, typename TOutput = double, typename TCoordRep = double>
46 class ITK_TEMPLATE_EXPORT ManifoldParzenWindowsPointSetFunction
47 : public PointSetFunction<TPointSet, TOutput, TCoordRep>
48 {
49 public:
50  ITK_DISALLOW_COPY_AND_ASSIGN(ManifoldParzenWindowsPointSetFunction);
51 
56 
58  itkNewMacro(Self);
59 
61  static constexpr unsigned int PointDimension = TPointSet::PointDimension;
62 
63  using InputPointSetType = typename Superclass::InputPointSetType;
64  using InputPointType = 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 CoordRepType = TCoordRep;
76 
80 
82  using GaussianPointer = typename GaussianType::Pointer;
83  using GaussianConstPointer = typename GaussianType::ConstPointer;
84  using GaussianContainerType = std::vector<GaussianPointer>;
85  using CovarianceMatrixType = typename GaussianType::CovarianceMatrixType;
86 
94  itkSetMacro( CovarianceKNeighborhood, unsigned int );
95 
97  itkGetConstMacro( CovarianceKNeighborhood, unsigned int );
98 
105  itkSetMacro( EvaluationKNeighborhood, unsigned int );
106 
108  itkGetConstMacro( EvaluationKNeighborhood, unsigned int );
109 
114  itkSetMacro( RegularizationSigma, RealType );
115 
117  itkGetConstMacro( RegularizationSigma, RealType );
118 
124  itkSetMacro( KernelSigma, RealType );
125 
127  itkGetConstMacro( KernelSigma, RealType );
128 
133  itkSetMacro( Normalize, bool );
134 
139  itkGetConstMacro( Normalize, bool );
140 
145  itkBooleanMacro( Normalize );
146 
152  itkSetMacro( UseAnisotropicCovariances, bool );
153 
159  itkGetConstMacro( UseAnisotropicCovariances, bool );
160 
166  itkBooleanMacro( UseAnisotropicCovariances );
167 
169  void SetInputPointSet( const InputPointSetType * ) override;
170 
172  TOutput Evaluate( const InputPointType & ) const override;
173 
175  GaussianConstPointer GetGaussian( PointIdentifier ) const;
176 
178  itkGetModifiableObjectMacro(PointsLocator, PointsLocatorType );
179 
180 protected:
182  ~ManifoldParzenWindowsPointSetFunction() override = default;
183  void PrintSelf( std::ostream& os, Indent indent ) const override;
184 
185  void GenerateData();
186 
187 private:
189 
190  unsigned int m_CovarianceKNeighborhood{ 5 };
191  unsigned int m_EvaluationKNeighborhood{ 50 };
194 
196  bool m_Normalize{ true };
197  bool m_UseAnisotropicCovariances{ true };
198 
200 };
201 
202 } // end namespace itk
203 
204 #ifndef ITK_MANUAL_INSTANTIATION
205 #include "itkManifoldParzenWindowsPointSetFunction.hxx"
206 #endif
207 
208 #endif
Light weight base class for most itk classes.
Point set function based on n-dimensional parzen windowing.
typename Statistics::GaussianMembershipFunction< PointType > GaussianType
typename TreeType::InstanceIdentifierVectorType NeighborsIdentifierType
typename GaussianType::CovarianceMatrixType CovarianceMatrixType
typename PointsContainer::ElementIdentifier PointIdentifier
Accelerate geometric searches for points.
GaussianMembershipFunction models class membership through a multivariate Gaussian function...
typename PointsLocatorType::NeighborsIdentifierType NeighborsIdentifierType
Evaluates a function of an image at specified position.
Control indentation during Print() invocation.
Definition: itkIndent.h:49