HyperspectralPanoramaChannel.hpp
Go to the documentation of this file.
1 
2 #ifndef LVR2_IO_YAML_HYPERSPECTRALPANORAMACHANNELMETA_IO_HPP
3 #define LVR2_IO_YAML_HYPERSPECTRALPANORAMACHANNELMETA_IO_HPP
4 
5 #include "MatrixIO.hpp"
7 
8 #include <yaml-cpp/yaml.h>
9 
10 namespace YAML
11 {
12 
19 // WRITE HYPERSPECTRALCAMERA PARTIALLY
20 template <>
21 struct convert<lvr2::HyperspectralPanoramaChannel>
22 {
23 
27  static Node encode(const lvr2::HyperspectralPanoramaChannel& channel)
28  {
29  Node node;
30 
32 
33  node["timestamp"] = channel.timestamp;
34 
35  return node;
36  }
37 
38  static bool decode(const Node& node, lvr2::HyperspectralPanoramaChannel& channel)
39  {
40 
41  if (node["sensor_type"].as<std::string>() != lvr2::HyperspectralPanoramaChannel::sensorType)
42  {
43  return false;
44  }
45 
46  channel.timestamp = node["timestamp"].as<double>();
47 
48  return true;
49  }
50 };
51 
52 } // namespace YAML
53 
54 #endif // LVR2_IO_YAML_HYPERSPECTRALPANORAMACHANNELMETA_IO_HPP
lvr2::HyperspectralPanoramaChannel::timestamp
double timestamp
Timestamp.
Definition: ScanTypes.hpp:172
YAML
Definition: LSROptionsYamlExtensions.hpp:42
ScanTypes.hpp
lvr2::HyperspectralPanoramaChannel
Definition: ScanTypes.hpp:162
lvr2::convert
void convert(COORD_SYSTEM from, COORD_SYSTEM to, float *point)
Definition: CoordinateTransform.cpp:46
MatrixIO.hpp
lvr2
Definition: BaseBufferManipulators.hpp:39
YAML::convert< lvr2::HyperspectralPanoramaChannel >::encode
static Node encode(const lvr2::HyperspectralPanoramaChannel &channel)
Definition: HyperspectralPanoramaChannel.hpp:27
lvr2::HyperspectralPanoramaChannel::sensorType
static constexpr char sensorType[]
Sensor type flag.
Definition: ScanTypes.hpp:169
YAML::convert< lvr2::HyperspectralPanoramaChannel >::decode
static bool decode(const Node &node, lvr2::HyperspectralPanoramaChannel &channel)
Definition: HyperspectralPanoramaChannel.hpp:38


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:23