DGtal 1.3.0
Loading...
Searching...
No Matches
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:

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

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

Member Function Documentation

◆ nextLexicographicOrder()

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

◆ 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*()

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 }

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

◆ 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==()

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 }

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 }

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 803 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: