DGtal 1.4.2
|
Aim: implements methods to read a "Longvol" file format (with DGtal::uint64_t value type). More...
#include <DGtal/io/readers/LongvolReader.h>
Data Structures | |
struct | HeaderField |
Public Types | |
typedef TImageContainer | ImageContainer |
typedef TImageContainer::Value | Value |
typedef TFunctor | Functor |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CUnaryFunctor< TFunctor, DGtal::uint64_t, Value >)) | |
BOOST_STATIC_ASSERT (ImageContainer::Domain::dimension==3) | |
Static Public Member Functions | |
static ImageContainer | importLongvol (const std::string &filename, const Functor &aFunctor=Functor()) |
Private Types | |
typedef unsigned char | voxel |
Static Private Member Functions | |
template<typename Word > | |
static std::stringstream & | read_word (std::stringstream &fin, Word &aValue) |
static const char * | getHeaderValue (const char *type, const HeaderField *header) |
Returns NULL if this field is not found. | |
static int | getHeaderValueAsInt (const char *type, int *dest, const HeaderField *header) |
Returns non-zero if failure. | |
static int | getHeaderField (const char *type, const HeaderField *header) |
Internal method which returns the index of a field or -1 if not found. | |
Static Private Attributes | |
static const char * | requiredHeaders [] |
Global list of required fields in a .longvol file. | |
Aim: implements methods to read a "Longvol" file format (with DGtal::uint64_t value type).
Description of template class 'LongvolReader'
The main import method "importLongvol" returns an instance of the template parameter TImageContainer.
The private methods have been backported from the Simplelvol project (see http://liris.cnrs.fr/david.coeurjolly).
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 91 of file LongvolReader.h.
TFunctor DGtal::LongvolReader< TImageContainer, TFunctor >::Functor |
Definition at line 97 of file LongvolReader.h.
TImageContainer DGtal::LongvolReader< TImageContainer, TFunctor >::ImageContainer |
Definition at line 95 of file LongvolReader.h.
TImageContainer::Value DGtal::LongvolReader< TImageContainer, TFunctor >::Value |
Definition at line 96 of file LongvolReader.h.
|
private |
Definition at line 140 of file LongvolReader.h.
DGtal::LongvolReader< TImageContainer, TFunctor >::BOOST_CONCEPT_ASSERT | ( | (concepts::CUnaryFunctor< TFunctor, DGtal::uint64_t, Value >) | ) |
DGtal::LongvolReader< TImageContainer, TFunctor >::BOOST_STATIC_ASSERT | ( | ImageContainer::Domain::dimension | = =3 | ) |
|
staticprivate |
Internal method which returns the index of a field or -1 if not found.
|
staticprivate |
Returns NULL if this field is not found.
|
staticprivate |
Returns non-zero if failure.
|
static |
Main method to import a Longvol into an instance of the template parameter ImageContainer.
filename | the file name to import. |
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 > . |
Referenced by DGtal::GenericReader< TContainer, 3, DGtal::uint32_t >::importWithValueFunctor(), DGtal::GenericReader< TContainer, 3, TValue >::importWithValueFunctor(), TEST_CASE(), and testLongvol().
|
inlinestaticprivate |
Generic read word (binary mode) in little-endian mode.
fin | input stream. |
aValue | value to write. |
Definition at line 131 of file LongvolReader.h.
|
staticprivate |
Global list of required fields in a .longvol file.
Definition at line 189 of file LongvolReader.h.