ITK  6.0.0
Insight Toolkit
itkGaussianMixtureModelComponent.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 itkGaussianMixtureModelComponent_h
19#define itkGaussianMixtureModelComponent_h
20
25
26namespace itk
27{
28namespace Statistics
29{
50template <typename TSample>
51class ITK_TEMPLATE_EXPORT GaussianMixtureModelComponent : public MixtureModelComponentBase<TSample>
52{
53public:
59
61 itkOverrideGetNameOfClassMacro(GaussianMixtureModelComponent);
62 itkNewMacro(Self);
66 using typename Superclass::MeasurementVectorType;
67 using typename Superclass::MeasurementVectorSizeType;
68 using typename Superclass::MembershipFunctionType;
69 using typename Superclass::WeightArrayType;
70 using typename Superclass::ParametersType;
71
74
79
82
85
87 void
88 SetSample(const TSample * sample) override;
89
91 void
92 SetParameters(const ParametersType & parameters) override;
93
94protected:
96 ~GaussianMixtureModelComponent() override = default;
97 void
98 PrintSelf(std::ostream & os, Indent indent) const override;
99
102 double
104
106 void
107 GenerateData() override;
108
109private:
110 typename NativeMembershipFunctionType::Pointer m_GaussianMembershipFunction{};
111
113
114 typename CovarianceEstimatorType::MatrixType m_Covariance{};
115
116 typename MeanEstimatorType::Pointer m_MeanEstimator{};
117
118 typename CovarianceEstimatorType::Pointer m_CovarianceEstimator{};
119}; // end of class
120} // end of namespace Statistics
121} // end of namespace itk
122
123#ifndef ITK_MANUAL_INSTANTIATION
124# include "itkGaussianMixtureModelComponent.hxx"
125#endif
126
127#endif
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Decorates any "simple" data type (data types without smart pointers) with a DataObject API.
GaussianMembershipFunction models class membership through a multivariate Gaussian function.
is a component (derived from MixtureModelComponentBase) for Gaussian class. This class is used in Exp...
void SetParameters(const ParametersType &parameters) override
typename CovarianceEstimatorType::OutputType CovarianceMatrixType
void PrintSelf(std::ostream &os, Indent indent) const override
void SetSample(const TSample *sample) override
typename SampleType::MeasurementVectorType MeasurementVectorType
base class for distribution modules that supports analytical way to update the distribution parameter...
Calculates the covariance matrix of the target sample data. where each measurement vector has an asso...
Given a sample where each measurement vector has associated weight value, this filter computes the sa...
A templated class holding a M x N size Matrix.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....