ITK  5.2.0
Insight Toolkit
itkCovarianceSampleFilter.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 itkCovarianceSampleFilter_h
19 #define itkCovarianceSampleFilter_h
20 
21 #include "itkProcessObject.h"
22 
23 #include "itkVariableSizeMatrix.h"
25 
26 namespace itk
27 {
28 namespace Statistics
29 {
52 template <typename TSample>
53 class ITK_TEMPLATE_EXPORT CovarianceSampleFilter : public ProcessObject
54 {
55 public:
56  ITK_DISALLOW_COPY_AND_MOVE(CovarianceSampleFilter);
57 
63  using SampleType = TSample;
64 
67  itkNewMacro(Self);
69 
71  using MeasurementVectorType = typename SampleType::MeasurementVectorType;
72 
74  using MeasurementVectorSizeType = typename SampleType::MeasurementVectorSizeType;
75 
77  using MeasurementType = typename SampleType::MeasurementType;
78 
81 
84 
85 
87  using Superclass::SetInput;
88  void
89  SetInput(const SampleType * sample);
90 
92  const SampleType *
93  GetInput() const;
94 
95 
98 
100  const MatrixType
101  GetCovarianceMatrix() const;
102 
106  const MatrixDecoratedType *
107  GetCovarianceMatrixOutput() const;
108 
109 
112  GetMean() const;
113 
118  GetMeanOutput() const;
120 
121 
123  GetMeasurementVectorSize() const;
124 
125 protected:
127  ~CovarianceSampleFilter() override = default;
128  void
129  PrintSelf(std::ostream & os, Indent indent) const override;
130 
133 
135  using Superclass::MakeOutput;
137  MakeOutput(DataObjectPointerArraySizeType idx) override;
138 
139  void
140  GenerateData() override;
141 }; // end of class
142 } // end of namespace Statistics
143 } // end of namespace itk
144 
145 #ifndef ITK_MANUAL_INSTANTIATION
146 # include "itkCovarianceSampleFilter.hxx"
147 #endif
148 
149 #endif
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
itkVariableSizeMatrix.h
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::ProcessObject::DataObjectPointerArraySizeType
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
Definition: itkProcessObject.h:193
itk::VariableSizeMatrix
A templated class holding a M x N size Matrix.
Definition: itkVariableSizeMatrix.h:45
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
itkProcessObject.h
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::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::Statistics::CovarianceSampleFilter::MeasurementVectorSizeType
typename SampleType::MeasurementVectorSizeType MeasurementVectorSizeType
Definition: itkCovarianceSampleFilter.h:74
itk::ProcessObject
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:41
itk::NumericTraits::RealType
double RealType
Definition: itkNumericTraits.h:84
itkSimpleDataObjectDecorator.h
itk::DataObject::Pointer
SmartPointer< Self > Pointer
Definition: itkDataObject.h:301