ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkMixtureModelComponentBase.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 itkMixtureModelComponentBase_h
19#define itkMixtureModelComponentBase_h
20
21#include "vnl/vnl_vector.h"
22#include "vnl/vnl_matrix.h"
23
24#include "itkArray.h"
25#include "itkObject.h"
27
28namespace itk::Statistics
29{
53
54template <typename TSample>
55class ITK_TEMPLATE_EXPORT MixtureModelComponentBase : public Object
56{
57public:
63
65 itkOverrideGetNameOfClassMacro(MixtureModelComponentBase);
66
67 using MeasurementVectorType = typename TSample::MeasurementVectorType;
68 using MeasurementVectorSizeType = typename TSample::MeasurementVectorSizeType;
69
72
75
77
79 virtual void
80 SetSample(const TSample * sample);
81
83 const TSample *
84 GetSample() const;
85
92
93 void
95 {
97 }
98
99 double
104
105 virtual void
106 SetParameters(const ParametersType & parameters);
107
108 virtual ParametersType
110 {
111 return m_Parameters;
112 }
113
116 void
118
120 bool
122
124 void
125 SetWeight(unsigned int index, double value);
126
128 double
129 GetWeight(unsigned int index) const;
130
132 double
134
136 itkGetConstReferenceMacro(Weights, WeightArrayType);
137
138 virtual void
140
141protected:
143 ~MixtureModelComponentBase() override = default;
144 void
145 PrintSelf(std::ostream & os, Indent indent) const override;
146
150 void
152
153 virtual void
155
156private:
158 const TSample * m_Sample{};
159
161
163
166
169
172}; // end of class
173} // namespace itk::Statistics
174
175#ifndef ITK_MANUAL_INSTANTIATION
176# include "itkMixtureModelComponentBase.hxx"
177#endif
178
179#endif
Array class with size defined at construction time.
Definition itkArray.h:48
Control indentation during Print() invocation.
Definition itkIndent.h:50
Implements transparent reference counting.
MembershipFunctionBase defines common interfaces for membership functions.
virtual void SetSample(const TSample *sample)
typename TSample::MeasurementVectorType MeasurementVectorType
double GetWeight(unsigned int index) const
virtual void SetParameters(const ParametersType &parameters)
MembershipFunctionType * GetMembershipFunction()
MembershipFunctionBase< MeasurementVectorType > MembershipFunctionType
typename TSample::MeasurementVectorSizeType MeasurementVectorSizeType
void SetWeight(unsigned int index, double value)
void SetMembershipFunction(MembershipFunctionType *function)
double Evaluate(MeasurementVectorType &measurements)
void PrintSelf(std::ostream &os, Indent indent) const override