ScanDirectoryParser.hpp
Go to the documentation of this file.
1 
28 #ifndef __DIRECTORY_PARSER_HPP__
29 #define __DIRECTORY_PARSER_HPP__
30 
31 #include <string>
32 #include <vector>
33 
34 #include <boost/filesystem.hpp>
35 #include <Eigen/Dense>
36 
37 #include "lvr2/io/Timestamp.hpp"
38 #include "lvr2/io/PointBuffer.hpp"
41 
42 namespace lvr2
43 {
44 
45 struct ScanInfo
46 {
47  string m_filename;
48  size_t m_numPoints;
50 };
51 
53 {
54 
55 public:
56  ScanDirectoryParser(const std::string& directory) noexcept;
57 
58  void setPointCloudPrefix(const std::string& prefix);
59  void setPointCloudExtension(const std::string& extension);
60  void setPosePrefix(const std::string& prefix);
61  void setPoseExtension(const std::string& extension);
62 
63  void setStart(int s);
64  void setEnd(int e);
65 
66  void parseDirectory();
67 
68  PointBufferPtr randomSubSample(const size_t& targetSize);
69  PointBufferPtr octreeSubSample(const double& voxelSize, const size_t& minPoints = 5);
70 
72 
73 private:
74 
75  using Path = boost::filesystem::path;
76 
77  size_t examinePLY(const std::string& filename);
78  size_t examineASCII(const std::string& filename);
79 
80  size_t m_numPoints;
81  std::string m_pointPrefix;
82  std::string m_posePrefix;
83  std::string m_poseExtension;
84  std::string m_pointExtension;
85  std::string m_directory;
86 
87  size_t m_start;
88  size_t m_end;
89 
90  std::vector<ScanInfo*> m_scans;
91 };
92 
93 } // namespace lvr2
94 
95 #endif
std::shared_ptr< PointBuffer > PointBufferPtr
Transform< double > Transformd
4x4 double precision transformation matrix
Definition: MatrixTypes.hpp:71
std::vector< ScanInfo * > m_scans
boost::filesystem::path Path


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:09