RNifti
Fast R and C++ Access to NIfTI Images
RNifti::NiftiImageData::Iterator Class Reference

Iterator type for NiftiImageData, with Element as its value type. More...

#include <NiftiImage.h>

Public Types

typedef std::random_access_iterator_tag iterator_category
typedef Element value_type
typedef std::ptrdiff_t difference_type
typedef Elementpointer
typedef Elementreference

Public Member Functions

 Iterator (const NiftiImageData *parent=NULL, void *ptr=NULL, const size_t step=0)
 Primary constructor.
 Iterator (const Iterator &other)
 Copy constructor.
Iteratoroperator++ ()
Iterator operator++ (int)
Iterator operator+ (ptrdiff_t n) const
Iteratoroperator-- ()
Iterator operator-- (int)
Iterator operator- (ptrdiff_t n) const
ptrdiff_t operator- (const Iterator &other) const
bool operator== (const Iterator &other) const
bool operator!= (const Iterator &other) const
bool operator> (const Iterator &other) const
bool operator< (const Iterator &other) const
const Element operator* () const
Element operator* ()
const Element operator[] (const size_t i) const
Element operator[] (const size_t i)

Detailed Description

Iterator type for NiftiImageData, with Element as its value type.

Constructor & Destructor Documentation

◆ Iterator() [1/2]

RNifti::NiftiImageData::Iterator::Iterator ( const NiftiImageData * parent = NULL,
void * ptr = NULL,
const size_t step = 0 )
inline

Primary constructor.

Parameters
parentA pointer to the parent object
ptrAn opaque pointer to the memory underpinning the iterator. The default, NULL, corresponds to the start of the parent object's data blob.
stepThe increment between elements within the blob, in bytes. If zero, the default, the width associated with the stored datatype will be used.

◆ Iterator() [2/2]

RNifti::NiftiImageData::Iterator::Iterator ( const Iterator & other)
inline

Copy constructor.

Parameters
otherAnother iterator

The documentation for this class was generated from the following file: