DGtal  0.9.4beta
Data Structures | Public Types | Public Member Functions | Protected Attributes
DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy > Class Template Reference

#include <DGtal/images/TiledImage.h>

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

Data Structures

class  TiledIterator
 

Public Types

typedef TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy > Self
 
typedef TImageContainer ImageContainer
 
typedef ImageContainer::Domain Domain
 
typedef ImageContainer::Point Point
 
typedef ImageContainer::Value Value
 
typedef ImageContainer::Difference Difference
 
typedef TImageFactory ImageFactory
 
typedef ImageFactory::OutputImage OutputImage
 
typedef TImageCacheReadPolicy ImageCacheReadPolicy
 
typedef TImageCacheWritePolicy ImageCacheWritePolicy
 
typedef ImageCache< OutputImage, ImageFactory, ImageCacheReadPolicy, ImageCacheWritePolicyMyImageCache
 
typedef TiledIterator ConstIterator
 
typedef TiledIterator OutputIterator
 
typedef std::reverse_iterator< TiledIteratorReverseTiledIterator
 
typedef ReverseTiledIterator ConstReverseIterator
 
typedef ReverseTiledIterator ReverseOutputIterator
 
typedef TiledImageBidirectionalConstRangeFromPoint< TiledImageConstRange
 
typedef TiledImageBidirectionalRangeFromPoint< TiledImageRange
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CImage< TImageContainer >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CImageFactory< TImageFactory >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CImageCacheReadPolicy< TImageCacheReadPolicy >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CImageCacheWritePolicy< TImageCacheWritePolicy >))
 
 TiledImage (Alias< ImageFactory > anImageFactory, Alias< ImageCacheReadPolicy > aReadPolicy, Alias< ImageCacheWritePolicy > aWritePolicy, typename Domain::Integer N)
 
 ~TiledImage ()
 
 TiledImage (const TiledImage &other)
 
TiledImageoperator= (const TiledImage &other)
 
const Domaindomain () const
 
const Domain domainBlockCoords () const
 
ConstIterator begin () const
 
OutputIterator begin ()
 
ConstIterator begin (const Point &aPoint) const
 
OutputIterator begin (const Point &aPoint)
 
ConstIterator end () const
 
OutputIterator end ()
 
ConstReverseIterator rbegin () const
 
ReverseOutputIterator rbegin ()
 
ConstReverseIterator rbegin (const Point &aPoint) const
 
ReverseOutputIterator rbegin (const Point &aPoint)
 
ConstReverseIterator rend () const
 
ConstReverseIterator rend ()
 
OutputIterator outputIterator ()
 
OutputIterator outputIterator (const Point &aPoint)
 
ReverseOutputIterator routputIterator ()
 
ReverseOutputIterator routputIterator (const Point &aPoint)
 
ConstRange constRange () const
 
Range range ()
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 
const Domain findSubDomain (const Point &aPoint) const
 
const Point findBlockCoordsFromPoint (const Point &aPoint) const
 
const Domain findSubDomainFromBlockCoords (const Point &aCoord) const
 
ImageContainerfindTileFromBlockCoords (const Point &aCoord) const
 
Value operator() (const Point &aPoint) const
 
void setValue (const Point &aPoint, const Value &aValue)
 
unsigned int getCacheMissRead ()
 
unsigned int getCacheMissWrite ()
 
void clearCacheAndResetCacheMisses ()
 

Protected Attributes

Domain::Integer myN
 
Point mySize
 
ImageFactorymyImageFactory
 
MyImageCachemyImageCache
 
Point m_lowerBound
 
Point m_upperBound
 
TImageCacheReadPolicy * myReadPolicy
 
TImageCacheWritePolicy * myWritePolicy
 

Detailed Description

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

Aim: implements a tiled image from a "bigger/original" one from an ImageFactory.

Description of template class 'TiledImage'

Template Parameters
TImageContaineran image container type (model of ).
TImageFactoryan image factory type (model of CImageFactory).
TImageCacheReadPolicyan image cache read policy class (model of CImageCacheReadPolicy).
TImageCacheWritePolicyan image cache write policy class (model of CImageCacheWritePolicy).
Note
It is important to take into account that read and write policies are passed as aliases in the TiledImage constructor, so for example, if two TiledImage instances are successively created with the same read policy instance, the state of the cache for a given time is therefore the same for the two TiledImage instances !
Examples:
images/exampleImageFactoryFromHDF5.cpp, and images/exampleTiledImage.cpp.

Definition at line 76 of file TiledImage.h.

Member Typedef Documentation

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

Definition at line 450 of file TiledImage.h.

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
typedef TiledImageBidirectionalConstRangeFromPoint<TiledImage > DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::ConstRange

Definition at line 558 of file TiledImage.h.

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
typedef ReverseTiledIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::ConstReverseIterator

Definition at line 454 of file TiledImage.h.

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
typedef ImageContainer::Difference DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::Difference

Definition at line 96 of file TiledImage.h.

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
typedef ImageContainer::Domain DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::Domain

Definition at line 92 of file TiledImage.h.

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
typedef TImageCacheReadPolicy DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::ImageCacheReadPolicy

Definition at line 102 of file TiledImage.h.

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
typedef TImageCacheWritePolicy DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::ImageCacheWritePolicy

Definition at line 103 of file TiledImage.h.

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
typedef TImageContainer DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::ImageContainer

Types copied from the container.

Definition at line 91 of file TiledImage.h.

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
typedef TImageFactory DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::ImageFactory

Types.

Definition at line 99 of file TiledImage.h.

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
typedef ImageCache<OutputImage, ImageFactory, ImageCacheReadPolicy, ImageCacheWritePolicy > DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::MyImageCache

Definition at line 104 of file TiledImage.h.

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
typedef ImageFactory::OutputImage DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::OutputImage

Definition at line 100 of file TiledImage.h.

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

Definition at line 451 of file TiledImage.h.

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
typedef ImageContainer::Point DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::Point

Definition at line 93 of file TiledImage.h.

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
typedef TiledImageBidirectionalRangeFromPoint<TiledImage > DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::Range

Definition at line 559 of file TiledImage.h.

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
typedef ReverseTiledIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::ReverseOutputIterator

Definition at line 455 of file TiledImage.h.

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
typedef std::reverse_iterator<TiledIterator> DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::ReverseTiledIterator

Definition at line 453 of file TiledImage.h.

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
typedef TiledImage<TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy> DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::Self

Definition at line 82 of file TiledImage.h.

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
typedef ImageContainer::Value DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::Value

Definition at line 94 of file TiledImage.h.

Constructor & Destructor Documentation

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledImage ( Alias< ImageFactory anImageFactory,
Alias< ImageCacheReadPolicy aReadPolicy,
Alias< ImageCacheWritePolicy aWritePolicy,
typename Domain::Integer  N 
)
inline

Constructor.

Parameters
anImageFactoryalias on the image factory (see ImageFactoryFromImage or ImageFactoryFromHDF5).
aReadPolicyalias on a read policy.
aWritePolicyalias on a write policy.
Nhow many tiles we want for each dimension.

Definition at line 117 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_lowerBound, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_upperBound, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageCache, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageFactory, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myN, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myReadPolicy, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::mySize, and DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myWritePolicy.

120  :
121  myN(N), myImageFactory(&anImageFactory), myReadPolicy(&aReadPolicy), myWritePolicy(&aWritePolicy)
122  {
124 
125  m_lowerBound = myImageFactory->domain().lowerBound();
126  m_upperBound = myImageFactory->domain().upperBound();
127 
128  for(typename DGtal::Dimension i=0; i<Domain::dimension; i++)
129  mySize[i] = (m_upperBound[i]-m_lowerBound[i]+1)/myN;
130  }
Point m_lowerBound
domain lower and upper bound
Definition: TiledImage.h:797
DGtal::uint32_t Dimension
Definition: Common.h:120
Domain::Integer myN
Number of tiles per dimension.
Definition: TiledImage.h:785
ImageFactory * myImageFactory
ImageFactory pointer.
Definition: TiledImage.h:791
TImageCacheReadPolicy * myReadPolicy
TImageCacheReadPolicy pointer.
Definition: TiledImage.h:800
Point mySize
Width of a tile (for each dimension)
Definition: TiledImage.h:788
ImageCache< OutputImage, ImageFactory, ImageCacheReadPolicy, ImageCacheWritePolicy > MyImageCache
Definition: TiledImage.h:104
TImageCacheWritePolicy * myWritePolicy
TImageCacheWritePolicy pointer.
Definition: TiledImage.h:803
MyImageCache * myImageCache
ImageCache pointer.
Definition: TiledImage.h:794
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::~TiledImage ( )
inline

Destructor.

Definition at line 135 of file TiledImage.h.

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

136  {
137  delete myImageCache;
138  }
MyImageCache * myImageCache
ImageCache pointer.
Definition: TiledImage.h:794
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledImage ( const TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy > &  other)
inline

Copy constructor.

Parameters
otherthe TiledImage to clone.

Definition at line 148 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_lowerBound, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_upperBound, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageCache, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageFactory, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myN, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myReadPolicy, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::mySize, and DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myWritePolicy.

149  {
150  myN = other.myN;
151  myImageFactory = other.myImageFactory;
152  myReadPolicy = other.myReadPolicy;
153  myWritePolicy = other.myWritePolicy;
154 
156 
157  m_lowerBound = myImageFactory->domain().lowerBound();
158  m_upperBound = myImageFactory->domain().upperBound();
159 
160  for(typename DGtal::Dimension i=0; i<Domain::dimension; i++)
161  mySize[i] = (m_upperBound[i]-m_lowerBound[i]+1)/myN;
162  }
Point m_lowerBound
domain lower and upper bound
Definition: TiledImage.h:797
DGtal::uint32_t Dimension
Definition: Common.h:120
Domain::Integer myN
Number of tiles per dimension.
Definition: TiledImage.h:785
ImageFactory * myImageFactory
ImageFactory pointer.
Definition: TiledImage.h:791
TImageCacheReadPolicy * myReadPolicy
TImageCacheReadPolicy pointer.
Definition: TiledImage.h:800
Point mySize
Width of a tile (for each dimension)
Definition: TiledImage.h:788
ImageCache< OutputImage, ImageFactory, ImageCacheReadPolicy, ImageCacheWritePolicy > MyImageCache
Definition: TiledImage.h:104
TImageCacheWritePolicy * myWritePolicy
TImageCacheWritePolicy pointer.
Definition: TiledImage.h:803
MyImageCache * myImageCache
ImageCache pointer.
Definition: TiledImage.h:794

Member Function Documentation

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ConstIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::begin ( ) const
inline
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
OutputIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::begin ( )
inline
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ConstIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::begin ( const Point aPoint) const
inline
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
OutputIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::begin ( const Point aPoint)
inline
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::BOOST_CONCEPT_ASSERT ( (concepts::CImage< TImageContainer >)  )

Checking concepts.

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::BOOST_CONCEPT_ASSERT ( (concepts::CImageFactory< TImageFactory >)  )
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::BOOST_CONCEPT_ASSERT ( (concepts::CImageCacheReadPolicy< TImageCacheReadPolicy >)  )
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::BOOST_CONCEPT_ASSERT ( (concepts::CImageCacheWritePolicy< TImageCacheWritePolicy >)  )
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
void DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::clearCacheAndResetCacheMisses ( )
inline
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ConstRange DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::constRange ( ) const
inline
Returns
the range providing begin and end iterators (with this) to scan the values of image.

Definition at line 565 of file TiledImage.h.

566  {
567  return ConstRange( this );
568  }
TiledImageBidirectionalConstRangeFromPoint< TiledImage > ConstRange
Definition: TiledImage.h:558
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
const Domain& DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::domain ( ) const
inline

Returns a reference to the underlying image domain.

Returns
a reference to the domain.

Definition at line 200 of file TiledImage.h.

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

201  {
202  return myImageFactory->domain();
203  }
ImageFactory * myImageFactory
ImageFactory pointer.
Definition: TiledImage.h:791
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
const Domain DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::domainBlockCoords ( ) const
inline

Returns the block coords domain.

Returns
the block coords domain.

Definition at line 210 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_lowerBound, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_upperBound, and DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myN.

Referenced by DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::begin(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::end(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::findSubDomainFromBlockCoords(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::findTileFromBlockCoords(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::nextLexicographicOrder(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::operator!=(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::prevLexicographicOrder(), and DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::TiledIterator().

211  {
212  Point lowerBoundCords, upperBoundCoords;
213 
214  for(typename DGtal::Dimension i=0; i<Domain::dimension; i++)
215  {
216  lowerBoundCords[i] = 0;
217  upperBoundCoords[i] = myN;
218 
219  if (((m_upperBound[i]-m_lowerBound[i]+1) % myN) == 0)
220  upperBoundCoords[i]--;
221  }
222 
223  return Domain(lowerBoundCords, upperBoundCoords);
224  }
Point m_lowerBound
domain lower and upper bound
Definition: TiledImage.h:797
DGtal::uint32_t Dimension
Definition: Common.h:120
Domain::Integer myN
Number of tiles per dimension.
Definition: TiledImage.h:785
ImageContainer::Domain Domain
Definition: TiledImage.h:92
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ConstIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::end ( ) const
inline
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
OutputIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::end ( )
inline
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
const Point DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::findBlockCoordsFromPoint ( const Point aPoint) const
inline

Get the block coords containing aPoint.

Parameters
aPointthe point.
Returns
the block coords containing aPoint.

Definition at line 634 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_lowerBound, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageFactory, and DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::mySize.

Referenced by DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::begin().

635  {
636  ASSERT(myImageFactory->domain().isInside(aPoint));
637 
638  typename DGtal::Dimension i;
639 
640  Point low;
641  for(i=0; i<Domain::dimension; i++)
642  {
643  /*if ( (aPoint[i]-m_lowerBound[i]) < mySize[i] )
644  low[i] = 0;
645  else*/
646  low[i] = (aPoint[i]-m_lowerBound[i])/mySize[i];
647  }
648 
649  return low;
650  }
Point m_lowerBound
domain lower and upper bound
Definition: TiledImage.h:797
DGtal::uint32_t Dimension
Definition: Common.h:120
ImageFactory * myImageFactory
ImageFactory pointer.
Definition: TiledImage.h:791
Point mySize
Width of a tile (for each dimension)
Definition: TiledImage.h:788
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
const Domain DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::findSubDomain ( const Point aPoint) const
inline

Get the domain containing aPoint.

Parameters
aPointthe point.
Returns
the domain containing aPoint.

Definition at line 602 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_lowerBound, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_upperBound, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageFactory, and DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::mySize.

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

603  {
604  ASSERT(myImageFactory->domain().isInside(aPoint));
605 
606  typename DGtal::Dimension i;
607 
608  Point low;
609  for(i=0; i<Domain::dimension; i++)
610  {
611  low[i] = (aPoint[i]-m_lowerBound[i])/mySize[i];
612  }
613 
614  Point dMin, dMax;
615  for(i=0; i<Domain::dimension; i++)
616  {
617  dMin[i] = (low[i]*mySize[i])+m_lowerBound[i];
618  dMax[i] = dMin[i] + (mySize[i]-1);
619 
620  if (dMax[i] > m_upperBound[i]) // last tile
621  dMax[i] = m_upperBound[i];
622  }
623 
624  Domain di(dMin, dMax);
625  return di;
626  }
Point m_lowerBound
domain lower and upper bound
Definition: TiledImage.h:797
DGtal::uint32_t Dimension
Definition: Common.h:120
ImageFactory * myImageFactory
ImageFactory pointer.
Definition: TiledImage.h:791
Point mySize
Width of a tile (for each dimension)
Definition: TiledImage.h:788
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
const Domain DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::findSubDomainFromBlockCoords ( const Point aCoord) const
inline

Get the domain with his block coords.

Parameters
aCoordthe block coords.
Returns
the domain.

Definition at line 658 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::domainBlockCoords(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_lowerBound, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_upperBound, and DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::mySize.

Referenced by DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::findTileFromBlockCoords().

659  {
660  ASSERT(domainBlockCoords().isInside(aCoord));
661 
662  typename DGtal::Dimension i;
663 
664  Point dMin, dMax;
665  for(i=0; i<Domain::dimension; i++)
666  {
667  dMin[i] = (aCoord[i]*mySize[i])+m_lowerBound[i];
668  dMax[i] = dMin[i] + (mySize[i]-1);
669 
670  if (dMax[i] > m_upperBound[i]) // last tile
671  dMax[i] = m_upperBound[i];
672  }
673 
674  Domain di(dMin, dMax);
675  return di;
676  }
const Domain domainBlockCoords() const
Definition: TiledImage.h:210
Point m_lowerBound
domain lower and upper bound
Definition: TiledImage.h:797
DGtal::uint32_t Dimension
Definition: Common.h:120
Point mySize
Width of a tile (for each dimension)
Definition: TiledImage.h:788
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ImageContainer* DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::findTileFromBlockCoords ( const Point aCoord) const
inline

Returns an ImageContainer pointer for the block coords aCoord.

Parameters
aCoordthe block coords.
Returns
an ImageContainer pointer.

Definition at line 684 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::domainBlockCoords(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::findSubDomainFromBlockCoords(), DGtal::ImageCache< TImageContainer, TImageFactory, TReadPolicy, TWritePolicy >::getPage(), DGtal::ImageCache< TImageContainer, TImageFactory, TReadPolicy, TWritePolicy >::incCacheMissRead(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageCache, and DGtal::ImageCache< TImageContainer, TImageFactory, TReadPolicy, TWritePolicy >::update().

Referenced by DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::nextLexicographicOrder(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::prevLexicographicOrder(), and DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::TiledIterator::TiledIterator().

685  {
686  ASSERT(domainBlockCoords().isInside(aCoord));
687 
688  Domain d = findSubDomainFromBlockCoords( aCoord );
689  ImageContainer *tile = myImageCache->getPage(d);
690  if (!tile)
691  {
693  myImageCache->update(d);
694  tile = myImageCache->getPage(d);
695  }
696 
697  return tile;
698  }
const Domain domainBlockCoords() const
Definition: TiledImage.h:210
TImageContainer ImageContainer
Types copied from the container.
Definition: TiledImage.h:91
void incCacheMissRead()
Definition: ImageCache.h:219
const Domain findSubDomainFromBlockCoords(const Point &aCoord) const
Definition: TiledImage.h:658
ImageContainer * getPage(const Domain &aDomain) const
MyImageCache * myImageCache
ImageCache pointer.
Definition: TiledImage.h:794
void update(const Domain &aDomain)
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
unsigned int DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::getCacheMissRead ( )
inline
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
unsigned int DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::getCacheMissWrite ( )
inline
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
bool DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::isValid ( ) const
inline

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

Definition at line 591 of file TiledImage.h.

References DGtal::ImageCache< TImageContainer, TImageFactory, TReadPolicy, TWritePolicy >::isValid(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageCache, and DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageFactory.

592  {
593  return (myImageFactory->isValid() && myImageCache->isValid());
594  }
bool isValid() const
Definition: ImageCache.h:156
ImageFactory * myImageFactory
ImageFactory pointer.
Definition: TiledImage.h:791
MyImageCache * myImageCache
ImageCache pointer.
Definition: TiledImage.h:794
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
Value DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::operator() ( const Point aPoint) const
inline

Get the value of an image (from cache) at a given position given by aPoint.

Parameters
aPointthe point.
Returns
the value at aPoint.

Definition at line 706 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::findSubDomain(), DGtal::ImageCache< TImageContainer, TImageFactory, TReadPolicy, TWritePolicy >::incCacheMissRead(), DGtal::Trace::info(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageCache, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageFactory, DGtal::ImageCache< TImageContainer, TImageFactory, TReadPolicy, TWritePolicy >::read(), DGtal::trace, and DGtal::ImageCache< TImageContainer, TImageFactory, TReadPolicy, TWritePolicy >::update().

707  {
708  ASSERT(myImageFactory->domain().isInside(aPoint));
709 
710  typename OutputImage::Value aValue;
711  bool res;
712 
713  res = myImageCache->read(aPoint, aValue);
714 
715  if (res)
716  return aValue;
717  else
718  {
720  Domain d;
721 #ifdef DEBUG_VERBOSE
722  trace.info()<<"+";
723 #endif
724  d = findSubDomain(aPoint);
725 
726  myImageCache->update(d);
727 
728  myImageCache->read(aPoint, aValue);
729 
730  return aValue;
731  }
732 
733  // Unspecified behavior, returning the default constructed value.
734  return aValue;
735  }
Trace trace
Definition: Common.h:137
bool read(const Point &aPoint, Value &aValue) const
ImageFactory * myImageFactory
ImageFactory pointer.
Definition: TiledImage.h:791
void incCacheMissRead()
Definition: ImageCache.h:219
MyImageCache * myImageCache
ImageCache pointer.
Definition: TiledImage.h:794
std::ostream & info()
const Domain findSubDomain(const Point &aPoint) const
Definition: TiledImage.h:602
void update(const Domain &aDomain)
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
TiledImage& DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::operator= ( const TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy > &  other)
inline

Assignment.

Parameters
otherthe TiledImage to copy.
Returns
a reference on 'this'.

Definition at line 169 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_lowerBound, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_upperBound, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageCache, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageFactory, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myN, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myReadPolicy, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::mySize, and DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myWritePolicy.

170  {
171  if ( this != &other )
172  {
173  myN = other.myN;
174  myImageFactory = other.myImageFactory;
175  myReadPolicy = other.myReadPolicy;
176  myWritePolicy = other.myWritePolicy;
177 
179 
180  m_lowerBound = myImageFactory->domain().lowerBound();
181  m_upperBound = myImageFactory->domain().upperBound();
182 
183  for(typename DGtal::Dimension i=0; i<Domain::dimension; i++)
184  mySize[i] = (m_upperBound[i]-m_lowerBound[i]+1)/myN;
185  }
186 
187  return *this;
188  }
Point m_lowerBound
domain lower and upper bound
Definition: TiledImage.h:797
DGtal::uint32_t Dimension
Definition: Common.h:120
Domain::Integer myN
Number of tiles per dimension.
Definition: TiledImage.h:785
ImageFactory * myImageFactory
ImageFactory pointer.
Definition: TiledImage.h:791
TImageCacheReadPolicy * myReadPolicy
TImageCacheReadPolicy pointer.
Definition: TiledImage.h:800
Point mySize
Width of a tile (for each dimension)
Definition: TiledImage.h:788
ImageCache< OutputImage, ImageFactory, ImageCacheReadPolicy, ImageCacheWritePolicy > MyImageCache
Definition: TiledImage.h:104
TImageCacheWritePolicy * myWritePolicy
TImageCacheWritePolicy pointer.
Definition: TiledImage.h:803
MyImageCache * myImageCache
ImageCache pointer.
Definition: TiledImage.h:794
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
OutputIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::outputIterator ( )
inline

Definition at line 536 of file TiledImage.h.

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

537  {
538  return OutputIterator( begin() );
539  }
ConstIterator begin() const
Definition: TiledImage.h:458
TiledIterator OutputIterator
Definition: TiledImage.h:451
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
OutputIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::outputIterator ( const Point aPoint)
inline

Definition at line 541 of file TiledImage.h.

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

542  {
543  return OutputIterator( begin(aPoint) );
544  }
ConstIterator begin() const
Definition: TiledImage.h:458
TiledIterator OutputIterator
Definition: TiledImage.h:451
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
Range DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::range ( )
inline
Returns
the range providing begin and end iterators (with this) to scan the values of image.

Definition at line 574 of file TiledImage.h.

575  {
576  return Range( this );
577  }
TiledImageBidirectionalRangeFromPoint< TiledImage > Range
Definition: TiledImage.h:559
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ConstReverseIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::rbegin ( ) const
inline
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ReverseOutputIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::rbegin ( )
inline

Definition at line 495 of file TiledImage.h.

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

496  {
497  return ReverseTiledIterator( end() );
498  }
std::reverse_iterator< TiledIterator > ReverseTiledIterator
Definition: TiledImage.h:453
ConstIterator end() const
Definition: TiledImage.h:480
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ConstReverseIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::rbegin ( const Point aPoint) const
inline

Definition at line 500 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::begin(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_lowerBound, and DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_upperBound.

501  {
502  typename DGtal::Dimension i;
503 
504  Point point2;
505  for(i=0; i<Domain::dimension; i++)
506  point2[i]=(m_upperBound[i]-aPoint[i])+m_lowerBound[i];
507 
508  TiledIterator it( begin(point2) ); it++;
509  return ReverseTiledIterator(it);
510  }
Point m_lowerBound
domain lower and upper bound
Definition: TiledImage.h:797
DGtal::uint32_t Dimension
Definition: Common.h:120
std::reverse_iterator< TiledIterator > ReverseTiledIterator
Definition: TiledImage.h:453
ConstIterator begin() const
Definition: TiledImage.h:458
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ReverseOutputIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::rbegin ( const Point aPoint)
inline

Definition at line 512 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::begin(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_lowerBound, and DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_upperBound.

513  {
514  typename DGtal::Dimension i;
515 
516  Point point2;
517  for(i=0; i<Domain::dimension; i++)
518  point2[i]=(m_upperBound[i]-aPoint[i])+m_lowerBound[i];
519 
520  TiledIterator it( begin(point2) ); it++;
521  return ReverseTiledIterator(it);
522  }
Point m_lowerBound
domain lower and upper bound
Definition: TiledImage.h:797
DGtal::uint32_t Dimension
Definition: Common.h:120
std::reverse_iterator< TiledIterator > ReverseTiledIterator
Definition: TiledImage.h:453
ConstIterator begin() const
Definition: TiledImage.h:458
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ConstReverseIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::rend ( ) const
inline

Definition at line 524 of file TiledImage.h.

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

525  {
526  return ReverseTiledIterator( begin() );
527  }
std::reverse_iterator< TiledIterator > ReverseTiledIterator
Definition: TiledImage.h:453
ConstIterator begin() const
Definition: TiledImage.h:458
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ConstReverseIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::rend ( )
inline

Definition at line 529 of file TiledImage.h.

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

530  {
531  return ReverseTiledIterator( begin() );
532  }
std::reverse_iterator< TiledIterator > ReverseTiledIterator
Definition: TiledImage.h:453
ConstIterator begin() const
Definition: TiledImage.h:458
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ReverseOutputIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::routputIterator ( )
inline

Definition at line 546 of file TiledImage.h.

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

547  {
548  return ReverseOutputIterator( end() );
549  }
ReverseTiledIterator ReverseOutputIterator
Definition: TiledImage.h:455
ConstIterator end() const
Definition: TiledImage.h:480
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ReverseOutputIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::routputIterator ( const Point aPoint)
inline

Definition at line 551 of file TiledImage.h.

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

552  {
553  return ReverseOutputIterator( rbegin(aPoint) );
554  }
ReverseTiledIterator ReverseOutputIterator
Definition: TiledImage.h:455
ConstReverseIterator rbegin() const
Definition: TiledImage.h:490
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
void DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
void DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::setValue ( const Point aPoint,
const Value aValue 
)
inline

Set a value on an image (in cache) at a position specified by a aPoint.

Parameters
aPointthe point.
aValuethe value.

Definition at line 743 of file TiledImage.h.

References DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::findSubDomain(), DGtal::ImageCache< TImageContainer, TImageFactory, TReadPolicy, TWritePolicy >::incCacheMissWrite(), DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageCache, DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageFactory, DGtal::ImageCache< TImageContainer, TImageFactory, TReadPolicy, TWritePolicy >::update(), and DGtal::ImageCache< TImageContainer, TImageFactory, TReadPolicy, TWritePolicy >::write().

744  {
745  ASSERT(myImageFactory->domain().isInside(aPoint));
746 
747  if (myImageCache->write(aPoint, aValue))
748  return;
749  else
750  {
753  myImageCache->write(aPoint, aValue);
754  }
755  }
ImageFactory * myImageFactory
ImageFactory pointer.
Definition: TiledImage.h:791
MyImageCache * myImageCache
ImageCache pointer.
Definition: TiledImage.h:794
bool write(const Point &aPoint, const Value &aValue)
const Domain findSubDomain(const Point &aPoint) const
Definition: TiledImage.h:602
void update(const Domain &aDomain)
void incCacheMissWrite()
Definition: ImageCache.h:227

Field Documentation

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
Point DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_lowerBound
protected
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
Point DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_upperBound
protected
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
MyImageCache* DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageCache
protected
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ImageFactory* DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageFactory
protected
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
Domain::Integer DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myN
protected
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
TImageCacheReadPolicy* DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myReadPolicy
protected
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
Point DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::mySize
protected
template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
TImageCacheWritePolicy* DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myWritePolicy
protected

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