|
ITK
5.2.0
Insight Toolkit
|
Go to the documentation of this file.
18 #ifndef itkImageRandomNonRepeatingConstIteratorWithIndex_h
19 #define itkImageRandomNonRepeatingConstIteratorWithIndex_h
103 std::ostringstream ostrm;
104 ostrm <<
"Error: RandomPermuation does not have " << i <<
" elements" << std::endl;
105 throw std::runtime_error(ostrm.str());
213 template <
typename TImage>
255 m_Permutation =
nullptr;
260 operator=(
const Self & it);
266 m_NumberOfSamplesDone = 0L;
267 this->UpdatePosition();
275 m_NumberOfSamplesDone = m_NumberOfSamplesRequested;
276 this->UpdatePosition();
284 return (m_NumberOfSamplesDone == 0L);
291 return (m_NumberOfSamplesDone >= m_NumberOfSamplesRequested);
295 static constexpr
unsigned int ImageDimension = TImage::ImageDimension;
313 m_NumberOfSamplesDone++;
314 this->UpdatePosition();
324 m_NumberOfSamplesDone--;
325 this->UpdatePosition();
335 GetNumberOfSamples()
const;
344 ReinitializeSeed(
int);
357 #ifndef ITK_MANUAL_INSTANTIATION
358 # include "itkImageRandomNonRepeatingConstIteratorWithIndex.hxx"
SizeValueType operator[](SizeValueType i) const
~ImageRandomNonRepeatingConstIteratorWithIndex() override
typename IndexType::IndexValueType IndexValueType
typename TImage::SizeType SizeType
Produce a random permutation of a collection.
typename Statistics::MersenneTwisterRandomVariateGenerator::Pointer GeneratorPointer
typename PixelContainer::Pointer PixelContainerPointer
SizeValueType m_NumberOfSamplesRequested
typename OffsetType::OffsetValueType OffsetValueType
ImageBaseType::SizeType SizeType
void SetPriority(SizeValueType i, SizeValueType priority) const
typename TImage::PixelType PixelType
RandomPermutation * m_Permutation
typename TImage::IndexType IndexType
typename TImage::InternalPixelType InternalPixelType
ImageBaseType::IndexType IndexType
void ReinitializeSeed() const
SizeValueType m_NumberOfSamplesDone
ImageBaseType::RegionType RegionType
A node to be used when computing permutations.
typename TImage::AccessorType AccessorType
static Pointer New()
Method for creation through the object factory.
bool operator<(const NodeOfPermutation &b) const
A base class for multi-dimensional iterators templated over image type that are designed to efficient...
RandomPermutation & operator=(const RandomPermutation &it)
NodeOfPermutation * m_Permutation
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
signed long OffsetValueType
GeneratorPointer m_Generator
typename TImage::RegionType RegionType
A multi-dimensional image iterator that visits a random set of pixels within an image region....
signed long IndexValueType
Templated n-dimensional image class.
void ReinitializeSeed(unsigned int seed) const
typename TImage::PixelContainer PixelContainer
typename SizeType::SizeValueType SizeValueType
Self & operator=(const Self &it)
unsigned long SizeValueType
RandomPermutation(SizeValueType sz)
SizeValueType m_NumberOfPixelsInRegion
typename TImage::OffsetType OffsetType
ImageRandomNonRepeatingConstIteratorWithIndex(const ImageConstIteratorWithIndex< TImage > &it)