DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
PNMReader.h
1 
17 #pragma once
18 
31 #if defined(PNMReader_RECURSES)
32 #error Recursive header files inclusion detected in PNMReader.h
33 #else // defined(PNMReader_RECURSES)
34 
35 #define PNMReader_RECURSES
36 
37 #if !defined PNMReader_h
38 
39 #define PNMReader_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
46 
47 #ifdef _MSC_VER
48 #pragma warning(disable : 4290)
49 #endif
50 
51 namespace DGtal
52 {
53 
55 // class PNMReader
89  template <typename TImageContainer>
90  struct PNMReader
91  {
92  // ----------------------- Standard services ------------------------------
93  public:
94 
95  typedef TImageContainer ImageContainer;
96  typedef typename TImageContainer::Domain::Vector Vector;
97 
99 
100  BOOST_STATIC_ASSERT( (ImageContainer::Domain::dimension == 2) ||
101  (ImageContainer::Domain::dimension == 3));
102 
114  static ImageContainer importPGM(const std::string & aFilename,
115  bool topbotomOrder = true) throw(DGtal::IOException);
116 
117 
125  static ImageContainer importPGM3D(const std::string & aFilename) throw(DGtal::IOException);
126 
127 
128 
129  }; // end of class PNMReader
130 
131 
132 
133 } // namespace DGtal
134 
135 
137 // Includes inline functions.
138 #include "DGtal/io/readers/PNMReader.ih"
139 
140 
141 // //
143 
144 #endif // !defined PNMReader_h
145 
146 #undef PNMReader_RECURSES
147 #endif // else defined(PNMReader_RECURSES)