ScanProjectSchema.hpp
Go to the documentation of this file.
1 #ifndef SCANPROJECTPARSER_HPP_
2 #define SCANPROJECTPARSER_HPP_
3 
4 #include <string>
5 #include <tuple>
6 
7 #include <boost/optional.hpp>
8 
9 #include <yaml-cpp/yaml.h>
10 namespace lvr2
11 {
12 
13 using StringOptional = boost::optional<std::string>;
14 using NodeOptional = boost::optional<YAML::Node>;
15 
17 {
22 };
23 
24 std::pair<std::string, std::string> getNames(
25  const std::string& defaultGroup,
26  const std::string& defaultContainer,
27  const Description& d);
28 
30 {
31 public:
33 
34  ~ScanProjectSchema() = default;
35 
36  virtual Description scanProject() const = 0;
37  virtual Description position(const size_t& scanPosNo) const = 0;
38  virtual Description scan(const size_t& scanPosNo, const size_t& scanNo) const = 0;
39  virtual Description scan(const std::string& scanPositionPath, const size_t& scanNo) const = 0;
40 
41  virtual Description scanCamera(const size_t& scanPositionNo, const size_t& camNo) const = 0;
42  virtual Description scanCamera(const std::string& scanPositionPath, const size_t& camNo) const = 0;
43 
44  virtual Description scanImage(
45  const size_t& scanPosNo, const size_t& scanNo,
46  const size_t& scanCameraNo, const size_t& scanImageNo) const = 0;
47 
48  virtual Description scanImage(
49  const std::string& scanImagePath, const size_t& scanImageNo) const = 0;
50 
51  virtual Description hyperspectralCamera(const size_t& position) const
52  {
54  return Description();
55  }
56 
57  virtual Description hyperSpectralTimestamps(const std::string& group) const
58  {
59  Description d;
60  // Timestamps should be in the same group as the
61  d.groupName = group;
62  d.dataSetName = "timestamps";
63  d.metaData = boost::none;
64  }
65 
66  virtual Description hyperSpectralFrames(const std::string& group) const
67  {
68  Description d;
69  // Timestamps should be in the same group as the
70  d.groupName = group;
71  d.dataSetName = "frames";
72  d.metaData = boost::none;
73  }
74 protected:
75 
76 };
77 
80 {
81 public:
83 };
84 
87 {
88 public:
90 };
91 
92 using ScanProjectSchemaPtr = std::shared_ptr<ScanProjectSchema>;
93 using DirectorySchemaPtr = std::shared_ptr<DirectorySchema>;
94 using HDF5SchemaPtr = std::shared_ptr<HDF5Schema>;
95 
96 } // namespace lvr2
97 
98 #endif
lvr2::Description::dataSetName
StringOptional dataSetName
Definition: ScanProjectSchema.hpp:19
lvr2::ScanProjectSchema::scanCamera
virtual Description scanCamera(const size_t &scanPositionNo, const size_t &camNo) const =0
lvr2::ScanProjectSchema::hyperspectralCamera
virtual Description hyperspectralCamera(const size_t &position) const
Definition: ScanProjectSchema.hpp:51
lvr2::getNames
std::pair< std::string, std::string > getNames(const std::string &defaultGroup, const std::string &defaultContainer, const Description &d)
Definition: ScanProjectSchema.cpp:6
lvr2::DirectorySchema::DirectorySchema
DirectorySchema()
Definition: ScanProjectSchema.hpp:89
lvr2::HDF5Schema
Marker interface for HDF5 schemas.
Definition: ScanProjectSchema.hpp:79
lvr2::ScanProjectSchema::scan
virtual Description scan(const size_t &scanPosNo, const size_t &scanNo) const =0
lvr2::ScanProjectSchema::position
virtual Description position(const size_t &scanPosNo) const =0
lvr2::HDF5SchemaPtr
std::shared_ptr< HDF5Schema > HDF5SchemaPtr
Definition: ScanProjectSchema.hpp:94
lvr2::ScanProjectSchema
Definition: ScanProjectSchema.hpp:29
lvr2::ScanProjectSchema::ScanProjectSchema
ScanProjectSchema()
Definition: ScanProjectSchema.hpp:32
lvr2::ScanProjectSchema::hyperSpectralFrames
virtual Description hyperSpectralFrames(const std::string &group) const
Definition: ScanProjectSchema.hpp:66
lvr2::DirectorySchemaPtr
std::shared_ptr< DirectorySchema > DirectorySchemaPtr
Definition: ScanProjectSchema.hpp:93
lvr2::ScanProjectSchema::~ScanProjectSchema
~ScanProjectSchema()=default
lvr2::ScanProjectSchema::hyperSpectralTimestamps
virtual Description hyperSpectralTimestamps(const std::string &group) const
Definition: ScanProjectSchema.hpp:57
lvr2::ScanProjectSchema::scanProject
virtual Description scanProject() const =0
lvr2::HDF5Schema::HDF5Schema
HDF5Schema()
Definition: ScanProjectSchema.hpp:82
lvr2::ScanProjectSchema::scanImage
virtual Description scanImage(const size_t &scanPosNo, const size_t &scanNo, const size_t &scanCameraNo, const size_t &scanImageNo) const =0
lvr2::Description::groupName
StringOptional groupName
Definition: ScanProjectSchema.hpp:18
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::StringOptional
boost::optional< std::string > StringOptional
Definition: ScanProjectSchema.hpp:13
lvr2::NodeOptional
boost::optional< YAML::Node > NodeOptional
Definition: ScanProjectSchema.hpp:14
lvr2::DirectorySchema
Marker interface for directory schemas.
Definition: ScanProjectSchema.hpp:86
lvr2::Description
Definition: ScanProjectSchema.hpp:16
lvr2::Description::metaData
NodeOptional metaData
Definition: ScanProjectSchema.hpp:21
lvr2::ScanProjectSchemaPtr
std::shared_ptr< ScanProjectSchema > ScanProjectSchemaPtr
Definition: ScanProjectSchema.hpp:92
lvr2::Description::metaName
StringOptional metaName
Definition: ScanProjectSchema.hpp:20


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 Wed Mar 2 2022 00:37:25