diff --git a/.svn/pristine/02/026e80e057a6d9159d25c5e8e26f83bbd0193ce8.svn-base b/.svn/pristine/02/026e80e057a6d9159d25c5e8e26f83bbd0193ce8.svn-base new file mode 100644 index 0000000..0292987 --- /dev/null +++ b/.svn/pristine/02/026e80e057a6d9159d25c5e8e26f83bbd0193ce8.svn-base @@ -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 \ No newline at end of file diff --git a/.svn/wc.db b/.svn/wc.db index 05742f4..308d0b6 100644 Binary files a/.svn/wc.db and b/.svn/wc.db differ diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 81f53b4..0292987 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -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 diff --git a/include/scanserver/scan_io/scan_io.h b/include/scanserver/scan_io/scan_io.h deleted file mode 100644 index 39502ea..0000000 --- a/include/scanserver/scan_io/scan_io.h +++ /dev/null @@ -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 -#include -#include -#include - -#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 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* xyz = 0, std::vector* rgb = 0, std::vector* reflectance = 0, std::vector* amplitude = 0, std::vector* type = 0, std::vector* 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 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 diff --git a/include/scanserver/scan_io/scan_io_ks.h b/include/scanserver/scan_io/scan_io_ks.h deleted file mode 100644 index 878000c..0000000 --- a/include/scanserver/scan_io/scan_io_ks.h +++ /dev/null @@ -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 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* xyz, std::vector* rgb, std::vector* reflectance, std::vector* amplitude, std::vector* type, std::vector* deviation); - virtual bool supports(IODataType type); -}; - -#endif diff --git a/include/scanserver/scan_io/scan_io_ks_rgb.h b/include/scanserver/scan_io/scan_io_ks_rgb.h deleted file mode 100644 index 1a5fb6a..0000000 --- a/include/scanserver/scan_io/scan_io_ks_rgb.h +++ /dev/null @@ -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 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* xyz, std::vector* rgb, std::vector* reflectance, std::vector* amplitude, std::vector* type, std::vector* deviation); - virtual bool supports(IODataType type); -}; - -#endif diff --git a/include/scanserver/scan_io/scan_io_riegl_rgb.h b/include/scanserver/scan_io/scan_io_riegl_rgb.h deleted file mode 100644 index 98b5a4b..0000000 --- a/include/scanserver/scan_io/scan_io_riegl_rgb.h +++ /dev/null @@ -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 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* xyz, std::vector* rgb, std::vector* reflectance, std::vector* amplitude, std::vector* type, std::vector* deviation); - virtual bool supports(IODataType type); -}; - -#endif diff --git a/include/scanserver/scan_io/scan_io_riegl_txt.h b/include/scanserver/scan_io/scan_io_riegl_txt.h deleted file mode 100644 index f4567de..0000000 --- a/include/scanserver/scan_io/scan_io_riegl_txt.h +++ /dev/null @@ -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 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* xyz, std::vector* rgb, std::vector* reflectance, std::vector* amplitude, std::vector* type, std::vector* deviation); - virtual bool supports(IODataType type); -}; - -#endif diff --git a/include/scanserver/scan_io/scan_io_rts.h b/include/scanserver/scan_io/scan_io_rts.h deleted file mode 100644 index d43c458..0000000 --- a/include/scanserver/scan_io/scan_io_rts.h +++ /dev/null @@ -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 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* xyz, std::vector* rgb, std::vector* reflectance, std::vector* amplitude, std::vector* type, std::vector* deviation); - virtual bool supports(IODataType type); -private: - std::string cached_dir; - std::vector cached_poses; -}; - -#endif diff --git a/include/scanserver/scan_io/scan_io_rxp.h b/include/scanserver/scan_io/scan_io_rxp.h deleted file mode 100644 index 52b158f..0000000 --- a/include/scanserver/scan_io/scan_io_rxp.h +++ /dev/null @@ -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 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* xyz, std::vector* rgb, std::vector* reflectance, std::vector* amplitude, std::vector* type, std::vector* deviation); - virtual bool supports(IODataType type); - - ScanIO_rxp() : dec(0), imp(0) {} -private: - std::tr1::shared_ptr 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* xyz, std::vector* reflectance, std::vector* amplitude, std::vector* type, std::vector* 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* xyz, std::vector* reflectance, std::vector* amplitude, std::vector* type, std::vector* deviation) - { - this->filter = &filter; - this->xyz = xyz; - this->reflectance = reflectance; - this->amplitude = amplitude; - this->type = type; - this->deviation = deviation; - } -protected: - PointFilter* filter; - std::vector *xyz; - std::vector *reflectance; - std::vector *amplitude; - std::vector *type; - std::vector *deviation; - int start; - int currentscan; - // overridden from pointcloud class - void on_echo_transformed(echo_type echo); - - void on_frame_stop(const scanlib::frame_stop& arg) { - scanlib::basic_packets::on_frame_stop(arg); - currentscan++; - } -}; - -#endif diff --git a/include/scanserver/scan_io/scan_io_uos.h b/include/scanserver/scan_io/scan_io_uos.h deleted file mode 100644 index 4119b36..0000000 --- a/include/scanserver/scan_io/scan_io_uos.h +++ /dev/null @@ -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 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* xyz, std::vector* rgb, std::vector* reflectance, std::vector* amplitude, std::vector* type, std::vector* deviation); - virtual bool supports(IODataType type); -}; - -#endif diff --git a/include/scanserver/scan_io/scan_io_uos_rgb.h b/include/scanserver/scan_io/scan_io_uos_rgb.h deleted file mode 100644 index 2a6144b..0000000 --- a/include/scanserver/scan_io/scan_io_uos_rgb.h +++ /dev/null @@ -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 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* xyz, std::vector* rgb, std::vector* reflectance, std::vector* amplitude, std::vector* type, std::vector* deviation); - virtual bool supports(IODataType type); -}; - -#endif