DGtal 1.3.0
Loading...
Searching...
No Matches
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)
35#define PointListReader_RECURSES
36
37#if !defined PointListReader_h
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
49namespace DGtal
50{
51
53 // class PointListReader
83 template <typename TPoint>
85 {
86 // ----------------------- Standard services ------------------------------
87 public:
88
100 static std::vector< TPoint>
101 getPointsFromInputStream (std::istream &in,
102 std::vector<unsigned int> aVectPosition=std::vector<unsigned int>());
103
104
115 static std::vector< TPoint>
116 getPointsFromFile (const std::string &filename,
117 std::vector<unsigned int> aVectPosition=std::vector<unsigned int>());
118
119
120
121
122
132 static std::vector<std::vector< TPoint> >
133 getPolygonsFromFile (const std::string &filename);
134
135
144 static std::vector<std::vector< TPoint> >
145 getPolygonsFromInputStream ( std::istream &in );
146
147
148
149
158 template < typename TInteger >
159 static std::vector< FreemanChain< TInteger > >
160 getFreemanChainsFromFile (const std::string &filename);
161
162
163
164
165 }; // end of class PointListReader
166
167
168
169} // namespace DGtal
170
171
173// Includes inline functions.
174#include "DGtal/io/readers/PointListReader.ih"
175
176
177// //
179
180#endif // !defined PointListReader_h
181
182#undef PointListReader_RECURSES
183#endif // else defined(PointListReader_RECURSES)
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Implements method to read a set of points represented in each line of a file.
static std::vector< TPoint > getPointsFromInputStream(std::istream &in, std::vector< unsigned int > aVectPosition=std::vector< unsigned int >())
static std::vector< std::vector< TPoint > > getPolygonsFromInputStream(std::istream &in)
static std::vector< FreemanChain< TInteger > > getFreemanChainsFromFile(const std::string &filename)
static std::vector< TPoint > getPointsFromFile(const std::string &filename, std::vector< unsigned int > aVectPosition=std::vector< unsigned int >())
static std::vector< std::vector< TPoint > > getPolygonsFromFile(const std::string &filename)