31 #if defined(VolReader_RECURSES) 32 #error Recursive header files inclusion detected in VolReader.h 33 #else // defined(VolReader_RECURSES) 35 #define VolReader_RECURSES 37 #if !defined VolReader_h 47 #include "DGtal/base/Common.h" 48 #include "DGtal/base/CUnaryFunctor.h" 87 template <
typename TImageContainer,
88 typename TFunctor = functors::Cast< typename TImageContainer::Value > >
114 static ImageContainer
importVol(
const std::string & filename,
131 type( strdup(t) ), value( strdup(v) ) {}
138 type( strdup(h.type) ), value( strdup(h.value) ) {};
142 const HeaderField &operator = (
const HeaderField &h) {
145 if (h.
type != NULL) {
146 type = strdup( h.
type );
147 value = strdup( h.
value );
178 #include "DGtal/io/readers/VolReader.ih" 183 #endif // !defined VolReader_h 185 #undef VolReader_RECURSES 186 #endif // else defined(VolReader_RECURSES) TImageContainer::Value Value
static const char * getHeaderValue(const char *type, const HeaderField *header)
Returns NULL if this field is not found.
static int getHeaderField(const char *type, const HeaderField *header)
Internal method which returns the index of a field or -1 if not found.
BOOST_STATIC_ASSERT(ImageContainer::Domain::dimension==3)
TImageContainer ImageContainer
Aim: Defines a unary functor, which associates arguments to results.
static ImageContainer importVol(const std::string &filename, const Functor &aFunctor=Functor())
static const char * requiredHeaders[]
Global list of required fields in a .vol file.
Aim: implements methods to read a "Vol" file format.
BOOST_CONCEPT_ASSERT((concepts::CUnaryFunctor< TFunctor, unsigned char, Value >))
DGtal is the top-level namespace which contains all DGtal functions and types.
static int getHeaderValueAsInt(const char *type, int *dest, const HeaderField *header)
Returns non-zero if failure.