DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
PointListReader.h
1 
17 #pragma once
18 
31 #if defined(PointListReader_RECURSES)
32 #error Recursive header files inclusion detected in PointListReader.h
33 #else // defined(PointListReader_RECURSES)
34 
35 #define PointListReader_RECURSES
36 
37 #if !defined PointListReader_h
38 
39 #define PointListReader_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <vector>
45 #include "DGtal/base/Common.h"
46 #include "DGtal/geometry/curves/FreemanChain.h"
48 
49 namespace DGtal
50 {
51 
53  // class PointListReader
83  template <typename TPoint>
85  {
86  // ----------------------- Standard services ------------------------------
87  public:
88 
99  static std::vector< TPoint>
100  getPointsFromInputStream (std::istream &in,
101  std::vector<unsigned int> aVectPosition=std::vector<unsigned int>());
102 
103 
114  static std::vector< TPoint>
115  getPointsFromFile (const std::string &filename,
116  std::vector<unsigned int> aVectPosition=std::vector<unsigned int>());
117 
118 
119 
120 
121 
131  static std::vector<std::vector< TPoint> >
132  getPolygonsFromFile (const std::string &filename);
133 
134 
143  static std::vector<std::vector< TPoint> >
144  getPolygonsFromInputStream ( std::istream &in );
145 
146 
147 
148 
157  template < typename TInteger >
158  static std::vector< FreemanChain< TInteger > >
159  getFreemanChainsFromFile (const std::string &filename);
160 
161 
162 
163 
164  }; // end of class PointListReader
165 
166 
167 
168 } // namespace DGtal
169 
170 
172 // Includes inline functions.
173 #include "DGtal/io/readers/PointListReader.ih"
174 
175 
176 // //
178 
179 #endif // !defined PointListReader_h
180 
181 #undef PointListReader_RECURSES
182 #endif // else defined(PointListReader_RECURSES)