DGtal 1.3.0
Loading...
Searching...
No Matches
Data Structures | Public Types | Public Member Functions | Protected Attributes
DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy > Class Template Reference

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

#include <DGtal/images/TiledImage.h>

Data Structures

class  TiledIterator
 

Public Types

typedef TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy > Self
 
typedef TImageContainer ImageContainer
 Types copied from the container. More...
 
typedef ImageContainer::Domain Domain
 
typedef ImageContainer::Point Point
 
typedef ImageContainer::Value Value
 
typedef ImageContainer::Difference Difference
 
typedef TImageFactory ImageFactory
 Types. More...
 
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 >))
 Checking concepts. More...
 
 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
 Number of tiles per dimension. More...
 
Point mySize
 Width of a tile (for each dimension) More...
 
ImageFactorymyImageFactory
 ImageFactory pointer. More...
 
MyImageCachemyImageCache
 ImageCache pointer. More...
 
Point m_lowerBound
 domain lower and upper bound More...
 
Point m_upperBound
 
TImageCacheReadPolicy * myReadPolicy
 TImageCacheReadPolicy pointer. More...
 
TImageCacheWritePolicy * myWritePolicy
 TImageCacheWritePolicy pointer. More...
 

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

◆ ConstIterator

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.

◆ ConstRange

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.

◆ ConstReverseIterator

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.

◆ Difference

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.

◆ Domain

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.

◆ ImageCacheReadPolicy

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.

◆ ImageCacheWritePolicy

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.

◆ ImageContainer

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.

◆ ImageFactory

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.

◆ MyImageCache

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.

◆ OutputImage

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.

◆ OutputIterator

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.

◆ Point

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.

◆ Range

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.

◆ ReverseOutputIterator

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.

◆ ReverseTiledIterator

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.

◆ Self

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.

◆ Value

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

◆ TiledImage() [1/2]

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.

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 }
TImageCacheReadPolicy * myReadPolicy
TImageCacheReadPolicy pointer.
Definition: TiledImage.h:800
ImageFactory * myImageFactory
ImageFactory pointer.
Definition: TiledImage.h:791
MyImageCache * myImageCache
ImageCache pointer.
Definition: TiledImage.h:794
Domain::Integer myN
Number of tiles per dimension.
Definition: TiledImage.h:785
TImageCacheWritePolicy * myWritePolicy
TImageCacheWritePolicy pointer.
Definition: TiledImage.h:803
ImageCache< OutputImage, ImageFactory, ImageCacheReadPolicy, ImageCacheWritePolicy > MyImageCache
Definition: TiledImage.h:104
Point mySize
Width of a tile (for each dimension)
Definition: TiledImage.h:788
Point m_lowerBound
domain lower and upper bound
Definition: TiledImage.h:797
DGtal::uint32_t Dimension
Definition: Common.h:137

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.

◆ ~TiledImage()

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::~TiledImage ( )
inline

◆ TiledImage() [2/2]

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.

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 }

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.

Member Function Documentation

◆ begin() [1/4]

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
OutputIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::begin ( )
inline

◆ begin() [2/4]

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ConstIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::begin ( ) const
inline

◆ begin() [3/4]

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

◆ begin() [4/4]

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

◆ BOOST_CONCEPT_ASSERT() [1/4]

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::BOOST_CONCEPT_ASSERT ( (concepts::CImage< TImageContainer >)  )

Checking concepts.

◆ BOOST_CONCEPT_ASSERT() [2/4]

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::BOOST_CONCEPT_ASSERT ( (concepts::CImageCacheReadPolicy< TImageCacheReadPolicy >)  )

◆ BOOST_CONCEPT_ASSERT() [3/4]

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::BOOST_CONCEPT_ASSERT ( (concepts::CImageCacheWritePolicy< TImageCacheWritePolicy >)  )

◆ BOOST_CONCEPT_ASSERT() [4/4]

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::BOOST_CONCEPT_ASSERT ( (concepts::CImageFactory< TImageFactory >)  )

◆ clearCacheAndResetCacheMisses()

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

◆ constRange()

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

◆ domain()

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.

201 {
202 return myImageFactory->domain();
203 }

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

◆ domainBlockCoords()

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.

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 }
ImageContainer::Domain Domain
Definition: TiledImage.h:92

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

◆ end() [1/2]

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
OutputIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::end ( )
inline

◆ end() [2/2]

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ConstIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::end ( ) const
inline

◆ findBlockCoordsFromPoint()

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.

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 }

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

◆ findSubDomain()

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.

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 }
HyperRectDomain< Space > Domain

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

◆ findSubDomainFromBlockCoords()

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.

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 }

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

◆ findTileFromBlockCoords()

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.

685 {
686 ASSERT(domainBlockCoords().isInside(aCoord));
687
690 if (!tile)
691 {
694 tile = myImageCache->getPage(d);
695 }
696
697 return tile;
698 }
void update(const Domain &aDomain)
ImageContainer * getPage(const Domain &aDomain) const
void incCacheMissRead()
Definition: ImageCache.h:219
const Domain findSubDomainFromBlockCoords(const Point &aCoord) const
Definition: TiledImage.h:658
TImageContainer ImageContainer
Types copied from the container.
Definition: TiledImage.h:91

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

◆ getCacheMissRead()

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
unsigned int DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::getCacheMissRead ( )
inline

◆ getCacheMissWrite()

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
unsigned int DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::getCacheMissWrite ( )
inline

◆ isValid()

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
bool DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::isValid ( ) const
inline

◆ operator()()

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.

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
725
727
728 myImageCache->read(aPoint, aValue);
729
730 return aValue;
731 }
732
733 // Unspecified behavior, returning the default constructed value.
734 return aValue;
735 }
bool read(const Point &aPoint, Value &aValue) const
const Domain findSubDomain(const Point &aPoint) const
Definition: TiledImage.h:602
std::ostream & info()
Trace trace
Definition: Common.h:154

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

◆ operator=()

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.

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 }

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.

◆ outputIterator() [1/2]

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
OutputIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::outputIterator ( )
inline

◆ outputIterator() [2/2]

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
OutputIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::outputIterator ( const Point aPoint)
inline

◆ range()

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

◆ rbegin() [1/4]

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.

496 {
497 return ReverseTiledIterator( end() );
498 }
std::reverse_iterator< TiledIterator > ReverseTiledIterator
Definition: TiledImage.h:453

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

◆ rbegin() [2/4]

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ConstReverseIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::rbegin ( ) const
inline

◆ rbegin() [3/4]

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ReverseOutputIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::rbegin ( const Point aPoint)
inline

◆ rbegin() [4/4]

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ConstReverseIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::rbegin ( const Point aPoint) const
inline

◆ rend() [1/2]

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ConstReverseIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::rend ( )
inline

◆ rend() [2/2]

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ConstReverseIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::rend ( ) const
inline

◆ routputIterator() [1/2]

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ReverseOutputIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::routputIterator ( )
inline

◆ routputIterator() [2/2]

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ReverseOutputIterator DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::routputIterator ( const Point aPoint)
inline

◆ selfDisplay()

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.

◆ setValue()

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
void DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::setValue ( const Point aPoint,
const Value aValue 
)
inline

Field Documentation

◆ m_lowerBound

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
Point DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_lowerBound
protected

◆ m_upperBound

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
Point DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::m_upperBound
protected

◆ myImageCache

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
MyImageCache* DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageCache
protected

◆ myImageFactory

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
ImageFactory* DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myImageFactory
protected

◆ myN

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
Domain::Integer DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myN
protected

◆ myReadPolicy

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
TImageCacheReadPolicy* DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::myReadPolicy
protected

◆ mySize

template<typename TImageContainer , typename TImageFactory , typename TImageCacheReadPolicy , typename TImageCacheWritePolicy >
Point DGtal::TiledImage< TImageContainer, TImageFactory, TImageCacheReadPolicy, TImageCacheWritePolicy >::mySize
protected

◆ myWritePolicy

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: