ITK  5.4.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 
26 namespace itk
27 {
28 namespace Statistics
29 {
50 template <typename TSample>
51 class ITK_TEMPLATE_EXPORT GaussianMixtureModelComponent : public MixtureModelComponentBase<TSample>
52 {
53 public:
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 
94 protected:
96  ~GaussianMixtureModelComponent() override = default;
97  void
98  PrintSelf(std::ostream & os, Indent indent) const override;
99 
102  double
103  CalculateParametersChange();
104 
106  void
107  GenerateData() override;
108 
109 private:
110  typename NativeMembershipFunctionType::Pointer m_GaussianMembershipFunction{};
111 
112  typename MeanEstimatorType::MeasurementVectorType m_Mean{};
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
itk::Statistics::WeightedCovarianceSampleFilter
Calculates the covariance matrix of the target sample data. where each measurement vector has an asso...
Definition: itkWeightedCovarianceSampleFilter.h:44
itk::Statistics::MixtureModelComponentBase
base class for distribution modules that supports analytical way to update the distribution parameter...
Definition: itkMixtureModelComponentBase.h:57
itk::SimpleDataObjectDecorator
Decorates any "simple" data type (data types without smart pointers) with a DataObject API.
Definition: itkSimpleDataObjectDecorator.h:66
itkGaussianMembershipFunction.h
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::VariableSizeMatrix
A templated class holding a M x N size Matrix.
Definition: itkVariableSizeMatrix.h:45
itk::Statistics::GaussianMixtureModelComponent::CovarianceMatrixType
typename CovarianceEstimatorType::OutputType CovarianceMatrixType
Definition: itkGaussianMixtureModelComponent.h:84
itkMixtureModelComponentBase.h
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::Statistics::GaussianMixtureModelComponent::MeanVectorType
typename MeanEstimatorType::OutputType MeanVectorType
Definition: itkGaussianMixtureModelComponent.h:81
itkWeightedMeanSampleFilter.h
itk::Statistics::GaussianMixtureModelComponent
is a component (derived from MixtureModelComponentBase) for Gaussian class. This class is used in Exp...
Definition: itkGaussianMixtureModelComponent.h:51
itk::Statistics::GaussianMembershipFunction
GaussianMembershipFunction models class membership through a multivariate Gaussian function.
Definition: itkGaussianMembershipFunction.h:56
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Statistics::WeightedMeanSampleFilter
Given a sample where each measurement vector has associated weight value, this filter computes the sa...
Definition: itkWeightedMeanSampleFilter.h:43
itk::Array< double >
itkWeightedCovarianceSampleFilter.h