ITK  6.0.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
25namespace itk
26{
27namespace Statistics
28{
48template <typename TSample>
49class ITK_TEMPLATE_EXPORT MeanSampleFilter : public ProcessObject
50{
51public:
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
106
107protected:
109 ~MeanSampleFilter() override = default;
110
113
115 using Superclass::MakeOutput;
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
SmartPointer< Self > Pointer
Light weight base class for most itk classes.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
Decorates any "simple" data type (data types without smart pointers) with a DataObject API.
Given a sample, this filter computes the sample mean.
MeasurementVectorSizeType GetMeasurementVectorSize() const
typename SampleType::MeasurementVectorSizeType MeasurementVectorSizeType
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override
Make a DataObject of the correct type to used as the specified output.
~MeanSampleFilter() override=default
const SampleType * GetInput() const
void SetInput(const SampleType *sample)
typename NumericTraits< MeasurementType >::RealType MeasurementRealType
typename NumericTraits< MeasurementVectorType >::RealType MeasurementVectorRealType
const MeasurementVectorRealType GetMean() const
const MeasurementVectorDecoratedType * GetOutput() const
typename SampleType::MeasurementVectorType MeasurementVectorType
typename SampleType::MeasurementType MeasurementType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:41