OpenStructure
Public Member Functions
ExtentIterator Class Reference

#include <extent_iterator.hh>

Public Member Functions

 ExtentIterator (const Extent &b, unsigned int domain=SPATIAL)
 
 ExtentIterator (const ExtentIterator &i)
 
ExtentIteratoroperator= (const ExtentIterator &p)
 
ExtentIteratoroperator++ ()
 
ExtentIterator operator++ (int)
 
ExtentIteratoroperator-- ()
 
ExtentIterator operator-- (int)
 
void Inc ()
 
void Dec ()
 
ExtentIteratorToStart ()
 
ExtentIteratorToEnd ()
 
Extent GetExtent () const
 
const PointGetStart () const
 
const PointGetEnd () const
 
bool AtEnd () const
 
bool AtStart () const
 
int operator[] (int i) const
 
 operator Point () const
 

Detailed Description

Extent iterator.

The extent iterator is implicitely convertible to Point, and is therefore ideally suited for Get/Set methods which take a point as an argument.

ImageHandle ih = get_some_image();
for(ExtentIterator it(ih.GetExtent());!it.AtEnd();++it) {
Real r = ih.GetReal(it);
// do something with value
}
ExtentIterator(const Extent &b, unsigned int domain=SPATIAL)
Initialize with Extent.
float Real
Definition: base.hh:44
See also
View Phase Diference Example

Definition at line 52 of file extent_iterator.hh.

Constructor & Destructor Documentation

◆ ExtentIterator() [1/2]

ExtentIterator ( const Extent b,
unsigned int  domain = SPATIAL 
)
explicit

Initialize with Extent.

◆ ExtentIterator() [2/2]

copy ctor

Member Function Documentation

◆ AtEnd()

bool AtEnd ( ) const

Returns true if iterator has reached end.

◆ AtStart()

bool AtStart ( ) const

Returns true if iterator is at the start.

◆ Dec()

void Dec ( )

Go back to previous point.

◆ GetEnd()

const Point& GetEnd ( ) const

Retrieve end point.

◆ GetExtent()

Extent GetExtent ( ) const

Retrieve original extent.

◆ GetStart()

const Point& GetStart ( ) const

Retrieve start point.

◆ Inc()

void Inc ( )

Skip ahead to next point.

◆ operator Point()

operator Point ( ) const

◆ operator++() [1/2]

ExtentIterator& operator++ ( )

Prefix increase operator.

◆ operator++() [2/2]

ExtentIterator operator++ ( int  )

Postfix increase operator.

◆ operator--() [1/2]

ExtentIterator& operator-- ( )

Prefix decrease operator.

◆ operator--() [2/2]

ExtentIterator operator-- ( int  )

Postfix decrease operator.

◆ operator=()

ExtentIterator& operator= ( const ExtentIterator p)

assignement op

◆ operator[]()

int operator[] ( int  i) const

element access

◆ ToEnd()

ExtentIterator& ToEnd ( )

Reset to end.

◆ ToStart()

ExtentIterator& ToStart ( )

Reset to start.


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