ITK  5.2.0
Insight Toolkit
itkWeightedCovarianceSampleFilter.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 itkWeightedCovarianceSampleFilter_h
19 #define itkWeightedCovarianceSampleFilter_h
20 
21 #include "itkFunctionBase.h"
23 #include "itkDataObjectDecorator.h"
24 
25 namespace itk
26 {
27 namespace Statistics
28 {
43 template <typename TSample>
44 class ITK_TEMPLATE_EXPORT WeightedCovarianceSampleFilter : public CovarianceSampleFilter<TSample>
45 {
46 public:
47  ITK_DISALLOW_COPY_AND_MOVE(WeightedCovarianceSampleFilter);
48 
54 
57  itkNewMacro(Self);
59 
61  using SampleType = typename Superclass::SampleType;
62  using MeasurementVectorType = typename Superclass::MeasurementVectorType;
63  using MeasurementVectorSizeType = typename Superclass::MeasurementVectorSizeType;
64  using MeasurementType = typename Superclass::MeasurementType;
65 
67  using MeasurementVectorRealType = typename Superclass::MeasurementVectorRealType;
68  using MeasurementRealType = typename Superclass::MeasurementRealType;
69 
70 
72  using WeightValueType = double;
73 
74 
77 
80 
82  itkSetGetDecoratedInputMacro(Weights, WeightArrayType);
83 
84 
87 
90 
92  itkSetGetDecoratedObjectInputMacro(WeightingFunction, WeightingFunctionType);
93 
94 
96  using MatrixType = typename Superclass::MatrixType;
97  using MatrixDecoratedType = typename Superclass::MatrixDecoratedType;
98 
100  using MeasurementVectorDecoratedType = typename Superclass::MeasurementVectorDecoratedType;
101  using OutputType = typename Superclass::OutputType;
102 
103 protected:
105  ~WeightedCovarianceSampleFilter() override = default;
106  void
107  PrintSelf(std::ostream & os, Indent indent) const override;
108 
109  void
110  GenerateData() override;
111 
113  void
114  ComputeCovarianceMatrixWithWeightingFunction();
115 
117  void
118  ComputeCovarianceMatrixWithWeights();
119 }; // end of class
120 } // end of namespace Statistics
121 } // end of namespace itk
122 
123 #ifndef ITK_MANUAL_INSTANTIATION
124 # include "itkWeightedCovarianceSampleFilter.hxx"
125 #endif
126 
127 #endif
itk::Statistics::WeightedCovarianceSampleFilter
Calculates the covariance matrix of the target sample data. where each measurement vector has an asso...
Definition: itkWeightedCovarianceSampleFilter.h:44
itk::SimpleDataObjectDecorator
Decorates any "simple" data type (data types without smart pointers) with a DataObject API.
Definition: itkSimpleDataObjectDecorator.h:66
itk::Statistics::CovarianceSampleFilter::MeasurementVectorRealType
typename NumericTraits< MeasurementVectorType >::RealType MeasurementVectorRealType
Definition: itkCovarianceSampleFilter.h:80
itk::Statistics::CovarianceSampleFilter
Calculates the covariance matrix of the target sample data.
Definition: itkCovarianceSampleFilter.h:53
itk::Statistics::CovarianceSampleFilter::SampleType
TSample SampleType
Definition: itkCovarianceSampleFilter.h:63
itk::SmartPointer< Self >
itk::Statistics::CovarianceSampleFilter::MeasurementType
typename SampleType::MeasurementType MeasurementType
Definition: itkCovarianceSampleFilter.h:77
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::VariableSizeMatrix
A templated class holding a M x N size Matrix.
Definition: itkVariableSizeMatrix.h:45
itk::DataObjectDecorator
Decorates any subclass of itkObject with a DataObject API.
Definition: itkDataObjectDecorator.h:66
itkFunctionBase.h
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::Statistics::CovarianceSampleFilter::MeasurementRealType
typename NumericTraits< MeasurementType >::RealType MeasurementRealType
Definition: itkCovarianceSampleFilter.h:83
itkDataObjectDecorator.h
itk::Statistics::WeightedCovarianceSampleFilter::WeightValueType
double WeightValueType
Definition: itkWeightedCovarianceSampleFilter.h:72
itk::FunctionBase
Base class for all ITK function objects.
Definition: itkFunctionBase.h:44
itk::Statistics::CovarianceSampleFilter::MeasurementVectorType
typename SampleType::MeasurementVectorType MeasurementVectorType
Definition: itkCovarianceSampleFilter.h:71
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Statistics::CovarianceSampleFilter::MeasurementVectorSizeType
typename SampleType::MeasurementVectorSizeType MeasurementVectorSizeType
Definition: itkCovarianceSampleFilter.h:74
itk::Array< WeightValueType >
itkCovarianceSampleFilter.h