18#ifndef itkMembershipSample_h
19#define itkMembershipSample_h
21#include <unordered_map>
56template <
typename TSample>
109 itkGetConstMacro(NumberOfClasses,
unsigned int);
278 const Iterator iter(
this, 0);
288 const Iterator iter(
this,
m_Sample->Size());
296 const ConstIterator iter(
this, 0);
304 const ConstIterator iter(
this,
m_Sample->Size());
330#ifndef ITK_MANUAL_INSTANTIATION
331# include "itkMembershipSample.hxx"
Control indentation during Print() invocation.
Implements transparent reference counting.
bool operator==(const ConstIterator &it) const
friend class MembershipSample
ConstIterator & operator=(const ConstIterator &iter)
AbsoluteFrequencyType GetFrequency() const
const MembershipSample * m_MembershipSample
ConstIterator & operator++()
const MeasurementVectorType & GetMeasurementVector() const
ConstIterator(const ConstIterator &iter)
InstanceIdentifier m_InstanceIdentifier
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(ConstIterator)
ConstIterator(const Self *memberSample, InstanceIdentifier iid)
ConstIterator(const Self *sample)
InstanceIdentifier GetInstanceIdentifier() const
unsigned int GetClassLabel() const
ConstIterator & operator=(const ConstIterator &it)
friend class MembershipSample
Iterator(const Self *sample)
Iterator & operator=(const Iterator &iter)
Iterator(const Iterator &iter)
Iterator(const ConstIterator &it)
Iterator(Self *memberSample, InstanceIdentifier iid)
std::vector< ClassSamplePointer > m_ClassSamples
typename SampleType::ConstPointer SampleConstPointer
typename ClassSampleType::Pointer ClassSamplePointer
TotalAbsoluteFrequencyType GetTotalFrequency() const
unsigned int m_NumberOfClasses
SmartPointer< Self > Pointer
typename SampleType::MeasurementType MeasurementType
const MeasurementVectorType & GetMeasurementVector(const InstanceIdentifier &id) const
~MembershipSample() override=default
void Graft(const DataObject *thatObject) override
unsigned int GetClassLabel(const InstanceIdentifier &id) const
ClassLabelHolderType m_ClassLabelHolder
typename SampleType::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
ConstIterator End() const
const ClassSampleType * GetClassSample(const ClassLabelType &classLabel) const
typename SampleType::AbsoluteFrequencyType AbsoluteFrequencyType
IdentifierType ClassLabelType
std::vector< ClassLabelType > UniqueClassLabelsType
Subsample< SampleType > ClassSampleType
typename ClassSampleType::ConstPointer ClassSampleConstPointer
typename SampleType::MeasurementVectorType MeasurementVectorType
virtual const SampleType * GetSample() const
std::unordered_map< InstanceIdentifier, ClassLabelType > ClassLabelHolderType
ConstIterator Begin() const
typename SampleType::InstanceIdentifier InstanceIdentifier
SmartPointer< const Self > ConstPointer
UniqueClassLabelsType m_UniqueClassLabels
void PrintSelf(std::ostream &os, Indent indent) const override
void SetNumberOfClasses(unsigned int numberOfClasses)
const ClassLabelHolderType GetClassLabelHolder() const
SampleConstPointer m_Sample
MeasurementType GetMeasurement(const InstanceIdentifier &id, const unsigned int dimension)
void AddInstance(const ClassLabelType &classLabel, const InstanceIdentifier &id)
int GetInternalClassLabel(const ClassLabelType classLabel) const
AbsoluteFrequencyType GetFrequency(const InstanceIdentifier &id) const
A collection of measurements for statistical analysis.
This class stores a subset of instance identifiers from another sample object. You can create a subsa...
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
SizeValueType IdentifierType