18 #ifndef itkMembershipSample_h
19 #define itkMembershipSample_h
21 #include "itksys/hash_map.hxx"
55 template<
typename TSample >
102 void SetNumberOfClasses(
unsigned int numberOfClasses);
105 itkGetConstMacro(NumberOfClasses,
unsigned int);
132 const unsigned int & dimension);
141 virtual void Graft(
const DataObject *thatObject) ITK_OVERRIDE;
153 *
this = sample->Begin();
183 ++m_InstanceIdentifier;
189 return m_Sample->GetFrequency(m_InstanceIdentifier);
194 return m_Sample->GetMeasurementVector(m_InstanceIdentifier);
199 return m_InstanceIdentifier;
204 return m_MembershipSample->GetClassLabel(m_InstanceIdentifier);
214 m_Sample( memberSample->GetSample() ), m_MembershipSample(memberSample), m_InstanceIdentifier(iid)
237 this->ConstIterator::operator=(iter);
271 Iterator iter(
this, m_Sample->Size() );
293 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
300 int GetInternalClassLabel(
const ClassLabelType classLabel)
const;
311 #ifndef ITK_MANUAL_INSTANTIATION
312 #include "itkMembershipSample.hxx"
ConstIterator & operator++()
InstanceIdentifier GetInstanceIdentifier() const
SampleType::AbsoluteFrequencyType AbsoluteFrequencyType
SampleType::MeasurementType MeasurementType
std::vector< ClassSamplePointer > m_ClassSamples
InstanceIdentifier m_InstanceIdentifier
SampleType::MeasurementVectorType MeasurementVectorType
Subsample< SampleType > ClassSampleType
ConstIterator(const Self *sample)
unsigned int m_NumberOfClasses
IdentifierType ClassLabelType
itksys::hash_map< InstanceIdentifier, ClassLabelType > ClassLabelHolderType
This class stores a subset of instance identifiers from another sample object. You can create a subsa...
Container for storing the instance-identifiers of other sample with their associated class labels...
UniqueClassLabelsType m_UniqueClassLabels
SampleType::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
Iterator & operator=(const Iterator &iter)
SizeValueType IdentifierType
virtual ~MembershipSample() override
const MembershipSample * m_MembershipSample
ConstIterator & operator=(const ConstIterator &iter)
SmartPointer< const Self > ConstPointer
ConstIterator(const ConstIterator &iter)
Iterator(Self *memberSample, InstanceIdentifier iid)
AbsoluteFrequencyType GetFrequency() const
ClassLabelHolderType m_ClassLabelHolder
unsigned int GetClassLabel() const
SampleConstPointer m_Sample
bool operator==(const ConstIterator &it)
ConstIterator(const Self *memberSample, InstanceIdentifier iid)
std::vector< ClassLabelType > UniqueClassLabelsType
Iterator(const Iterator &iter)
SampleType::ConstPointer SampleConstPointer
A collection of measurements for statistical analysis.
Control indentation during Print() invocation.
ClassSampleType::Pointer ClassSamplePointer
bool operator!=(const ConstIterator &it)
SmartPointer< Self > Pointer
const MeasurementVectorType & GetMeasurementVector() const
ConstIterator End() const
SampleType::InstanceIdentifier InstanceIdentifier
ConstIterator Begin() const
Base class for all data objects in ITK.
ClassSampleType::ConstPointer ClassSampleConstPointer