supereight
reader_newercollege.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2020-2022 Smart Robotics Lab, Imperial College London, Technical University of Munich
3  * SPDX-FileCopyrightText: 2020 Marija Popovic
4  * SPDX-FileCopyrightText: 2020-2022 Nils Funk
5  * SPDX-FileCopyrightText: 2020-2022 Sotiris Papatheodorou
6  * SPDX-License-Identifier: BSD-3-Clause
7  */
8 
9 #ifndef __READER_NEWERCOLLEGE_HPP
10 #define __READER_NEWERCOLLEGE_HPP
11 
12 #include <Eigen/Dense>
13 #include <cstdint>
14 #include <fstream>
15 #include <string>
16 
17 #include "reader_base.hpp"
18 #include "se/common/projection.hpp"
19 #include "se/image/image.hpp"
20 
21 
22 
23 namespace se {
24 
28 class NewerCollegeReader : public Reader {
29  public:
35 
37  void restart();
38 
43  std::string name() const;
44 
45  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
46 
47  private:
48  std::vector<std::string> scan_filenames_;
49 
50  ReaderStatus nextDepth(Image<float>& depth_image);
51 
52  ReaderStatus nextRGBA(Image<uint32_t>& rgba_image);
53 
54  static constexpr int8_t pixel_offset[64] = {
55  0, 6, 12, 18, 0, 6, 12, 18, 0, 6, 12, 18, 0, 6, 12, 18, 0, 6, 12, 18, 0, 6,
56  12, 18, 0, 6, 12, 18, 0, 6, 12, 18, 0, 6, 12, 18, 0, 6, 12, 18, 0, 6, 12, 18,
57  0, 6, 12, 18, 0, 6, 12, 18, 0, 6, 12, 18, 0, 6, 12, 18, 0, 6, 12, 18};
58 
66  static std::vector<std::string> getScanFilenames(const std::string& dir);
67 };
68 
69 } // namespace se
70 
71 #endif
Reader for the Newer College dataset.
Definition: reader_newercollege.hpp:28
Definition: reader_base.hpp:46
Base abstract class for dataset readers.
Definition: reader_base.hpp:139
ReaderStatus
The result of trying to read a depth/RGB image or a pose.
Definition: reader_base.hpp:105
std::string name() const
The name of the reader.
NewerCollegeReader(const ReaderConfig &c)
Construct an NewerCollegeReader from a ReaderConfig.
void restart()
Restart reading from the beginning.
Helper wrapper to allocate and de-allocate octants in the octree.
Definition: colour_utils.hpp:17