DGtal
1.5.beta
|
Aim: Raw binary import of an Image. More...
#include <DGtal/io/readers/RawReader.h>
Public Types | |
typedef TImageContainer | ImageContainer |
typedef TImageContainer::Value | Value |
typedef TImageContainer::Domain::Vector | Vector |
typedef TFunctor | Functor |
Static Public Member Functions | |
template<typename Word > | |
static ImageContainer | importRaw (const std::string &filename, const Vector &extent, const Functor &aFunctor=Functor()) |
static ImageContainer | importRaw8 (const std::string &filename, const Vector &extent, const Functor &aFunctor=Functor()) |
static ImageContainer | importRaw16 (const std::string &filename, const Vector &extent, const Functor &aFunctor=Functor()) |
static ImageContainer | importRaw32 (const std::string &filename, const Vector &extent, const Functor &aFunctor=Functor()) |
Aim: Raw binary import of an Image.
Description of template class 'RawReader'
The import methods importRaw8
, importRaw16
and importRaw32
read raw files (little-endian format) containing unsigned integer values of, respectively, 8 bits, 16 bits and 32 bits width. The method importRaw
can read any type of values, signed integers, floating point types or even structures.
All these methods return an instance of the template parameter TImageContainer
. A functor can be specified to convert raw values to image values.
Example usage:
TImageContainer | the image container to use. |
TFunctor | the type of functor used in the import (by default set to functors::Cast< TImageContainer::Value>) . |
Definition at line 93 of file RawReader.h.
typedef TFunctor DGtal::RawReader< TImageContainer, TFunctor >::Functor |
Definition at line 101 of file RawReader.h.
typedef TImageContainer DGtal::RawReader< TImageContainer, TFunctor >::ImageContainer |
Definition at line 98 of file RawReader.h.
typedef TImageContainer::Value DGtal::RawReader< TImageContainer, TFunctor >::Value |
Definition at line 99 of file RawReader.h.
typedef TImageContainer::Domain::Vector DGtal::RawReader< TImageContainer, TFunctor >::Vector |
Definition at line 100 of file RawReader.h.
|
static |
Method to import a Raw (any type stored in little-endian format) into an instance of the template parameter ImageContainer.
Word | read pixel type. |
filename | the file name to import. |
extent | the size of the raw data set. |
aFunctor | the 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 > ). aFunctor must accept Word as input. |
|
static |
Method to import a Raw (unsigned 16bits little endian, uint16_t, unsigned short) into an instance of the template parameter ImageContainer.
filename | the file name to import. |
extent | the size of the raw data set. |
aFunctor | the 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 > ). aFunctor must accept uint16_t as input. |
|
static |
Method to import a Raw (unsigned 32bits little endian, uint32_t, unsigned int) into an instance of the template parameter ImageContainer.
filename | the file name to import. |
extent | the size of the raw data set. |
aFunctor | the 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 > ). aFunctor must accept uint32_t as input. |
Referenced by DGtal::GenericReader< TContainer, 3, DGtal::uint32_t >::importWithValueFunctor().
|
static |
Method to import a Raw (unsigned 8bits little endian, uint8_t, unsigned char) into an instance of the template parameter ImageContainer.
filename | the file name to import. |
extent | the size of the raw data set. |
aFunctor | the 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 > ). aFunctor must accept uint8_t as input. |
Referenced by DGtal::GenericReader< TContainer, 2, TValue >::importWithValueFunctor(), and DGtal::GenericReader< TContainer, 2, DGtal::uint32_t >::importWithValueFunctor().