DGtal  0.9.4beta
Public Types | Public Member Functions | Private Attributes | Friends
DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator Class Reference

#include <DGtal/images/TiledImage.h>

Inheritance diagram for DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator:
[legend]
Collaboration diagram for DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator:
[legend]

Public Types

typedef ImageContainer::Range::Iterator TiledRangeIterator
 
typedef Domain::Iterator BlockCoordsIterator
 

Public Member Functions

 TiledIterator (BlockCoordsIterator aBlockCoordsIterator, const TiledImage< ImageContainer, ImageFactory, ImageCacheReadPolicy, ImageCacheWritePolicy > *aTiledImage)
 
 TiledIterator (BlockCoordsIterator aBlockCoordsIterator, const Point &aPoint, const TiledImage< ImageContainer, ImageFactory, ImageCacheReadPolicy, ImageCacheWritePolicy > *aTiledImage)
 
Valueoperator* ()
 
bool operator== (const TiledIterator &it) const
 
bool operator!= (const TiledIterator &it) const
 
void nextLexicographicOrder ()
 
TiledIteratoroperator++ ()
 
TiledIterator operator++ (int)
 
void prevLexicographicOrder ()
 
TiledIteratoroperator-- ()
 
TiledIterator operator-- (int)
 

Private Attributes

const TiledImagemyTiledImage
 
ImageContainermyTile
 
TiledRangeIterator myTiledRangeIterator
 
BlockCoordsIterator myBlockCoordsIterator
 

Friends

class TiledImage< ImageContainer, ImageFactory, ImageCacheReadPolicy, ImageCacheWritePolicy >
 

Detailed Description

template<typename TImageContainer, typename TImageFactory, typename TImageCacheReadPolicy, typename TImageCacheWritePolicy>
class DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator

Specific TiledIterator on TiledImage.

Definition at line 232 of file TiledImage.h.

Member Typedef Documentation

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
typedef Domain::Iterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::BlockCoordsIterator

Definition at line 247 of file TiledImage.h.

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
typedef ImageContainer::Range:: Iterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::TiledRangeIterator

Definition at line 246 of file TiledImage.h.

Constructor & Destructor Documentation

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::TiledIterator ( BlockCoordsIterator  aBlockCoordsIterator,
const TiledImage< ImageContainer, ImageFactory, ImageCacheReadPolicy, ImageCacheWritePolicy > *  aTiledImage 
)
inline

Constructor.

Parameters
aBlockCoordsIteratora block coords iterator
aTiledImagepointer to the TiledImage

Definition at line 257 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::domainBlockCoords(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::findTileFromBlockCoords(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myBlockCoordsIterator, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTile, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTiledImage, and DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTiledRangeIterator.

259  : myTiledImage ( aTiledImage ),
260  myBlockCoordsIterator ( aBlockCoordsIterator )
261  {
263  {
265  myTiledRangeIterator = myTile->range().begin();
266  }
267  }
const Domain domainBlockCoords() const
Definition: TiledImage.h:210
const TiledImage * myTiledImage
TiledImage pointer.
Definition: TiledImage.h:437
ImageContainer * findTileFromBlockCoords(const Point &aCoord) const
Definition: TiledImage.h:684
ImageContainer * myTile
Alias on the current tile.
Definition: TiledImage.h:440
BlockCoordsIterator myBlockCoordsIterator
Current block coords iterator.
Definition: TiledImage.h:446
TiledRangeIterator myTiledRangeIterator
Current tiled range iterator.
Definition: TiledImage.h:443
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::TiledIterator ( BlockCoordsIterator  aBlockCoordsIterator,
const Point aPoint,
const TiledImage< ImageContainer, ImageFactory, ImageCacheReadPolicy, ImageCacheWritePolicy > *  aTiledImage 
)
inline

Constructor.

Parameters
aBlockCoordsIteratora block coords iterator
aPointa point
aTiledImagepointer to the TiledImage

Definition at line 276 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::domainBlockCoords(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::findTileFromBlockCoords(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myBlockCoordsIterator, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTile, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTiledImage, and DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTiledRangeIterator.

279  : myTiledImage ( aTiledImage ),
280  myBlockCoordsIterator ( aBlockCoordsIterator )
281  {
283  {
285  myTiledRangeIterator = myTile->range().begin(aPoint);
286  }
287  }
const Domain domainBlockCoords() const
Definition: TiledImage.h:210
const TiledImage * myTiledImage
TiledImage pointer.
Definition: TiledImage.h:437
ImageContainer * findTileFromBlockCoords(const Point &aCoord) const
Definition: TiledImage.h:684
ImageContainer * myTile
Alias on the current tile.
Definition: TiledImage.h:440
BlockCoordsIterator myBlockCoordsIterator
Current block coords iterator.
Definition: TiledImage.h:446
TiledRangeIterator myTiledRangeIterator
Current tiled range iterator.
Definition: TiledImage.h:443

Member Function Documentation

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
void DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::nextLexicographicOrder ( )
inline

Implements the next() method to scan the domain points dimension by dimension (lexicographic order).

Definition at line 330 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::domainBlockCoords(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::findTileFromBlockCoords(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myBlockCoordsIterator, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTile, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTiledImage, and DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTiledRangeIterator.

Referenced by DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::operator++().

331  {
333 
334  if ( myTiledRangeIterator != myTile->range().end() )
335  return;
336  else
337  {
339 
341  return;
342 
344  myTiledRangeIterator = myTile->range().begin();
345  }
346  }
const Domain domainBlockCoords() const
Definition: TiledImage.h:210
const TiledImage * myTiledImage
TiledImage pointer.
Definition: TiledImage.h:437
ImageContainer * findTileFromBlockCoords(const Point &aCoord) const
Definition: TiledImage.h:684
ImageContainer * myTile
Alias on the current tile.
Definition: TiledImage.h:440
BlockCoordsIterator myBlockCoordsIterator
Current block coords iterator.
Definition: TiledImage.h:446
TiledRangeIterator myTiledRangeIterator
Current tiled range iterator.
Definition: TiledImage.h:443
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
bool DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::operator!= ( const TiledIterator it) const
inline
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
Value& DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::operator* ( )
inline

operator *

Returns
the value associated to the current TiledRangeIterator position.

Definition at line 295 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTiledRangeIterator.

296  {
297  return (*myTiledRangeIterator);
298  }
TiledRangeIterator myTiledRangeIterator
Current tiled range iterator.
Definition: TiledImage.h:443
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
TiledIterator& DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::operator++ ( )
inline
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
TiledIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::operator++ ( int  )
inline

Operator ++ (it++)

Definition at line 364 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::nextLexicographicOrder().

365  {
366  TiledIterator tmp = *this;
368  return tmp;
369  }
TiledIterator(BlockCoordsIterator aBlockCoordsIterator, const TiledImage< ImageContainer, ImageFactory, ImageCacheReadPolicy, ImageCacheWritePolicy > *aTiledImage)
Definition: TiledImage.h:257
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
TiledIterator& DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::operator-- ( )
inline
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
TiledIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::operator-- ( int  )
inline

Operator – (it–)

Definition at line 428 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::prevLexicographicOrder().

429  {
430  TiledIterator tmp = *this;
432  return tmp;
433  }
TiledIterator(BlockCoordsIterator aBlockCoordsIterator, const TiledImage< ImageContainer, ImageFactory, ImageCacheReadPolicy, ImageCacheWritePolicy > *aTiledImage)
Definition: TiledImage.h:257
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
bool DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::operator== ( const TiledIterator it) const
inline

Operator ==

Returns
true if this and it are equals.

Definition at line 306 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myBlockCoordsIterator, and DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTiledRangeIterator.

307  {
308  return ( ( this->myBlockCoordsIterator == it.myBlockCoordsIterator ) && ( this->myTiledRangeIterator == it.myTiledRangeIterator ) );
309  }
BlockCoordsIterator myBlockCoordsIterator
Current block coords iterator.
Definition: TiledImage.h:446
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
void DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::prevLexicographicOrder ( )
inline

Implements the prev() method to scan the domain points dimension by dimension (lexicographic order).

Definition at line 376 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::domainBlockCoords(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::findTileFromBlockCoords(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myBlockCoordsIterator, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTile, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTiledImage, and DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTiledRangeIterator.

Referenced by DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::operator--().

377  {
378  // -- IF we are at the end... (reverse, --)
380  {
382 
384 
385  myTiledRangeIterator = myTile->range().end();
387 
388  return;
389  }
390  // -- IF we are at the end... (reverse, --)
391 
392  // ---
393 
394  if ( myTiledRangeIterator != myTile->range().begin() )
395  {
397  return;
398  }
399  else
400  {
402  return;
403 
405 
407 
408  myTiledRangeIterator = myTile->range().end();
410  }
411  }
const Domain domainBlockCoords() const
Definition: TiledImage.h:210
const TiledImage * myTiledImage
TiledImage pointer.
Definition: TiledImage.h:437
ImageContainer * findTileFromBlockCoords(const Point &aCoord) const
Definition: TiledImage.h:684
ImageContainer * myTile
Alias on the current tile.
Definition: TiledImage.h:440
BlockCoordsIterator myBlockCoordsIterator
Current block coords iterator.
Definition: TiledImage.h:446
TiledRangeIterator myTiledRangeIterator
Current tiled range iterator.
Definition: TiledImage.h:443

Friends And Related Function Documentation

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
friend class TiledImage< ImageContainer, ImageFactory, ImageCacheReadPolicy, ImageCacheWritePolicy >
friend

Definition at line 236 of file TiledImage.h.

Field Documentation

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
BlockCoordsIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myBlockCoordsIterator
private
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ImageContainer* DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTile
private
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
const TiledImage* DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTiledImage
private
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
TiledRangeIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTiledRangeIterator
private

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