DGtal  0.9.2
HDF5Writer.h
1 
17 #pragma once
18 
31 #if defined(HDF5Writer_RECURSES)
32 #error Recursive header files inclusion detected in HDF5Writer.h
33 #else // defined(HDF5Writer_RECURSES)
34 
35 #define HDF5Writer_RECURSES
36 
37 #if !defined HDF5Writer_h
38 
39 #define HDF5Writer_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <string>
45 #include <boost/static_assert.hpp>
46 #include <boost/type_traits.hpp>
47 #include "DGtal/base/Common.h"
48 #include "DGtal/base/CUnaryFunctor.h"
49 #include "DGtal/base/BasicFunctors.h"
51 
52 namespace DGtal
53 {
54 
56  // template class HDF5Writer
67  template <typename TImage, typename TFunctor = functors::Identity>
68  struct HDF5Writer
69  {
70  // ----------------------- Standard services ------------------------------
71  typedef TImage Image;
72  typedef typename TImage::Value Value;
73  typedef TFunctor Functor;
74 
76  BOOST_STATIC_ASSERT(TImage::Domain::dimension == 3);
77 
87  static bool exportHDF5_3D(const std::string & filename, const Image &aImage, const std::string & aDataset,
88  const Functor & aFunctor = Functor()) throw(DGtal::IOException);
89  };
90 }//namespace
91 
93 // Includes inline functions.
94 #include "DGtal/io/writers/HDF5Writer.ih"
95 
96 // //
98 
99 #endif // !defined HDF5Writer_h
100 
101 #undef HDF5Writer_RECURSES
102 #endif // else defined(HDF5Writer_RECURSES)
BOOST_STATIC_ASSERT(TImage::Domain::dimension==3)
Aim: Export an Image with the HDF5 format.
Definition: HDF5Writer.h:68
Aim: Defines a unary functor, which associates arguments to results.
Definition: CUnaryFunctor.h:89
static bool exportHDF5_3D(const std::string &filename, const Image &aImage, const std::string &aDataset, const Functor &aFunctor=Functor())
DGtal is the top-level namespace which contains all DGtal functions and types.
BOOST_CONCEPT_ASSERT((concepts::CUnaryFunctor< TFunctor, Value, unsigned char >))
TImage::Value Value
Definition: HDF5Writer.h:72
TFunctor Functor
Definition: HDF5Writer.h:73