include
lvr2
io
yaml
ScanProject.hpp
Go to the documentation of this file.
1
2
#ifndef LVR2_IO_YAML_SCANPROJECTMETA_IO_HPP
3
#define LVR2_IO_YAML_SCANPROJECTMETA_IO_HPP
4
5
#include <yaml-cpp/yaml.h>
6
#include "
lvr2/types/ScanTypes.hpp
"
7
#include "
lvr2/io/Timestamp.hpp
"
8
9
#include "
MatrixIO.hpp
"
10
11
namespace
YAML
{
12
19
// WRITE SCAN PARTIALLY
20
template
<>
21
struct
convert
<
lvr2
::ScanProject>
22
{
23
27
static
Node
encode
(
const
lvr2::ScanProject
& scanProj) {
28
Node node;
29
30
node[
"sensor_type"
] =
lvr2::ScanProject::sensorType
;
31
32
return
node;
33
}
34
35
static
bool
decode
(
const
Node& node,
lvr2::ScanProject
& scanProj)
36
{
37
try
38
{
39
if
(node[
"sensor_type"
].as<std::string>() !=
lvr2::ScanProject::sensorType
)
40
{
41
return
false
;
42
}
43
}
44
catch
(YAML::BadSubscript& e)
45
{
46
std::cout << e.what() << std::endl;
47
return
false
;
48
}
49
50
return
true
;
51
}
52
53
};
54
55
}
// namespace YAML
56
57
#endif // LVR2_IO_YAML_SCANPROJECTMETA_IO_HPP
58
YAML
Definition:
LSROptionsYamlExtensions.hpp:42
ScanTypes.hpp
lvr2::convert
void convert(COORD_SYSTEM from, COORD_SYSTEM to, float *point)
Definition:
CoordinateTransform.cpp:46
lvr2::ScanProject
Definition:
ScanTypes.hpp:322
YAML::convert< lvr2::ScanProject >::decode
static bool decode(const Node &node, lvr2::ScanProject &scanProj)
Definition:
ScanProject.hpp:35
MatrixIO.hpp
lvr2
Definition:
BaseBufferManipulators.hpp:39
Timestamp.hpp
YAML::convert< lvr2::ScanProject >::encode
static Node encode(const lvr2::ScanProject &scanProj)
Definition:
ScanProject.hpp:27
lvr2::ScanProject::sensorType
static constexpr char sensorType[]
Type of used laser scanner.
Definition:
ScanTypes.hpp:333
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