ITK  5.4.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  * https://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  itkOverrideGetNameOfClassMacro(MeanSampleFilter);
63  itkNewMacro(Self);
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 
113 
115  using Superclass::MakeOutput;
117  MakeOutput(DataObjectPointerArraySizeType idx) override;
118 
119  void
120  GenerateData() override;
121 }; // end of class
122 } // end of namespace Statistics
123 } // end of namespace itk
124 
125 #ifndef ITK_MANUAL_INSTANTIATION
126 # include "itkMeanSampleFilter.hxx"
127 #endif
128 
129 #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::ProcessObject::DataObjectPointerArraySizeType
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
Definition: itkProcessObject.h:194
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:55
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:139
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:85
itkSimpleDataObjectDecorator.h
itk::DataObject::Pointer
SmartPointer< Self > Pointer
Definition: itkDataObject.h:301