Public Types | Public Member Functions | Static Public Member Functions

DGtal::RawReader< TImageContainer > Struct Template Reference

Aim: implements methods to read a "Vol" file format. More...

#include <RawReader.h>

Public Types

typedef TImageContainer ImageContainer
typedef
TImageContainer::Domain::Vector 
Vector

Public Member Functions

 BOOST_STATIC_ASSERT ((ImageContainer::Domain::staticDimension==2)||(ImageContainer::Domain::staticDimension==3))

Static Public Member Functions

static ImageContainer importRaw8 (const std::string &filename, const Vector &extent) throw (DGtal::IOException)

Detailed Description

template<typename TImageContainer>
struct DGtal::RawReader< TImageContainer >

Aim: implements methods to read a "Vol" file format.

Description of template class 'RawReader'

The main import method "importRaw8" returns an instance of the template parameter TImageContainer.

Example usage:

 ...
 typedef SpaceND<int,3> Space3;
 typedef HyperRectDomain<Space3> TDomain;
 typedef TDomain::Point Point;

 //Default image container = STLVector
 typedef ImageSelector<TDomain, int>::Type Image;
 
 RawReader<Image> reader;
 Image image = reader.importRaw8("data.raw");

 trace.info() << image <<endl;
 ...
Template Parameters:
TImageContainer the image container to use.
See also:
testRawReader.cpp

Member Typedef Documentation

template<typename TImageContainer >
typedef TImageContainer DGtal::RawReader< TImageContainer >::ImageContainer
template<typename TImageContainer >
typedef TImageContainer::Domain::Vector DGtal::RawReader< TImageContainer >::Vector

Member Function Documentation

template<typename TImageContainer >
DGtal::RawReader< TImageContainer >::BOOST_STATIC_ASSERT ( (ImageContainer::Domain::staticDimension==2)||(ImageContainer::Domain::staticDimension==3)   ) 
template<typename TImageContainer >
static ImageContainer DGtal::RawReader< TImageContainer >::importRaw8 ( const std::string &  filename,
const Vector extent 
) throw (DGtal::IOException) [static]

Main method to import a Raw (8bits) into an instance of the template parameter ImageContainer.

Parameters:
filename the file name to import.
extent the size of the raw data set.
Returns:
an instance of the ImageContainer.

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