Public Member Functions | Static Public Member Functions | Static Private Attributes | List of all members
ScanIO Class Referenceabstract

IO of a 3D scan. More...

#include <scan_io.h>

Inheritance diagram for ScanIO:
Inheritance graph
[legend]

Public Member Functions

virtual std::list< std::string > readDirectory (const char *dir_path, unsigned int start, unsigned int end)=0
 
virtual void readPose (const char *dir_path, const char *identifier, double *pose)=0
 
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
 
virtual bool supports (IODataType type)=0
 

Static Public Member Functions

static void clearScanIOs ()
 Delete all ScanIO instances and (lazy) try to unload the libraries. More...
 
static ScanIOgetScanIO (IOType iotype)
 Global mapping of io_types to single instances of ScanIOs. More...
 

Static Private Attributes

static std::map< IOType, ScanIO * > m_scanIOs
 

Detailed Description

IO of a 3D scan.

This class needs to be instantiated by a class loading 3D scans from different file formats.

Definition at line 28 of file scan_io.h.

Member Function Documentation

◆ clearScanIOs()

static void ScanIO::clearScanIOs ( )
static

Delete all ScanIO instances and (lazy) try to unload the libraries.

◆ getScanIO()

static ScanIO* ScanIO::getScanIO ( IOType  iotype)
static

Global mapping of io_types to single instances of ScanIOs.

If the ScanIO doesn't exist, it will be created and saved in a map. Otherwise, the matching ScanIO will be returned.

Parameters
typeKey identifying the ScanIO
Returns
The newly created or found ScanIO

◆ readDirectory()

virtual std::list<std::string> ScanIO::readDirectory ( const char *  dir_path,
unsigned int  start,
unsigned int  end 
)
pure virtual

Read a directory and return all possible scans in the [start,end] interval.

Parameters
dir_pathThe directory from which to read the scans
startStarting index
endLast index
Returns
List of IO-specific identifiers of scans, matching the search

◆ readPose()

virtual void ScanIO::readPose ( const char *  dir_path,
const char *  identifier,
double *  pose 
)
pure virtual

Reads the pose from a dedicated pose file or from the scan file.

Parameters
dir_pathThe directory the scan is contained in
scan_identifierIO-specific identifier for the particular scan
posePointer to an existing double[6] array where the pose is saved in

◆ readScan()

virtual void ScanIO::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 
)
pure virtual

Given a scan identifier, load the contents of this particular scan.

Parameters
dir_pathThe directory the scan is contained in
identifierIO-specific identifier for the particular scan
filterFilter object which each point is tested on by its position

◆ supports()

virtual bool ScanIO::supports ( IODataType  type)
pure virtual

Returns whether this ScanIO can load the requested data from a scan.

Parameters
typedata channel request
Returns
whether it's supported or not

Member Data Documentation

◆ m_scanIOs

std::map<IOType, ScanIO *> ScanIO::m_scanIOs
staticprivate

Definition at line 80 of file scan_io.h.


The documentation for this class was generated from the following file:


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:26