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);
128 *
this = sample->
Begin();
148 return ( m_Iter != it.
m_Iter );
153 return ( m_Iter == it.
m_Iter );
169 return m_Sample->GetMeasurementVector(*m_Iter);
174 return ( m_Iter - m_Subsample->GetIdHolder().begin() );
183 const Self *classSample):
184 m_Iter(iter), m_Subsample(classSample), m_Sample( classSample->GetSample() )
188 typename InstanceIdentifierHolder::const_iterator
m_Iter;
209 this->ConstIterator::operator=(iter);
218 Iterator(
typename InstanceIdentifierHolder::const_iterator iter,
219 const Self *classSample);
224 Iterator(
typename InstanceIdentifierHolder::iterator iter,
235 Iterator iter(m_IdHolder.begin(),
this);
244 Iterator iter(m_IdHolder.end(),
this);
266 void PrintSelf(std::ostream & os,
Indent indent)
const;
270 void operator=(
const Self &);
280 #ifndef ITK_MANUAL_INSTANTIATION
281 #include "itkSubsample.hxx"