DGtal  1.5.beta
DGtal::STBReader< TImageContainer, TFunctor > Class Template Reference

Aim: Image reader using the stb_image.h header only code. More...

#include <DGtal/io/readers/STBReader.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))
 
 BOOST_CONCEPT_ASSERT ((concepts::CUnaryFunctor< TFunctor, DGtal::Color, Value >))
 

Static Public Member Functions

static ImageContainer import (const std::string &filename, const Functor &aFunctor=Functor())
 

Detailed Description

template<typename TImageContainer, typename TFunctor = functors::ColorRGBEncoder<typename TImageContainer::Value>>
class DGtal::STBReader< TImageContainer, TFunctor >

Aim: Image reader using the stb_image.h header only code.

Description of template class 'STBReader'

Definition at line 61 of file STBReader.h.

Member Typedef Documentation

◆ Functor

template<typename TImageContainer , typename TFunctor = functors::ColorRGBEncoder<typename TImageContainer::Value>>
typedef TFunctor DGtal::STBReader< TImageContainer, TFunctor >::Functor

Definition at line 68 of file STBReader.h.

◆ ImageContainer

template<typename TImageContainer , typename TFunctor = functors::ColorRGBEncoder<typename TImageContainer::Value>>
typedef TImageContainer DGtal::STBReader< TImageContainer, TFunctor >::ImageContainer

Definition at line 65 of file STBReader.h.

◆ Value

template<typename TImageContainer , typename TFunctor = functors::ColorRGBEncoder<typename TImageContainer::Value>>
typedef TImageContainer::Value DGtal::STBReader< TImageContainer, TFunctor >::Value

Definition at line 67 of file STBReader.h.

◆ Vector

template<typename TImageContainer , typename TFunctor = functors::ColorRGBEncoder<typename TImageContainer::Value>>
typedef TImageContainer::Domain::Vector DGtal::STBReader< TImageContainer, TFunctor >::Vector

Definition at line 66 of file STBReader.h.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

template<typename TImageContainer , typename TFunctor = functors::ColorRGBEncoder<typename TImageContainer::Value>>
DGtal::STBReader< TImageContainer, TFunctor >::BOOST_CONCEPT_ASSERT ( (concepts::CUnaryFunctor< TFunctor, DGtal::Color, Value >)  )

◆ BOOST_STATIC_ASSERT()

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

◆ import()

template<typename TImageContainer , typename TFunctor = functors::ColorRGBEncoder<typename TImageContainer::Value>>
static ImageContainer DGtal::STBReader< TImageContainer, TFunctor >::import ( const std::string &  filename,
const Functor aFunctor = Functor() 
)
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 (DGtal::Color -> Value functor).
Returns
an instance of the ImageContainer.

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


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