DGtal  0.9.4beta
Public Types | Public Member Functions | Protected Attributes | Private Member Functions
DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory > Class Template Reference

#include <DGtal/images/ImageCachePolicies.h>

Public Types

typedef TImageFactory ImageFactory
 
typedef TImageContainer ImageContainer
 
typedef TImageContainer::Domain Domain
 
typedef TImageContainer::Point Point
 
typedef TImageContainer::Value Value
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CImage< TImageContainer >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CImageFactory< TImageFactory >))
 
 ImageCacheWritePolicyWT (Alias< ImageFactory > anImageFactory)
 
 ~ImageCacheWritePolicyWT ()
 
void writeInPage (ImageContainer *anImageContainer, const Point &aPoint, const Value &aValue)
 
void flushPage (ImageContainer *anImageContainer)
 

Protected Attributes

ImageFactorymyImageFactory
 

Private Member Functions

 ImageCacheWritePolicyWT (const ImageCacheWritePolicyWT &other)
 
ImageCacheWritePolicyWToperator= (const ImageCacheWritePolicyWT &other)
 

Detailed Description

template<typename TImageContainer, typename TImageFactory>
class DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory >

Aim: implements a 'WT (Write-through)' write policy cache.

Description of template class 'ImageCacheWritePolicyWT'

Write is done synchronously both to the cache and to the disk.

Template Parameters
TImageContaineran image container type (model of CImage).
TImageFactoryan image factory.

The policy is done with 2 functions:

Examples:
images/exampleImageFactoryFromHDF5.cpp, and images/exampleTiledImage.cpp.

Definition at line 286 of file ImageCachePolicies.h.

Member Typedef Documentation

template<typename TImageContainer , typename TImageFactory >
typedef TImageContainer::Domain DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory >::Domain

Definition at line 297 of file ImageCachePolicies.h.

template<typename TImageContainer , typename TImageFactory >
typedef TImageContainer DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory >::ImageContainer

Definition at line 296 of file ImageCachePolicies.h.

template<typename TImageContainer , typename TImageFactory >
typedef TImageFactory DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory >::ImageFactory

Definition at line 294 of file ImageCachePolicies.h.

template<typename TImageContainer , typename TImageFactory >
typedef TImageContainer::Point DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory >::Point

Definition at line 298 of file ImageCachePolicies.h.

template<typename TImageContainer , typename TImageFactory >
typedef TImageContainer::Value DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory >::Value

Definition at line 299 of file ImageCachePolicies.h.

Constructor & Destructor Documentation

template<typename TImageContainer , typename TImageFactory >
DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory >::ImageCacheWritePolicyWT ( Alias< ImageFactory anImageFactory)
inline

Definition at line 301 of file ImageCachePolicies.h.

301  :
302  myImageFactory(&anImageFactory)
303  {
304  }
ImageFactory * myImageFactory
Alias on the image factory.
template<typename TImageContainer , typename TImageFactory >
DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory >::~ImageCacheWritePolicyWT ( )
inline

Destructor. Does nothing

Definition at line 310 of file ImageCachePolicies.h.

310 {}
template<typename TImageContainer , typename TImageFactory >
DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory >::ImageCacheWritePolicyWT ( const ImageCacheWritePolicyWT< TImageContainer, TImageFactory > &  other)
private

Member Function Documentation

template<typename TImageContainer , typename TImageFactory >
DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory >::BOOST_CONCEPT_ASSERT ( (concepts::CImage< TImageContainer >)  )

Checking concepts.

template<typename TImageContainer , typename TImageFactory >
DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory >::BOOST_CONCEPT_ASSERT ( (concepts::CImageFactory< TImageFactory >)  )
template<typename TImageContainer , typename TImageFactory >
void DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory >::flushPage ( ImageContainer anImageContainer)

Flush the image on disk according to the cache policy.

Parameters
anImageContainerthe image.
template<typename TImageContainer , typename TImageFactory >
ImageCacheWritePolicyWT& DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory >::operator= ( const ImageCacheWritePolicyWT< TImageContainer, TImageFactory > &  other)
private
template<typename TImageContainer , typename TImageFactory >
void DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory >::writeInPage ( ImageContainer anImageContainer,
const Point aPoint,
const Value aValue 
)

Set a value on an image at a given position given by aPoint.

Parameters
anImageContainerthe image.
aPointthe point.
aValuethe value.

Field Documentation

template<typename TImageContainer , typename TImageFactory >
ImageFactory* DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory >::myImageFactory
protected

Alias on the image factory.

Definition at line 340 of file ImageCachePolicies.h.


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