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
ScanIO::m_scanIOs
static std::map< IOType, ScanIO * > m_scanIOs
Definition: scan_io.h:80
ScanIO::clearScanIOs
static void clearScanIOs()
Delete all ScanIO instances and (lazy) try to unload the libraries.
ScanIO::getScanIO
static ScanIO * getScanIO(IOType iotype)
Global mapping of io_types to single instances of ScanIOs.
ScanIO
IO of a 3D scan.
Definition: scan_io.h:28
ScanIO::readScan
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
ScanIO::readDirectory
virtual std::list< std::string > readDirectory(const char *dir_path, unsigned int start, unsigned int end)=0
create_sio
ScanIO * create_sio()
Definition: scan_io.h:87
ScanIO::readPose
virtual void readPose(const char *dir_path, const char *identifier, double *pose)=0
filter
void filter(lvr2::PointBufferPtr &cloud, lvr2::indexArray &inlier, size_t j)
Definition: src/tools/lvr2_cl_sor/Main.cpp:40
PointFilter
Definition: pointfilter.h:23
ScanIO::supports
virtual bool supports(IODataType type)=0
pointfilter.h
IO filtering class for ScanIO to discard unwanted points.
destroy_sio
void destroy_sio(ScanIO *)
Definition: scan_io.h:88
IOType
IOType
IO types for file formats, distinguishing the use of ScanIOs.
Definition: io_types.h:12
IODataType
IODataType
Data channels in the scans.
Definition: io_types.h:17
io_types.h
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 Wed Mar 2 2022 00:37:24