DGtal  1.3.beta
Public Types | Public Member Functions | Static Public Member Functions
DGtal::MagickReader< TImageContainer, TFunctor > Struct Template Reference

Aim: implements methods to read a 2D image using the ImageMagick library. More...

#include <DGtal/io/readers/MagickReader.h>

Public Types

typedef TImageContainer ImageContainer
 
typedef TImageContainer::Domain::Vector Vector
 
typedef TImageContainer::Value Value
 
typedef TFunctor Functor
 

Public Member Functions

 BOOST_STATIC_ASSERT ((ImageContainer::Domain::dimension==2))
 

Static Public Member Functions

static ImageContainer importImage (const std::string &filename, const Functor &aFunctor=Functor(), bool topbotomOrder=true)
 

Detailed Description

template<typename TImageContainer, typename TFunctor = functors::MagickCast< typename TImageContainer::Value >>
struct DGtal::MagickReader< TImageContainer, TFunctor >

Aim: implements methods to read a 2D image using the ImageMagick library.

Description of template class 'MagickReader'

The functor cast colors (DGtal::Color) to the image value type (TimageContainer::Value).

Typical examples of functor are:

Template Parameters
TImageContainerthe image container to use.
TFunctorthe type of functor used in the import to cast color to image values (by default set to functors::MagickCast< TImageContainer::Value>) .

Definition at line 111 of file MagickReader.h.

Member Typedef Documentation

◆ Functor

template<typename TImageContainer , typename TFunctor = functors::MagickCast< typename TImageContainer::Value >>
typedef TFunctor DGtal::MagickReader< TImageContainer, TFunctor >::Functor

Definition at line 119 of file MagickReader.h.

◆ ImageContainer

template<typename TImageContainer , typename TFunctor = functors::MagickCast< typename TImageContainer::Value >>
typedef TImageContainer DGtal::MagickReader< TImageContainer, TFunctor >::ImageContainer

Definition at line 116 of file MagickReader.h.

◆ Value

template<typename TImageContainer , typename TFunctor = functors::MagickCast< typename TImageContainer::Value >>
typedef TImageContainer::Value DGtal::MagickReader< TImageContainer, TFunctor >::Value

Definition at line 118 of file MagickReader.h.

◆ Vector

template<typename TImageContainer , typename TFunctor = functors::MagickCast< typename TImageContainer::Value >>
typedef TImageContainer::Domain::Vector DGtal::MagickReader< TImageContainer, TFunctor >::Vector

Definition at line 117 of file MagickReader.h.

Member Function Documentation

◆ BOOST_STATIC_ASSERT()

template<typename TImageContainer , typename TFunctor = functors::MagickCast< typename TImageContainer::Value >>
DGtal::MagickReader< TImageContainer, TFunctor >::BOOST_STATIC_ASSERT ( (ImageContainer::Domain::dimension==2)  )

◆ importImage()

template<typename TImageContainer , typename TFunctor = functors::MagickCast< typename TImageContainer::Value >>
static ImageContainer DGtal::MagickReader< TImageContainer, TFunctor >::importImage ( const std::string &  filename,
const Functor aFunctor = Functor(),
bool  topbotomOrder = true 
)
static

Main method to import an Image into an instance of the template parameter ImageContainer.

Parameters
filenamethe file name to import.
aFunctorthe functor used to import and cast the source image values into the type of the image container value (by default set to functors::Cast < TImageContainer::Value > .
topbotomOrderif true, the point of coordinate (0,0) will be the bottom left corner image point (default) else the center of image coordinate will be the top left of the image (not usual).
Returns
an instance of the ImageContainer.

Referenced by DGtal::GenericReader< TContainer, 2, TValue >::importWithColorFunctor(), DGtal::GenericReader< TContainer, 2, DGtal::uint32_t >::importWithColorFunctor(), main(), and TEST_CASE().


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