DGtal  1.4.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)
35 #define HDF5Writer_RECURSES
36 
37 #if !defined HDF5Writer_h
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());
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)
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Export an Image with the HDF5 format.
Definition: HDF5Writer.h:69
BOOST_CONCEPT_ASSERT((concepts::CUnaryFunctor< TFunctor, Value, unsigned char >))
TFunctor Functor
Definition: HDF5Writer.h:73
TImage::Value Value
Definition: HDF5Writer.h:72
BOOST_STATIC_ASSERT(TImage::Domain::dimension==3)
static bool exportHDF5_3D(const std::string &filename, const Image &aImage, const std::string &aDataset, const Functor &aFunctor=Functor())
Aim: Defines a unary functor, which associates arguments to results.
Definition: CUnaryFunctor.h:90