ITK
4.1.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:
ImageRandomConstIteratorWithIndex<ImageType> it( image, image->GetRequestedRegion() ); it.SetNumberOfSamples(200); it.GoToBegin(); while( !it.IsAtEnd() ) { it.Get(); ++it; // here it jumps to another random position inside the region }
or
ImageRandomConstIteratorWithIndex<ImageType> it( image, image->GetRequestedRegion() ); it.SetNumberOfSamples(200); it.GoToEnd(); while( !it.IsAtBegin() ) { it.Get(); --it; // here it jumps to another random position inside the region }
Definition at line 116 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::AccessorType itk::ImageRandomConstIteratorWithIndex< TImage >::AccessorType |
Accessor type that converts data between internal and external representations.
Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.
Reimplemented in itk::ImageRandomIteratorWithIndex< TImage >.
Definition at line 133 of file itkImageRandomConstIteratorWithIndex.h.
typedef Statistics::MersenneTwisterRandomVariateGenerator::Pointer itk::ImageRandomConstIteratorWithIndex< TImage >::GeneratorPointer [private] |
Definition at line 218 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::ImageType itk::ImageRandomConstIteratorWithIndex< TImage >::ImageType |
Image typedef support.
Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.
Reimplemented in itk::ImageRandomIteratorWithIndex< TImage >.
Definition at line 128 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::IndexType itk::ImageRandomConstIteratorWithIndex< TImage >::IndexType |
Inherit types from the superclass
Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.
Reimplemented in itk::ImageRandomIteratorWithIndex< TImage >.
Definition at line 124 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::IndexValueType itk::ImageRandomConstIteratorWithIndex< TImage >::IndexValueType |
Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.
Definition at line 134 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::InternalPixelType itk::ImageRandomConstIteratorWithIndex< TImage >::InternalPixelType |
Internal Pixel Type
Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.
Reimplemented in itk::ImageRandomIteratorWithIndex< TImage >.
Definition at line 131 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::OffsetType itk::ImageRandomConstIteratorWithIndex< TImage >::OffsetType |
Type of the Offset taken from the image
Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.
Reimplemented in itk::ImageRandomIteratorWithIndex< TImage >.
Definition at line 126 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::OffsetValueType itk::ImageRandomConstIteratorWithIndex< TImage >::OffsetValueType |
Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.
Definition at line 135 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::PixelContainer itk::ImageRandomConstIteratorWithIndex< TImage >::PixelContainer |
PixelContainer typedef support. Used to refer to the container for the pixel data. While this was already typdef'ed in the superclass, it needs to be redone here for this subclass to compile properly with gcc.
Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.
Reimplemented in itk::ImageRandomIteratorWithIndex< TImage >.
Definition at line 129 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::PixelContainerPointer itk::ImageRandomConstIteratorWithIndex< TImage >::PixelContainerPointer |
Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.
Reimplemented in itk::ImageRandomIteratorWithIndex< TImage >.
Definition at line 130 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::PixelType itk::ImageRandomConstIteratorWithIndex< TImage >::PixelType |
External Pixel Type
Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.
Reimplemented in itk::ImageRandomIteratorWithIndex< TImage >.
Definition at line 132 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::RegionType itk::ImageRandomConstIteratorWithIndex< TImage >::RegionType |
Region typedef support.
Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.
Reimplemented in itk::ImageRandomIteratorWithIndex< TImage >.
Definition at line 127 of file itkImageRandomConstIteratorWithIndex.h.
typedef ImageRandomConstIteratorWithIndex itk::ImageRandomConstIteratorWithIndex< TImage >::Self |
Standard class typedefs.
Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.
Reimplemented in itk::ImageRandomIteratorWithIndex< TImage >.
Definition at line 120 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::SizeType itk::ImageRandomConstIteratorWithIndex< TImage >::SizeType |
Size typedef support.
Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.
Reimplemented in itk::ImageRandomIteratorWithIndex< TImage >.
Definition at line 125 of file itkImageRandomConstIteratorWithIndex.h.
typedef Superclass::SizeValueType itk::ImageRandomConstIteratorWithIndex< TImage >::SizeValueType |
Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.
Definition at line 136 of file itkImageRandomConstIteratorWithIndex.h.
typedef ImageConstIteratorWithIndex< TImage > itk::ImageRandomConstIteratorWithIndex< TImage >::Superclass |
Reimplemented in itk::ImageRandomIteratorWithIndex< TImage >.
Definition at line 121 of file itkImageRandomConstIteratorWithIndex.h.
itk::ImageRandomConstIteratorWithIndex< TImage >::ImageRandomConstIteratorWithIndex | ( | ) |
Default constructor. Needed since we provide a cast constructor.
itk::ImageRandomConstIteratorWithIndex< TImage >::~ImageRandomConstIteratorWithIndex | ( | ) | [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.
itk::ImageRandomConstIteratorWithIndex< TImage >::ImageRandomConstIteratorWithIndex | ( | const ImageConstIteratorWithIndex< TImage > & | it | ) | [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.
SizeValueType itk::ImageRandomConstIteratorWithIndex< TImage >::GetNumberOfSamples | ( | void | ) | const |
void itk::ImageRandomConstIteratorWithIndex< TImage >::GoToBegin | ( | void | ) | [inline] |
Move an iterator to the beginning of the region.
Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.
Definition at line 158 of file itkImageRandomConstIteratorWithIndex.h.
void itk::ImageRandomConstIteratorWithIndex< TImage >::GoToEnd | ( | void | ) | [inline] |
Move an iterator to one position past the End of the region.
Definition at line 166 of file itkImageRandomConstIteratorWithIndex.h.
bool itk::ImageRandomConstIteratorWithIndex< TImage >::IsAtBegin | ( | void | ) | const [inline] |
Is the iterator at the beginning of the region?
Definition at line 174 of file itkImageRandomConstIteratorWithIndex.h.
bool itk::ImageRandomConstIteratorWithIndex< TImage >::IsAtEnd | ( | void | ) | const [inline] |
Is the iterator at the end of the region?
Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.
Definition at line 180 of file itkImageRandomConstIteratorWithIndex.h.
Self& itk::ImageRandomConstIteratorWithIndex< TImage >::operator++ | ( | ) | [inline] |
Increment (prefix) the selected dimension. No bounds checking is performed.
Definition at line 187 of file itkImageRandomConstIteratorWithIndex.h.
Self& itk::ImageRandomConstIteratorWithIndex< TImage >::operator-- | ( | ) | [inline] |
Decrement (prefix) the selected dimension. No bounds checking is performed.
Definition at line 197 of file itkImageRandomConstIteratorWithIndex.h.
void itk::ImageRandomConstIteratorWithIndex< TImage >::RandomJump | ( | ) | [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
GeneratorPointer itk::ImageRandomConstIteratorWithIndex< TImage >::m_Generator [private] |
Definition at line 219 of file itkImageRandomConstIteratorWithIndex.h.
SizeValueType itk::ImageRandomConstIteratorWithIndex< TImage >::m_NumberOfPixelsInRegion [private] |
Definition at line 222 of file itkImageRandomConstIteratorWithIndex.h.
SizeValueType itk::ImageRandomConstIteratorWithIndex< TImage >::m_NumberOfSamplesDone [private] |
Definition at line 221 of file itkImageRandomConstIteratorWithIndex.h.
SizeValueType itk::ImageRandomConstIteratorWithIndex< TImage >::m_NumberOfSamplesRequested [private] |
Definition at line 220 of file itkImageRandomConstIteratorWithIndex.h.