|
ITK
5.2.0
Insight Toolkit
|
Go to the documentation of this file.
18 #ifndef itkMembershipSample_h
19 #define itkMembershipSample_h
21 #include <unordered_map>
56 template <
typename TSample>
106 SetNumberOfClasses(
unsigned int numberOfClasses);
109 itkGetConstMacro(NumberOfClasses,
unsigned int);
131 GetClassLabelHolder()
const;
149 GetTotalFrequency()
const;
153 Graft(
const DataObject * thatObject)
override;
195 ++m_InstanceIdentifier;
202 return m_Sample->GetFrequency(m_InstanceIdentifier);
208 return m_Sample->GetMeasurementVector(m_InstanceIdentifier);
214 return m_InstanceIdentifier;
220 return m_MembershipSample->GetClassLabel(m_InstanceIdentifier);
229 : m_Sample(memberSample->GetSample())
230 , m_MembershipSample(memberSample)
231 , m_InstanceIdentifier(iid)
256 this->ConstIterator::operator=(iter);
292 Iterator iter(
this, m_Sample->Size());
317 PrintSelf(std::ostream & os,
Indent indent)
const override;
323 GetInternalClassLabel(
const ClassLabelType classLabel)
const;
334 #ifndef ITK_MANUAL_INSTANTIATION
335 # include "itkMembershipSample.hxx"
bool operator==(const ConstIterator &it) const
typename SampleType::ConstPointer SampleConstPointer
const MeasurementVectorType & GetMeasurementVector() const
Container for storing the instance-identifiers of other sample with their associated class labels.
typename SampleType::MeasurementVectorType MeasurementVectorType
AbsoluteFrequencyType GetFrequency() const
unsigned int m_NumberOfClasses
typename SampleType::MeasurementType MeasurementType
InstanceIdentifier m_InstanceIdentifier
SampleConstPointer m_Sample
ConstIterator(const Self *memberSample, InstanceIdentifier iid)
ConstIterator(const ConstIterator &iter)
Control indentation during Print() invocation.
ClassLabelHolderType m_ClassLabelHolder
ConstIterator Begin() const
Iterator(Self *memberSample, InstanceIdentifier iid)
Iterator(const Iterator &iter)
std::vector< ClassSamplePointer > m_ClassSamples
ConstIterator & operator++()
typename ClassSampleType::Pointer ClassSamplePointer
typename SampleType::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
typename SampleType::InstanceIdentifier InstanceIdentifier
const MembershipSample * m_MembershipSample
This class stores a subset of instance identifiers from another sample object. You can create a subsa...
ConstIterator End() const
std::vector< ClassLabelType > UniqueClassLabelsType
InstanceIdentifier GetInstanceIdentifier() const
class ITK_FORWARD_EXPORT DataObject
ConstIterator(const Self *sample)
UniqueClassLabelsType m_UniqueClassLabels
typename SampleType::AbsoluteFrequencyType AbsoluteFrequencyType
Iterator & operator=(const Iterator &iter)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
bool operator!=(const ConstIterator &it) const
typename ClassSampleType::ConstPointer ClassSampleConstPointer
A collection of measurements for statistical analysis.
Base class for most ITK classes.
unsigned int GetClassLabel() const
ConstIterator & operator=(const ConstIterator &iter)
SizeValueType IdentifierType
IdentifierType ClassLabelType
Base class for all data objects in ITK.
std::unordered_map< InstanceIdentifier, ClassLabelType > ClassLabelHolderType