DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RawReader.h
1 
17 #pragma once
18 
31 #if defined(RawReader_RECURSES)
32 #error Recursive header files inclusion detected in RawReader.h
33 #else // defined(RawReader_RECURSES)
34 
35 #define RawReader_RECURSES
36 
37 #if !defined RawReader_h
38 
39 #define RawReader_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <string>
45 #include <cstdio>
46 #include "DGtal/base/Common.h"
47 #include <boost/static_assert.hpp>
49 
50 namespace DGtal
51 {
52 
54  // template class RawReader
83  template <typename TImageContainer>
84  struct RawReader
85  {
86  // ----------------------- Standard services ------------------------------
87  public:
88 
89  typedef TImageContainer ImageContainer;
90  typedef typename TImageContainer::Domain::Vector Vector;
91 
92  BOOST_STATIC_ASSERT( (ImageContainer::Domain::dimension == 2) ||
93  (ImageContainer::Domain::dimension == 3));
94 
95 
104  static ImageContainer importRaw8(const std::string & filename,
105  const Vector & extent) throw(DGtal::IOException);
106 
107  }; // end of class RawReader
108 
109 
110 } // namespace DGtal
111 
112 
114 // Includes inline functions.
115 #include "DGtal/io/readers/RawReader.ih"
116 
117 // //
119 
120 #endif // !defined RawReader_h
121 
122 #undef RawReader_RECURSES
123 #endif // else defined(RawReader_RECURSES)