18 #ifndef itkSubsample_h
19 #define itkSubsample_h
40 template<
typename TSample >
110 void Swap(
unsigned int index1,
unsigned int index2);
129 *
this = sample->
Begin();
149 return ( m_Iter != it.
m_Iter );
154 return ( m_Iter == it.
m_Iter );
165 return m_Sample->GetFrequency(*m_Iter);
170 return m_Sample->GetMeasurementVector(*m_Iter);
175 return ( m_Iter - m_Subsample->GetIdHolder().begin() );
184 const Self *classSample):
189 typename InstanceIdentifierHolder::const_iterator
m_Iter;
221 Iterator(
typename InstanceIdentifierHolder::const_iterator iter,
222 const Self *classSample);
227 Iterator(
typename InstanceIdentifierHolder::iterator iter,
284 #ifndef ITK_MANUAL_INSTANTIATION
285 #include "itkSubsample.hxx"
InstanceIdentifier GetInstanceIdentifier(unsigned int index)
ConstIterator(typename InstanceIdentifierHolder::const_iterator iter, const Self *classSample)
void Swap(unsigned int index1, unsigned int index2)
AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override
const MeasurementVectorType & GetMeasurementVector() const
TotalAbsoluteFrequencyType GetTotalFrequency() const override
AbsoluteFrequencyType GetFrequencyByIndex(unsigned int index) const
Iterator(const Iterator &iter)
const MeasurementVectorType & GetMeasurementVectorByIndex(unsigned int index) const
virtual void Graft(const DataObject *thatObject) override
TSample::MeasurementType MeasurementType
bool operator==(const ConstIterator &it)
bool operator!=(const ConstIterator &it)
SmartPointer< const Self > ConstPointer
This class stores a subset of instance identifiers from another sample object. You can create a subsa...
TSample::InstanceIdentifier InstanceIdentifier
TSample::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
unsigned int m_ActiveDimension
ConstIterator & operator++()
void InitializeWithAllInstances()
Iterator & operator=(const Iterator &iter)
InstanceIdentifierHolder m_IdHolder
InstanceIdentifier GetInstanceIdentifier() const
TSample::Pointer SamplePointer
InstanceIdentifier Size() const override
InstanceIdentifierHolder::const_iterator m_Iter
TSample::AbsoluteFrequencyType AbsoluteFrequencyType
const TSample * GetSample() const
ConstIterator(const Self *sample)
void AddInstance(InstanceIdentifier id)
SmartPointer< Self > Pointer
MeasurementVectorType ValueType
ConstIterator(const ConstIterator &iter)
TotalAbsoluteFrequencyType m_TotalFrequency
void PrintSelf(std::ostream &os, Indent indent) const override
TSample::MeasurementVectorType MeasurementVectorType
AbsoluteFrequencyType GetFrequency() const
ConstIterator & operator=(const ConstIterator &iter)
ConstIterator End() const
void SetSample(const TSample *sample)
virtual const InstanceIdentifierHolder & GetIdHolder() const
Control indentation during Print() invocation.
const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const override
Iterator(typename InstanceIdentifierHolder::iterator iter, Self *classSample)
ConstIterator Begin() const
Base class for all data objects in ITK.
std::vector< InstanceIdentifier > InstanceIdentifierHolder
void operator=(const Self &)