ITK  4.2.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< class TSample >
52 class ITK_EXPORT CovarianceSampleFilter:
53  public ProcessObject
54 {
55 public:
61  typedef TSample SampleType;
62 
65  itkNewMacro(Self);
67 
69  typedef typename TSample::MeasurementVectorSizeType MeasurementVectorSizeType;
70 
72  typedef typename TSample::MeasurementVectorType MeasurementVectorType;
73 
75  typedef typename TSample::MeasurementType MeasurementType;
77 
80 
83 
85  using Superclass::SetInput;
86  void SetInput(const SampleType *sample);
87 
88  const SampleType * GetInput() const;
89 
93 
97 
99 
101  const MatrixType GetCovarianceMatrix() const;
102 
103  const MatrixDecoratedType * GetCovarianceMatrixOutput() const;
104 
106  const MeasurementVectorRealType GetMean() const;
107 
108  const MeasurementVectorDecoratedType * GetMeanOutput() const;
109 
110  MeasurementVectorSizeType GetMeasurementVectorSize() const;
111 
112 protected:
114  virtual ~CovarianceSampleFilter();
115  void PrintSelf(std::ostream & os, Indent indent) const;
116 
119 
121  using Superclass::MakeOutput;
122  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
123 
124  void GenerateData();
125 
126 private:
127  CovarianceSampleFilter(const Self &); //purposely not implemented
128  void operator=(const Self &); //purposely not implemented
129 
130 }; // end of class
131 } // end of namespace Statistics
132 } // end of namespace itk
133 
134 #ifndef ITK_MANUAL_INSTANTIATION
135 #include "itkCovarianceSampleFilter.hxx"
136 #endif
137 
138 #endif
139