ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkMahalanobisDistanceMembershipFunction.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 itkMahalanobisDistanceMembershipFunction_h
19#define itkMahalanobisDistanceMembershipFunction_h
20
23
25
26namespace itk::Statistics
27{
59
60template <typename TVector>
61class ITK_TEMPLATE_EXPORT MahalanobisDistanceMembershipFunction : public MembershipFunctionBase<TVector>
62{
63public:
69
72 itkOverrideGetNameOfClassMacro(MahalanobisDistanceMembershipFunction);
73 itkNewMacro(Self);
77
79 using MeasurementVectorType = TVector;
80
83
88
91
94 void
95 SetMean(const MeanVectorType & mean);
96
99 itkGetConstReferenceMacro(Mean, MeanVectorType);
100
104 void
106
111 itkGetConstReferenceMacro(Covariance, CovarianceMatrixType);
112
118 double
119 Evaluate(const MeasurementVectorType & measurement) const override;
120
124 [[nodiscard]] LightObject::Pointer
125 InternalClone() const override;
126
127protected:
130 void
131 PrintSelf(std::ostream & os, Indent indent) const override;
132
133private:
135 CovarianceMatrixType m_Covariance{}; // covariance matrix
136
137 // inverse covariance matrix. automatically calculated
138 // when covariance matrix is set.
140
143};
144} // namespace itk::Statistics
145
146#ifndef ITK_MANUAL_INSTANTIATION
147# include "itkMahalanobisDistanceMembershipFunction.hxx"
148#endif
149
150#endif
Control indentation during Print() invocation.
Definition itkIndent.h:51
SmartPointer< Self > Pointer
Implements transparent reference counting.
typename itk::NumericTraits< MeasurementVectorType >::RealType MeasurementVectorRealType
void PrintSelf(std::ostream &os, Indent indent) const override
double Evaluate(const MeasurementVectorType &measurement) const override
LightObject::Pointer InternalClone() const override
void SetCovariance(const CovarianceMatrixType &cov)
A templated class holding a M x N size Matrix.