ScanDataManager.cpp
Go to the documentation of this file.
2 
3 namespace lvr2
4 {
5 
6 ScanDataManager::ScanDataManager(std::string filename) : m_io(filename)
7 {
8 
9 }
10 
12 {
13  if ((!sd->pointsLoaded && !preview) || ( sd->pointsLoaded && preview))
14  {
15  sd = m_io.getSingleRawScan(sd->positionNumber, !preview);
16  }
17 }
18 
19 std::vector<ScanPtr> ScanDataManager::getScans()
20 {
21  return m_io.getRawScans(false);
22 }
23 
24 std::vector<std::vector<ScanImage> > ScanDataManager::getCameraData()
25 {
26  return m_io.getRawCamData(false);
27 }
28 
29 cv::Mat ScanDataManager::loadImageData(int scan_id, int cam_id)
30 {
31  ScanImage ret = m_io.getSingleRawCamData(scan_id, cam_id, true);
32  return ret.image;
33 }
34 
35 
36 } // namespace lvr2
std::vector< ScanPtr > getScans()
std::shared_ptr< Scan > ScanPtr
Shared pointer to scans.
Definition: ScanTypes.hpp:98
std::vector< ScanPtr > getRawScans(bool load_points=true)
Definition: HDF5IO.cpp:414
ScanDataManager(std::string filename)
std::vector< std::vector< ScanImage > > getRawCamData(bool load_image_data=true)
Definition: HDF5IO.cpp:466
cv::Mat loadImageData(int scan_id, int cam_id)
std::vector< std::vector< ScanImage > > getCameraData()
void loadPointCloudData(ScanPtr &sd, bool preview=false)
ScanPtr getSingleRawScan(int nr, bool load_points=true)
Definition: HDF5IO.cpp:507
cv::Mat image
OpenCV representation.
Definition: ScanTypes.hpp:122
ScanImage getSingleRawCamData(int scan_id, int img_id, bool load_image_data=true)
Definition: HDF5IO.cpp:591


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 Mon Feb 28 2022 22:46:09