DGtal  0.9.4beta
Public Member Functions | Static Public Member Functions
DGtal::GenericWriter< TContainer, Tdim, TValue, TFunctor > Struct Template Reference

#include <DGtal/io/writers/GenericWriter.h>

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CConstImage< TContainer >))
 

Static Public Member Functions

static bool exportFile (const std::string &filename, const TContainer &anImage, const TFunctor &aFunctor=TFunctor()) throw (DGtal::IOException)
 

Detailed Description

template<typename TContainer, int Tdim = TContainer::Point::dimension, typename TValue = typename TContainer::Value, typename TFunctor = functors::Identity>
struct DGtal::GenericWriter< TContainer, Tdim, TValue, TFunctor >

Aim: Provide a mechanism to save image (2D or 3D) into file with the best saver loader according to an filename (by parsing the extension).

Description of template class 'GenericWriter'

The typical use is very simple:

Examples:
images/imageBasicSubsampling.cpp.

Definition at line 93 of file GenericWriter.h.

Member Function Documentation

template<typename TContainer, int Tdim = TContainer::Point::dimension, typename TValue = typename TContainer::Value, typename TFunctor = functors::Identity>
DGtal::GenericWriter< TContainer, Tdim, TValue, TFunctor >::BOOST_CONCEPT_ASSERT ( (concepts::CConstImage< TContainer >)  )
template<typename TContainer, int Tdim = TContainer::Point::dimension, typename TValue = typename TContainer::Value, typename TFunctor = functors::Identity>
static bool DGtal::GenericWriter< TContainer, Tdim, TValue, TFunctor >::exportFile ( const std::string &  filename,
const TContainer &  anImage,
const TFunctor &  aFunctor = TFunctor() 
)
throw (DGtal::IOException
)
static

Export an image.

Parameters
filenamethe filename of the saved image (with a extension name).
anImagethe image to be saved.
aFunctorto apply image transformation before saving.

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