ITK  6.0.0
Insight Toolkit
itkDistanceToCentroidMembershipFunction.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 itkDistanceToCentroidMembershipFunction_h
19#define itkDistanceToCentroidMembershipFunction_h
20
22#include "itkDistanceMetric.h"
23
24namespace itk
25{
26namespace Statistics
27{
44template <typename TVector>
45class ITK_TEMPLATE_EXPORT DistanceToCentroidMembershipFunction : public MembershipFunctionBase<TVector>
46{
47public:
48 ITK_DISALLOW_COPY_AND_MOVE(DistanceToCentroidMembershipFunction);
49
55
57 itkOverrideGetNameOfClassMacro(DistanceToCentroidMembershipFunction);
58 itkNewMacro(Self);
63
65 using MeasurementVectorType = TVector;
66
68 using typename Superclass::MeasurementVectorSizeType;
69
72
77
80
82 itkGetModifiableObjectMacro(DistanceMetric, DistanceMetricType);
83
89 void
90 SetCentroid(const CentroidType & centroid);
91
93 const CentroidType &
94 GetCentroid() const;
95
99 double
100 Evaluate(const MeasurementVectorType & measurement) const override;
101
102protected:
105 void
106 PrintSelf(std::ostream & os, Indent indent) const override;
107
109 typename LightObject::Pointer
110 InternalClone() const override;
111
112private:
113 DistanceMetricPointer m_DistanceMetric{};
114};
115} // end of namespace Statistics
116} // end namespace itk
117
118#ifndef ITK_MANUAL_INSTANTIATION
119# include "itkDistanceToCentroidMembershipFunction.hxx"
120#endif
121
122#endif
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
this class declares common interfaces for distance functions.
DistanceToCentroidMembershipFunction models class membership using a distance metric.
void SetMeasurementVectorSize(MeasurementVectorSizeType) override
void SetCentroid(const CentroidType &centroid)
LightObject::Pointer InternalClone() const override
double Evaluate(const MeasurementVectorType &measurement) const override
void PrintSelf(std::ostream &os, Indent indent) const override
MembershipFunctionBase defines common interfaces for membership functions.
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....