ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkCovarianceSampleFilter.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 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 {
51 template< typename TSample >
52 class ITK_TEMPLATE_EXPORT CovarianceSampleFilter:
53  public ProcessObject
54 {
55 public:
61  typedef TSample SampleType;
62 
65  itkNewMacro(Self);
67 
69  typedef typename SampleType::MeasurementVectorType MeasurementVectorType;
70 
72  typedef typename SampleType::MeasurementVectorSizeType MeasurementVectorSizeType;
73 
75  typedef typename SampleType::MeasurementType MeasurementType;
76 
79 
82 
83 
85  using Superclass::SetInput;
86  void SetInput(const SampleType *sample);
87 
89  const SampleType * GetInput() const;
90 
91 
94 
96  const MatrixType GetCovarianceMatrix() const;
97 
101  const MatrixDecoratedType * GetCovarianceMatrixOutput() const;
102 
103 
105  const MeasurementVectorRealType GetMean() const;
106 
110  const MeasurementVectorDecoratedType * GetMeanOutput() const;
112 
113 
114  MeasurementVectorSizeType GetMeasurementVectorSize() const;
115 
116 protected:
118  virtual ~CovarianceSampleFilter() ITK_OVERRIDE;
119  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
120 
123 
125  using Superclass::MakeOutput;
126  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
127 
128  virtual void GenerateData() ITK_OVERRIDE;
129 
130 private:
131  ITK_DISALLOW_COPY_AND_ASSIGN(CovarianceSampleFilter);
132 
133 }; // end of class
134 } // end of namespace Statistics
135 } // end of namespace itk
136 
137 #ifndef ITK_MANUAL_INSTANTIATION
138 #include "itkCovarianceSampleFilter.hxx"
139 #endif
140 
141 #endif
NumericTraits< MeasurementType >::RealType MeasurementRealType
Light weight base class for most itk classes.
VariableSizeMatrix< MeasurementRealType > MatrixType
NumericTraits< MeasurementVectorType >::RealType MeasurementVectorRealType
A templated class holding a M x N size Matrix.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
SampleType::MeasurementVectorType MeasurementVectorType
Decorates any &quot;simple&quot; data type (data types without smart pointers) with a DataObject API...
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
SimpleDataObjectDecorator< MatrixType > MatrixDecoratedType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for all data objects in ITK.
SampleType::MeasurementVectorSizeType MeasurementVectorSizeType
SimpleDataObjectDecorator< MeasurementVectorRealType > MeasurementVectorDecoratedType
Calculates the covariance matrix of the target sample data.