DGtal  1.0.0
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
 TiledImage pointer. More...
 
ImageContainermyTile
 Alias on the current tile. More...
 
TiledRangeIterator myTiledRangeIterator
 Current tiled range iterator. More...
 
BlockCoordsIterator myBlockCoordsIterator
 Current block coords iterator. More...
 

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

◆ BlockCoordsIterator

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.

◆ TiledRangeIterator

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

◆ TiledIterator() [1/2]

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.

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

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.

◆ TiledIterator() [2/2]

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.

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

References aPoint(), 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.

Member Function Documentation

◆ nextLexicographicOrder()

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.

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 TiledImage * myTiledImage
TiledImage pointer.
Definition: TiledImage.h:437
ImageContainer * myTile
Alias on the current tile.
Definition: TiledImage.h:440
ImageContainer * findTileFromBlockCoords(const Point &aCoord) const
Definition: TiledImage.h:684
BlockCoordsIterator myBlockCoordsIterator
Current block coords iterator.
Definition: TiledImage.h:446
const Domain domainBlockCoords() const
Definition: TiledImage.h:210
TiledRangeIterator myTiledRangeIterator
Current tiled range iterator.
Definition: TiledImage.h:443

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++().

◆ operator *()

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.

296  {
297  return (*myTiledRangeIterator);
298  }
TiledRangeIterator myTiledRangeIterator
Current tiled range iterator.
Definition: TiledImage.h:443

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

◆ operator!=()

template<typename TImageContainer, typename TImageFactory, typename TImageCacheReadPolicy, typename TImageCacheWritePolicy>
bool DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::operator!= ( const TiledIterator it) const
inline

◆ operator++() [1/2]

template<typename TImageContainer, typename TImageFactory, typename TImageCacheReadPolicy, typename TImageCacheWritePolicy>
TiledIterator& DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::operator++ ( )
inline

◆ operator++() [2/2]

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.

365  {
366  TiledIterator tmp = *this;
368  return tmp;
369  }
TiledIterator(BlockCoordsIterator aBlockCoordsIterator, const TiledImage< ImageContainer, ImageFactory, ImageCacheReadPolicy, ImageCacheWritePolicy > *aTiledImage)
Definition: TiledImage.h:257

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

◆ operator--() [1/2]

template<typename TImageContainer, typename TImageFactory, typename TImageCacheReadPolicy, typename TImageCacheWritePolicy>
TiledIterator& DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::operator-- ( )
inline

◆ operator--() [2/2]

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.

429  {
430  TiledIterator tmp = *this;
432  return tmp;
433  }
TiledIterator(BlockCoordsIterator aBlockCoordsIterator, const TiledImage< ImageContainer, ImageFactory, ImageCacheReadPolicy, ImageCacheWritePolicy > *aTiledImage)
Definition: TiledImage.h:257

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

◆ operator==()

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.

307  {
308  return ( ( this->myBlockCoordsIterator == it.myBlockCoordsIterator ) && ( this->myTiledRangeIterator == it.myTiledRangeIterator ) );
309  }
BlockCoordsIterator myBlockCoordsIterator
Current block coords iterator.
Definition: TiledImage.h:446

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

◆ prevLexicographicOrder()

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.

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 TiledImage * myTiledImage
TiledImage pointer.
Definition: TiledImage.h:437
ImageContainer * myTile
Alias on the current tile.
Definition: TiledImage.h:440
ImageContainer * findTileFromBlockCoords(const Point &aCoord) const
Definition: TiledImage.h:684
BlockCoordsIterator myBlockCoordsIterator
Current block coords iterator.
Definition: TiledImage.h:446
const Domain domainBlockCoords() const
Definition: TiledImage.h:210
TiledRangeIterator myTiledRangeIterator
Current tiled range iterator.
Definition: TiledImage.h:443

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--().

Friends And Related Function Documentation

◆ TiledImage< ImageContainer, ImageFactory, ImageCacheReadPolicy, ImageCacheWritePolicy >

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

◆ myBlockCoordsIterator

template<typename TImageContainer, typename TImageFactory, typename TImageCacheReadPolicy, typename TImageCacheWritePolicy>
BlockCoordsIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myBlockCoordsIterator
private

◆ myTile

template<typename TImageContainer, typename TImageFactory, typename TImageCacheReadPolicy, typename TImageCacheWritePolicy>
ImageContainer* DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTile
private

◆ myTiledImage

template<typename TImageContainer, typename TImageFactory, typename TImageCacheReadPolicy, typename TImageCacheWritePolicy>
const TiledImage* DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::myTiledImage
private

◆ myTiledRangeIterator

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: