ITK  5.3.0
Insight Toolkit
itkMeanSampleFilter.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 itkMeanSampleFilter_h
19 #define itkMeanSampleFilter_h
20 
21 #include "itkProcessObject.h"
22 #include "itkArray.h"
24 
25 namespace itk
26 {
27 namespace Statistics
28 {
48 template <typename TSample>
49 class ITK_TEMPLATE_EXPORT MeanSampleFilter : public ProcessObject
50 {
51 public:
52  ITK_DISALLOW_COPY_AND_MOVE(MeanSampleFilter);
53 
59  using SampleType = TSample;
60 
62  itkTypeMacro(MeanSampleFilter, ProcessObject);
63  itkNewMacro(Self);
65 
67  using MeasurementVectorType = typename SampleType::MeasurementVectorType;
68 
70  using MeasurementVectorSizeType = typename SampleType::MeasurementVectorSizeType;
71 
73  using MeasurementType = typename SampleType::MeasurementType;
74 
77 
80 
81 
83  using Superclass::SetInput;
84  void
85  SetInput(const SampleType * sample);
86 
88  const SampleType *
89  GetInput() const;
90 
91 
94  GetMean() const;
95 
100  GetOutput() const;
102 
103 
105  GetMeasurementVectorSize() const;
106 
107 protected:
109  ~MeanSampleFilter() override = default;
110  void
111  PrintSelf(std::ostream & os, Indent indent) const override;
112 
115 
117  using Superclass::MakeOutput;
119  MakeOutput(DataObjectPointerArraySizeType idx) override;
120 
121  void
122  GenerateData() override;
123 }; // end of class
124 } // end of namespace Statistics
125 } // end of namespace itk
126 
127 #ifndef ITK_MANUAL_INSTANTIATION
128 # include "itkMeanSampleFilter.hxx"
129 #endif
130 
131 #endif
itk::SimpleDataObjectDecorator
Decorates any "simple" data type (data types without smart pointers) with a DataObject API.
Definition: itkSimpleDataObjectDecorator.h:66
itk::Statistics::MeanSampleFilter::MeasurementVectorType
typename SampleType::MeasurementVectorType MeasurementVectorType
Definition: itkMeanSampleFilter.h:67
itk::Statistics::MeanSampleFilter::MeasurementType
typename SampleType::MeasurementType MeasurementType
Definition: itkMeanSampleFilter.h:73
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ProcessObject::DataObjectPointerArraySizeType
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
Definition: itkProcessObject.h:193
itk::Statistics::MeanSampleFilter::MeasurementVectorRealType
typename NumericTraits< MeasurementVectorType >::RealType MeasurementVectorRealType
Definition: itkMeanSampleFilter.h:76
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::Statistics::MeanSampleFilter::MeasurementVectorSizeType
typename SampleType::MeasurementVectorSizeType MeasurementVectorSizeType
Definition: itkMeanSampleFilter.h:70
itk::Statistics::MeanSampleFilter
Given a sample, this filter computes the sample mean.
Definition: itkMeanSampleFilter.h:49
itkProcessObject.h
itk::Statistics::MeanSampleFilter::MeasurementRealType
typename NumericTraits< MeasurementType >::RealType MeasurementRealType
Definition: itkMeanSampleFilter.h:79
itkArray.h
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::ProcessObject
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:41
itk::Statistics::MeanSampleFilter::SampleType
TSample SampleType
Definition: itkMeanSampleFilter.h:59
itk::NumericTraits::RealType
double RealType
Definition: itkNumericTraits.h:84
itkSimpleDataObjectDecorator.h
itk::DataObject::Pointer
SmartPointer< Self > Pointer
Definition: itkDataObject.h:301