DGtal 1.4.0
Loading...
Searching...
No Matches
DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory > Class Template Reference

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

#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 >))
 Checking concepts.
 
 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
 Alias on the image factory.
 

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:

  • writeInPage : for setting a value on an image at a given position given by a point
  • flushPage : for flushing the image on disk according to the cache policy
Examples
images/exampleImageFactoryFromHDF5.cpp, and images/exampleTiledImage.cpp.

Definition at line 286 of file ImageCachePolicies.h.

Member Typedef Documentation

◆ Domain

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

Definition at line 297 of file ImageCachePolicies.h.

◆ ImageContainer

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

Definition at line 296 of file ImageCachePolicies.h.

◆ ImageFactory

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

Definition at line 294 of file ImageCachePolicies.h.

◆ Point

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

Definition at line 298 of file ImageCachePolicies.h.

◆ Value

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

Definition at line 299 of file ImageCachePolicies.h.

Constructor & Destructor Documentation

◆ ImageCacheWritePolicyWT() [1/2]

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.

◆ ~ImageCacheWritePolicyWT()

template<typename TImageContainer , typename TImageFactory >
DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory >::~ImageCacheWritePolicyWT ( )
inline

Destructor. Does nothing

Definition at line 310 of file ImageCachePolicies.h.

310{}

◆ ImageCacheWritePolicyWT() [2/2]

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

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT() [1/2]

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

Checking concepts.

◆ BOOST_CONCEPT_ASSERT() [2/2]

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

◆ flushPage()

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.

◆ operator=()

template<typename TImageContainer , typename TImageFactory >
ImageCacheWritePolicyWT & DGtal::ImageCacheWritePolicyWT< TImageContainer, TImageFactory >::operator= ( const ImageCacheWritePolicyWT< TImageContainer, TImageFactory > & other)
private

◆ writeInPage()

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

◆ myImageFactory

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: