![]() |
ITK
4.13.0
Insight Segmentation and Registration Toolkit
|
#include <itkImageRandomConstIteratorWithIndex.h>
A multi-dimensional image iterator that visits a random set of pixels within an image region.
ImageRandomConstIteratorWithIndex is a multi-dimensional iterator class that is templated over image type. ImageRandomConstIteratorWithIndex is constrained to walk only within the specified region. It samples random pixel positions at each increment or decrement.
ImageRandomConstIteratorWithIndex assumes a particular layout of the image data. The is arranged in a 1D array as if it were [][][][slice][row][col] with Index[0] = col, Index[1] = row, Index[2] = slice, etc.
The operator++ method provides a simple syntax for walking around a region of a multidimensional image. operator++ performs a jump to a random position within the specified image region. This is designed to facilitate the extraction of random samples from the image.
This is the typical use of this iterator in a loop:
or
Definition at line 116 of file itkImageRandomConstIteratorWithIndex.h.
Private Types | |
typedef Statistics::MersenneTwisterRandomVariateGenerator::Pointer | GeneratorPointer |
Private Member Functions | |
void | RandomJump () |
Private Attributes | |
GeneratorPointer | m_Generator |
SizeValueType | m_NumberOfPixelsInRegion |
SizeValueType | m_NumberOfSamplesDone |
SizeValueType | m_NumberOfSamplesRequested |
Additional Inherited Members | |
![]() | |
static unsigned int | GetImageDimension () |
![]() | |
static const unsigned int | ImageDimension = TImage::ImageDimension |
![]() | |
const InternalPixelType * | m_Begin |
IndexType | m_BeginIndex |
const InternalPixelType * | m_End |
IndexType | m_EndIndex |
TImage::ConstWeakPointer | m_Image |
OffsetValueType | m_OffsetTable [ImageDimension+1] |
AccessorType | m_PixelAccessor |
AccessorFunctorType | m_PixelAccessorFunctor |
const InternalPixelType * | m_Position |
IndexType | m_PositionIndex |
RegionType | m_Region |
bool | m_Remaining |
typedef Superclass::AccessorType itk::ImageRandomConstIteratorWithIndex< TImage >::AccessorType |
Definition at line 133 of file itkImageRandomConstIteratorWithIndex.h.
|
private |
Definition at line 218 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::ImageType itk::ImageRandomConstIteratorWithIndex< TImage >::ImageType |
Definition at line 128 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::IndexType itk::ImageRandomConstIteratorWithIndex< TImage >::IndexType |
Inherit types from the superclass
Definition at line 124 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::IndexValueType itk::ImageRandomConstIteratorWithIndex< TImage >::IndexValueType |
Definition at line 134 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::InternalPixelType itk::ImageRandomConstIteratorWithIndex< TImage >::InternalPixelType |
Definition at line 131 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::OffsetType itk::ImageRandomConstIteratorWithIndex< TImage >::OffsetType |
Definition at line 126 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::OffsetValueType itk::ImageRandomConstIteratorWithIndex< TImage >::OffsetValueType |
Definition at line 135 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::PixelContainer itk::ImageRandomConstIteratorWithIndex< TImage >::PixelContainer |
Definition at line 129 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::PixelContainerPointer itk::ImageRandomConstIteratorWithIndex< TImage >::PixelContainerPointer |
Definition at line 130 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::PixelType itk::ImageRandomConstIteratorWithIndex< TImage >::PixelType |
Definition at line 132 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::RegionType itk::ImageRandomConstIteratorWithIndex< TImage >::RegionType |
Definition at line 127 of file itkImageRandomConstIteratorWithIndex.h.
typedef ImageRandomConstIteratorWithIndex itk::ImageRandomConstIteratorWithIndex< TImage >::Self |
Standard class typedefs.
Definition at line 120 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::SizeType itk::ImageRandomConstIteratorWithIndex< TImage >::SizeType |
Definition at line 125 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::SizeValueType itk::ImageRandomConstIteratorWithIndex< TImage >::SizeValueType |
Definition at line 136 of file itkImageRandomConstIteratorWithIndex.h.
typedef ImageConstIteratorWithIndex< TImage > itk::ImageRandomConstIteratorWithIndex< TImage >::Superclass |
Definition at line 121 of file itkImageRandomConstIteratorWithIndex.h.
itk::ImageRandomConstIteratorWithIndex< TImage >::ImageRandomConstIteratorWithIndex | ( | ) |
Default constructor. Needed since we provide a cast constructor.
|
inline |
Definition at line 140 of file itkImageRandomConstIteratorWithIndex.h.
itk::ImageRandomConstIteratorWithIndex< TImage >::ImageRandomConstIteratorWithIndex | ( | const ImageType * | ptr, |
const RegionType & | region | ||
) |
Constructor establishes an iterator to walk a particular image and a particular region of that image.
|
inline |
Constructor that can be used to cast from an ImageIterator to an ImageRandomConstIteratorWithIndex. Many routines return an ImageIterator, but for a particular task, you may want an ImageRandomConstIteratorWithIndex. Rather than provide overloaded APIs that return different types of Iterators, itk returns ImageIterators and uses constructors to cast from an ImageIterator to a ImageRandomConstIteratorWithIndex.
Definition at line 152 of file itkImageRandomConstIteratorWithIndex.h.
References itk::ImageConstIteratorWithIndex< TImage >::operator=().
SizeValueType itk::ImageRandomConstIteratorWithIndex< TImage >::GetNumberOfSamples | ( | ) | const |
|
inline |
Move an iterator to the beginning of the region.
Definition at line 158 of file itkImageRandomConstIteratorWithIndex.h.
|
inline |
Move an iterator to one position past the End of the region.
Definition at line 166 of file itkImageRandomConstIteratorWithIndex.h.
|
inline |
Is the iterator at the beginning of the region?
Definition at line 174 of file itkImageRandomConstIteratorWithIndex.h.
|
inline |
Is the iterator at the end of the region?
Definition at line 180 of file itkImageRandomConstIteratorWithIndex.h.
|
inline |
Increment (prefix) the selected dimension. No bounds checking is performed.
Definition at line 187 of file itkImageRandomConstIteratorWithIndex.h.
|
inline |
Decrement (prefix) the selected dimension. No bounds checking is performed.
Definition at line 197 of file itkImageRandomConstIteratorWithIndex.h.
|
private |
void itk::ImageRandomConstIteratorWithIndex< TImage >::ReinitializeSeed | ( | ) |
Reinitialize the seed of the random number generator
void itk::ImageRandomConstIteratorWithIndex< TImage >::ReinitializeSeed | ( | int | ) |
void itk::ImageRandomConstIteratorWithIndex< TImage >::SetNumberOfSamples | ( | SizeValueType | number | ) |
Set/Get number of random samples to get from the image region
|
private |
Definition at line 219 of file itkImageRandomConstIteratorWithIndex.h.
|
private |
Definition at line 222 of file itkImageRandomConstIteratorWithIndex.h.
|
private |
Definition at line 221 of file itkImageRandomConstIteratorWithIndex.h.
|
private |
Definition at line 220 of file itkImageRandomConstIteratorWithIndex.h.