ITK  6.0.0
Insight Toolkit
itkWeightedMeanSampleFilter.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 itkWeightedMeanSampleFilter_h
19#define itkWeightedMeanSampleFilter_h
20
21#include "itkMeanSampleFilter.h"
22#include "itkFunctionBase.h"
24
25namespace itk
26{
27namespace Statistics
28{
42template <typename TSample>
43class ITK_TEMPLATE_EXPORT WeightedMeanSampleFilter : public MeanSampleFilter<TSample>
44{
45public:
46 ITK_DISALLOW_COPY_AND_MOVE(WeightedMeanSampleFilter);
47
53
55 itkOverrideGetNameOfClassMacro(WeightedMeanSampleFilter);
56 itkNewMacro(Self);
60 using typename Superclass::SampleType;
61 using typename Superclass::MeasurementVectorType;
62 using typename Superclass::MeasurementVectorSizeType;
63 using typename Superclass::MeasurementType;
64
66 using typename Superclass::MeasurementVectorRealType;
67 using typename Superclass::MeasurementRealType;
68
69
71 using WeightValueType = double;
72
73
76
79
81 itkSetGetDecoratedInputMacro(Weights, WeightArrayType);
82
83
86
89
91 itkSetGetDecoratedObjectInputMacro(WeightingFunction, WeightingFunctionType);
92
93
95 using typename Superclass::MeasurementVectorDecoratedType;
96 using typename Superclass::OutputType;
97
98protected:
100 ~WeightedMeanSampleFilter() override = default;
101
102 void
103 GenerateData() override;
104
105 // compute mean with weight array
106 void
108
109 // compute mean using a weighting function
110 void
112}; // end of class
113} // end of namespace Statistics
114} // end of namespace itk
115
116#ifndef ITK_MANUAL_INSTANTIATION
117# include "itkWeightedMeanSampleFilter.hxx"
118#endif
119
120#endif
Decorates any subclass of itkObject with a DataObject API.
Base class for all ITK function objects.
Light weight base class for most itk classes.
Decorates any "simple" data type (data types without smart pointers) with a DataObject API.
Given a sample, this filter computes the sample mean.
Given a sample where each measurement vector has associated weight value, this filter computes the sa...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....