updated svn to 709

main
josch 12 years ago
parent 83b943ab2b
commit d1b3dd4e0e

@ -0,0 +1,38 @@
Project admins
Andreas Nuechter andreas@nuechti.de
Kai Lingemann kai.lingemann@gmx.de
Dorit Borrmann d.borrmann@jacobs-university.de
List of contributors
Andreas Nuechter andreas@nuechti.de
Kai Lingemann kai.lingemann@gmx.de
Dorit Borrmann d.borrmann@jacobs-university.de
Jan Elseberg j.elseberg@jacobs-university.de
Jochen Sprickerhof jochen@sprickerhof.de
HamidReza Houshiar h.houshiar@jacobs-university.de
Sven Albrecht sven.albrecht@uni-osnabrueck.de
Stan Serebryakov cfr.ssv@gmail.com
Thomas Escher tescher@uni-osnabrueck.de
Thomas Wiemann twiemann@uni-osnabrueck.de
Alexandru Tandrau alexandru@tandrau.com
Alexandru Eugen Ichim eugen@alexichim.com
Flavia Grosan me@flaviagrosan.com
Deyuan Qiu deyuan.qiu@googlemail.com
Darko Makreshanski d.makreshanski@jacobs-university.de
Mohammad Faisal Abdullah m.faisal@jacobs-university.de
Li Ming liming751218@whu.edu.cn
Li Wei xpaulee@gmail.com
Shams Feyzabadi sh.feyzabadi@gmail.co
Vladislav Perelmann v.perelman@jacobs-university.de
Chen Long lchen.whu@gmail.com
Remuas Dumitru r.dumitru@jaocbs-university.de
Billy Okal okal.billy@googlemail.com
Further contributors
Uwe Hebbelmann, Sebastian Stock, Andre Schemschat
Hartmut Surmann
Amuz Tamrakars, Ulugbek Makhmudov
Christof Soeger, Marcel Junker, Anton Fluegge, Hannes Schulz

Binary file not shown.

@ -28,6 +28,7 @@ Shams Feyzabadi sh.feyzabadi@gmail.co
Vladislav Perelmann v.perelman@jacobs-university.de
Chen Long lchen.whu@gmail.com
Remuas Dumitru r.dumitru@jaocbs-university.de
Billy Okal okal.billy@googlemail.com
Further contributors

@ -1,90 +0,0 @@
/**
* @file
* @brief IO of a 3D scan
* @author Kai Lingemann. Institute of Computer Science, University of Osnabrueck, Germany.
* @author Andreas Nuechter. Institute of Computer Science, University of Osnabrueck, Germany.
* @author Thomas Escher
*/
#ifndef __SCAN_IO_H__
#define __SCAN_IO_H__
#include <string>
#include <list>
#include <map>
#include <vector>
#include "scanserver/io_types.h"
#include "scanserver/pointfilter.h"
/**
* @brief IO of a 3D scan
*
* This class needs to be instantiated by a class loading
* 3D scans from different file formats.
*/
class ScanIO {
public:
/**
* Read a directory and return all possible scans in the [start,end] interval.
*
* @param dir_path The directory from which to read the scans
* @param start Starting index
* @param end Last index
* @return List of IO-specific identifiers of scans, matching the search
*/
virtual std::list<std::string> readDirectory(const char* dir_path, unsigned int start, unsigned int end) = 0;
/**
* Reads the pose from a dedicated pose file or from the scan file.
*
* @param dir_path The directory the scan is contained in
* @param scan_identifier IO-specific identifier for the particular scan
* @param pose Pointer to an existing double[6] array where the pose is saved in
*/
virtual void readPose(const char* dir_path, const char* identifier, double* pose) = 0;
/**
* Given a scan identifier, load the contents of this particular scan.
*
* @param dir_path The directory the scan is contained in
* @param identifier IO-specific identifier for the particular scan
* @param filter Filter object which each point is tested on by its position
*/
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;
/**
* Returns whether this ScanIO can load the requested data from a scan.
*
* @param type data channel request
* @return whether it's supported or not
*/
virtual bool supports(IODataType type) = 0;
/**
* @brief 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.
*
* @param type Key identifying the ScanIO
* @return The newly created or found ScanIO
*/
static ScanIO* getScanIO(IOType iotype);
//! Delete all ScanIO instances and (lazy) try to unload the libraries.
static void clearScanIOs();
private:
static std::map<IOType, ScanIO *> m_scanIOs;
};
// Since the shared object files are loaded on the fly, we
// need class factories
// the types of the class factories
typedef ScanIO* create_sio();
typedef void destroy_sio(ScanIO*);
#endif

@ -1,27 +0,0 @@
/**
* @file
* @brief IO of a 3D scan in uos file format
* @author Thomas Escher
*/
#ifndef __SCAN_IO_KS_H__
#define __SCAN_IO_KS_H__
#include "scan_io.h"
/**
* @brief 3D scan loader for KS scans
*
* The compiled class is available as shared object file
*/
class ScanIO_ks : public ScanIO {
public:
virtual std::list<std::string> readDirectory(const char* dir_path, unsigned int start, unsigned int end);
virtual void readPose(const char* dir_path, const char* identifier, double* pose);
virtual void readScan(const char* dir_path, const char* identifier, PointFilter&& filter, std::vector<double>* xyz, std::vector<unsigned char>* rgb, std::vector<float>* reflectance, std::vector<float>* amplitude, std::vector<int>* type, std::vector<float>* deviation);
virtual bool supports(IODataType type);
};
#endif

@ -1,27 +0,0 @@
/**
* @file
* @brief IO of a 3D scan in uos file format
* @author Thomas Escher
*/
#ifndef __SCAN_IO_KS_RGB_H__
#define __SCAN_IO_KS_RGB_H__
#include "scan_io.h"
/**
* @brief 3D scan loader for KS RGB scans
*
* The compiled class is available as shared object file
*/
class ScanIO_ks_rgb : public ScanIO {
public:
virtual std::list<std::string> readDirectory(const char* dir_path, unsigned int start, unsigned int end);
virtual void readPose(const char* dir_path, const char* identifier, double* pose);
virtual void readScan(const char* dir_path, const char* identifier, PointFilter&& filter, std::vector<double>* xyz, std::vector<unsigned char>* rgb, std::vector<float>* reflectance, std::vector<float>* amplitude, std::vector<int>* type, std::vector<float>* deviation);
virtual bool supports(IODataType type);
};
#endif

@ -1,27 +0,0 @@
/**
* @file
* @brief IO of a 3D scan in uos file format
* @author Thomas Escher
*/
#ifndef __SCAN_IO_RIEGL_RGB_H__
#define __SCAN_IO_RIEGL_RGB_H__
#include "scan_io.h"
/**
* @brief 3D scan loader for Riegl scans
*
* The compiled class is available as shared object file
*/
class ScanIO_riegl_rgb : public ScanIO {
public:
virtual std::list<std::string> readDirectory(const char* dir_path, unsigned int start, unsigned int end);
virtual void readPose(const char* dir_path, const char* identifier, double* pose);
virtual void readScan(const char* dir_path, const char* identifier, PointFilter&& filter, std::vector<double>* xyz, std::vector<unsigned char>* rgb, std::vector<float>* reflectance, std::vector<float>* amplitude, std::vector<int>* type, std::vector<float>* deviation);
virtual bool supports(IODataType type);
};
#endif

@ -1,27 +0,0 @@
/**
* @file
* @brief IO of a 3D scan in uos file format
* @author Thomas Escher
*/
#ifndef __SCAN_IO_RIEGL_H__
#define __SCAN_IO_RIEGL_H__
#include "scan_io.h"
/**
* @brief 3D scan loader for Riegl scans
*
* The compiled class is available as shared object file
*/
class ScanIO_riegl_txt : public ScanIO {
public:
virtual std::list<std::string> readDirectory(const char* dir_path, unsigned int start, unsigned int end);
virtual void readPose(const char* dir_path, const char* identifier, double* pose);
virtual void readScan(const char* dir_path, const char* identifier, PointFilter&& filter, std::vector<double>* xyz, std::vector<unsigned char>* rgb, std::vector<float>* reflectance, std::vector<float>* amplitude, std::vector<int>* type, std::vector<float>* deviation);
virtual bool supports(IODataType type);
};
#endif

@ -1,30 +0,0 @@
/**
* @file
* @brief IO of a 3D scan in rts file format
* @author Thomas Escher
*/
#ifndef __SCAN_IO_UOS_H__
#define __SCAN_IO_UOS_H__
#include "scan_io.h"
/**
* @brief 3D scan loader for RTS scans
*
* The compiled class is available as shared object file
*/
class ScanIO_rts : public ScanIO {
public:
virtual std::list<std::string> readDirectory(const char* dir_path, unsigned int start, unsigned int end);
virtual void readPose(const char* dir_path, const char* identifier, double* pose);
virtual void readScan(const char* dir_path, const char* identifier, PointFilter&& filter, std::vector<double>* xyz, std::vector<unsigned char>* rgb, std::vector<float>* reflectance, std::vector<float>* amplitude, std::vector<int>* type, std::vector<float>* deviation);
virtual bool supports(IODataType type);
private:
std::string cached_dir;
std::vector<double> cached_poses;
};
#endif

@ -1,83 +0,0 @@
/**
* @file
* @brief IO of a 3D scan in rxp file format
* @author Thomas Escher
*/
#ifndef __SCAN_IO_RXP_H__
#define __SCAN_IO_RXP_H__
#include "scan_io.h"
#include "slam6d/point.h"
#include "riegl/scanlib.hpp"
using namespace scanlib;
using namespace std;
using namespace std::tr1;
class importer;
/**
* @brief 3D scan loader for RXP scans
*
* The compiled class is available as shared object file
*/
class ScanIO_rxp : public ScanIO {
public:
virtual std::list<std::string> readDirectory(const char* dir_path, unsigned int start, unsigned int end);
virtual void readPose(const char* dir_path, const char* identifier, double* pose);
virtual void readScan(const char* dir_path, const char* identifier, PointFilter&& filter, std::vector<double>* xyz, std::vector<unsigned char>* rgb, std::vector<float>* reflectance, std::vector<float>* amplitude, std::vector<int>* type, std::vector<float>* deviation);
virtual bool supports(IODataType type);
ScanIO_rxp() : dec(0), imp(0) {}
private:
std::tr1::shared_ptr<basic_rconnection> rc;
decoder_rxpmarker *dec;
importer *imp;
std::string old_path;
};
/**
* The importer class is the interface to riegl's pointcloud class, and will convert their point struct to slam6d's point class.
*
* Code adapted from rivlib/example/pointcloudcpp.cpp available from http://www.riegl.com .
*/
class importer : public scanlib::pointcloud
{
public:
importer(PointFilter& filter, int start, std::vector<double>* xyz, std::vector<float>* reflectance, std::vector<float>* amplitude, std::vector<int>* type, std::vector<float>* deviation) :
pointcloud(false), // set this to true if you need gps aligned timing
filter(&filter), xyz(xyz), reflectance(reflectance), amplitude(amplitude), type(type), deviation(deviation),
start(start), currentscan(0)
{}
inline int getCurrentScan() { return currentscan; }
inline void set(PointFilter& filter, std::vector<double>* xyz, std::vector<float>* reflectance, std::vector<float>* amplitude, std::vector<int>* type, std::vector<float>* deviation)
{
this->filter = &filter;
this->xyz = xyz;
this->reflectance = reflectance;
this->amplitude = amplitude;
this->type = type;
this->deviation = deviation;
}
protected:
PointFilter* filter;
std::vector<double> *xyz;
std::vector<float> *reflectance;
std::vector<float> *amplitude;
std::vector<int> *type;
std::vector<float> *deviation;
int start;
int currentscan;
// overridden from pointcloud class
void on_echo_transformed(echo_type echo);
void on_frame_stop(const scanlib::frame_stop<iterator_type>& arg) {
scanlib::basic_packets::on_frame_stop(arg);
currentscan++;
}
};
#endif

@ -1,27 +0,0 @@
/**
* @file
* @brief IO of a 3D scan in uos file format
* @author Thomas Escher
*/
#ifndef __SCAN_IO_UOS_H__
#define __SCAN_IO_UOS_H__
#include "scan_io.h"
/**
* @brief 3D scan loader for UOS scans
*
* The compiled class is available as shared object file
*/
class ScanIO_uos : public ScanIO {
public:
virtual std::list<std::string> readDirectory(const char* dir_path, unsigned int start, unsigned int end);
virtual void readPose(const char* dir_path, const char* identifier, double* pose);
virtual void readScan(const char* dir_path, const char* identifier, PointFilter&& filter, std::vector<double>* xyz, std::vector<unsigned char>* rgb, std::vector<float>* reflectance, std::vector<float>* amplitude, std::vector<int>* type, std::vector<float>* deviation);
virtual bool supports(IODataType type);
};
#endif

@ -1,27 +0,0 @@
/**
* @file
* @brief IO of a 3D scan in uos file format
* @author Thomas Escher
*/
#ifndef __SCAN_IO_UOS_RGB_H__
#define __SCAN_IO_UOS_RGB_H__
#include "scan_io.h"
/**
* @brief 3D scan loader for UOS scans with color information
*
* The compiled class is available as shared object file
*/
class ScanIO_uos_rgb : public ScanIO {
public:
virtual std::list<std::string> readDirectory(const char* dir_path, unsigned int start, unsigned int end);
virtual void readPose(const char* dir_path, const char* identifier, double* pose);
virtual void readScan(const char* dir_path, const char* identifier, PointFilter&& filter, std::vector<double>* xyz, std::vector<unsigned char>* rgb, std::vector<float>* reflectance, std::vector<float>* amplitude, std::vector<int>* type, std::vector<float>* deviation);
virtual bool supports(IODataType type);
};
#endif
Loading…
Cancel
Save