3dpcp/.svn/pristine/7e/7e38fcad981dbe5497326fc210013caee144cd78.svn-base
2012-09-16 14:33:11 +02:00

67 lines
1.8 KiB
Text

#ifndef BASIC_SCAN_H
#define BASIC_SCAN_H
#include "scan.h"
#include "frame.h"
#include <vector>
#include <map>
class BasicScan : public Scan {
public:
static void openDirectory(const std::string& path, IOType type, int start, int end);
static void closeDirectory();
/*
Scan(const double *euler, int maxDist = -1);
Scan(const double rPos[3], const double rPosTheta[3], int maxDist = -1);
Scan(const double _rPos[3], const double _rPosTheta[3], vector<double *> &pts);
*/
virtual ~BasicScan();
virtual void setRangeFilter(double max, double min);
virtual void setHeightFilter(double top, double bottom);
virtual const char* getIdentifier() const { return m_identifier.c_str(); }
virtual DataPointer get(const std::string& identifier);
virtual void get(unsigned int types);
virtual DataPointer create(const std::string& identifier, unsigned int size);
virtual void clear(const std::string& identifier);
virtual unsigned int readFrames();
virtual void saveFrames();
virtual unsigned int getFrameCount();
virtual void getFrame(unsigned int i, const double*& pose_matrix, AlgoType& type);
protected:
virtual void createSearchTreePrivate();
virtual void calcReducedOnDemandPrivate();
virtual void addFrame(AlgoType type);
private:
//! Path and identifier of where the scan is located
std::string m_path, m_identifier;
IOType m_type;
double m_filter_max, m_filter_min, m_filter_top, m_filter_bottom;
bool m_filter_range_set, m_filter_height_set;
std::map<std::string, std::pair<unsigned char*, unsigned int>> m_data;
std::vector<Frame> m_frames;
//! Constructor for openDirectory
BasicScan(const std::string& path, const std::string& identifier, IOType type);
//! Initialization function
void init();
void createANNTree();
void createOcttree();
};
#endif //BASIC_SCAN_H