scan_io.h
Go to the documentation of this file.
1 
9 #ifndef __SCAN_IO_H__
10 #define __SCAN_IO_H__
11 
12 #include "slam6d/io_types.h"
13 #include "slam6d/pointfilter.h"
14 
15 #include <string>
16 #include <list>
17 #include <map>
18 #include <vector>
19 
20 
21 
28 class ScanIO {
29 public:
38  virtual std::list<std::string> readDirectory(const char* dir_path, unsigned int start, unsigned int end) = 0;
39 
47  virtual void readPose(const char* dir_path, const char* identifier, double* pose) = 0;
48 
56  virtual void readScan(const char* dir_path, const char* identifier, PointFilter& filter, std::vector<double>* xyz = 0, std::vector<unsigned char>* rgb = 0, std::vector<float>* reflectance = 0, std::vector<float>* amplitude = 0, std::vector<int>* type = 0, std::vector<float>* deviation = 0) = 0;
57 
64  virtual bool supports(IODataType type) = 0;
65 
75  static ScanIO* getScanIO(IOType iotype);
76 
78  static void clearScanIOs();
79 private:
80  static std::map<IOType, ScanIO *> m_scanIOs;
81 };
82 
83 // Since the shared object files are loaded on the fly, we
84 // need class factories
85 
86 // the types of the class factories
87 typedef ScanIO* create_sio();
88 typedef void destroy_sio(ScanIO*);
89 
90 #endif
void destroy_sio(ScanIO *)
Definition: scan_io.h:88
virtual void readPose(const char *dir_path, const char *identifier, double *pose)=0
virtual std::list< std::string > readDirectory(const char *dir_path, unsigned int start, unsigned int end)=0
IODataType
Data channels in the scans.
Definition: io_types.h:17
static void clearScanIOs()
Delete all ScanIO instances and (lazy) try to unload the libraries.
IO of a 3D scan.
Definition: scan_io.h:28
ScanIO * create_sio()
Definition: scan_io.h:87
IOType
IO types for file formats, distinguishing the use of ScanIOs.
Definition: io_types.h:12
static ScanIO * getScanIO(IOType iotype)
Global mapping of io_types to single instances of ScanIOs.
static std::map< IOType, ScanIO * > m_scanIOs
Definition: scan_io.h:80
virtual void readScan(const char *dir_path, const char *identifier, PointFilter &filter, std::vector< double > *xyz=0, std::vector< unsigned char > *rgb=0, std::vector< float > *reflectance=0, std::vector< float > *amplitude=0, std::vector< int > *type=0, std::vector< float > *deviation=0)=0
void filter(lvr2::PointBufferPtr &cloud, lvr2::indexArray &inlier, size_t j)
IO filtering class for ScanIO to discard unwanted points.
virtual bool supports(IODataType type)=0
Scan types and mapping functions.


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