18 #ifndef __itkSubsample_h
19 #define __itkSubsample_h
40 template<
class TSample >
79 return this->m_IdHolder;
83 void SetSample(
const TSample *sample);
85 const TSample * GetSample()
const;
88 void InitializeWithAllInstances();
91 void AddInstance(InstanceIdentifier
id);
95 InstanceIdentifier
Size()
const;
102 const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier
id)
const;
105 AbsoluteFrequencyType GetFrequency(InstanceIdentifier
id)
const;
108 TotalAbsoluteFrequencyType GetTotalFrequency()
const;
110 void Swap(
unsigned int index1,
unsigned int index2);
112 InstanceIdentifier GetInstanceIdentifier(
unsigned int index);
114 const MeasurementVectorType & GetMeasurementVectorByIndex(
unsigned int index)
const;
116 AbsoluteFrequencyType GetFrequencyByIndex(
unsigned int index)
const;
119 virtual void Graft(
const DataObject *thatObject);
129 *
this = sample->
Begin();
149 return ( m_Iter != it.
m_Iter );
154 return ( m_Iter == it.
m_Iter );
170 return m_Sample->GetMeasurementVector(*m_Iter);
175 return ( m_Iter - m_Subsample->GetIdHolder().begin() );
184 const Self *classSample):
185 m_Iter(iter), m_Subsample(classSample), m_Sample( classSample->GetSample() )
189 typename InstanceIdentifierHolder::const_iterator
m_Iter;
212 this->ConstIterator::operator=(iter);
221 Iterator(
typename InstanceIdentifierHolder::const_iterator iter,
222 const Self *classSample);
227 Iterator(
typename InstanceIdentifierHolder::iterator iter,
239 Iterator iter(m_IdHolder.begin(),
this);
248 Iterator iter(m_IdHolder.end(),
this);
270 void PrintSelf(std::ostream & os,
Indent indent)
const;
274 void operator=(
const Self &);
284 #ifndef ITK_MANUAL_INSTANTIATION
285 #include "itkSubsample.hxx"