35 #ifndef LVR2_LSR_OPTIONS_YAML_EXTENSIONS
36 #define LVR2_LSR_OPTIONS_YAML_EXTENSIONS
38 #include <yaml-cpp/yaml.h>
51 node[
"bigMesh"] =
options.bigMesh;
52 node[
"debugChunks"] =
options.debugChunks;
53 node[
"useGPU"] =
options.useGPU;
54 node[
"voxelSizes"] =
options.voxelSizes;
55 node[
"bgVoxelSize"] =
options.bgVoxelSize;
57 node[
"nodeSize"] =
options.nodeSize;
58 node[
"partMethod"] =
options.partMethod;
62 node[
"flipPoint"] =
options.flipPoint;
63 node[
"useRansac"] =
options.useRansac;
64 node[
"extrude"] =
options.extrude;
65 node[
"removeDanglingArtifacts"] =
options.removeDanglingArtifacts;
66 node[
"cleanContours"] =
options.cleanContours;
67 node[
"fillHoles"] =
options.fillHoles;
68 node[
"optimizePlanes"] =
options.optimizePlanes;
69 node[
"planeNormalThreshold"] =
options.planeNormalThreshold;
70 node[
"planeIterations"] =
options.planeIterations;
71 node[
"minPlaneSize"] =
options.minPlaneSize;
72 node[
"smallRegionThreshold"] =
options.smallRegionThreshold;
73 node[
"retesselate"] =
options.retesselate;
74 node[
"lineFusionThreshold"] =
options.lineFusionThreshold;
88 options.bigMesh = node[
"bigMesh"].as<
bool>();
91 if (node[
"debugChunks"])
93 options.debugChunks = node[
"debugChunks"].as<
bool>();
98 options.useGPU = node[
"useGPU"].as<
bool>();
101 if (node[
"voxelSizes"])
103 options.voxelSizes = node[
"voxelSizes"].as<std::vector<float>>();
106 if (node[
"bgVoxelSize"])
108 options.bgVoxelSize = node[
"bgVoxelSize"].as<
float>();
113 options.scale = node[
"scale"].as<
float>();
116 if (node[
"nodeSize"])
121 if (node[
"partMethod"])
123 options.partMethod = node[
"partMethod"].as<
int>();
128 options.ki = node[
"ki"].as<
int>();
133 options.kd = node[
"kd"].as<
int>();
138 options.kn = node[
"kn"].as<
int>();
141 if (node[
"useRansac"])
143 options.useRansac = node[
"useRansac"].as<
bool>();
146 if (node[
"flipPoint"])
148 options.flipPoint = node[
"flipPoint"].as<std::vector<float>>();
153 options.extrude = node[
"extrude"].as<
bool>();
156 if (node[
"removeDanglingArtifacts"])
158 options.removeDanglingArtifacts = node[
"removeDanglingArtifacts"].as<
int>();
161 if (node[
"cleanContours"])
163 options.cleanContours = node[
"cleanContours"].as<
int>();
166 if (node[
"fillHoles"])
168 options.fillHoles = node[
"fillHoles"].as<
int>();
171 if (node[
"optimizePlanes"])
173 options.optimizePlanes = node[
"optimizePlanes"].as<
bool>();
176 if (node[
"planeNormalThreshold"])
178 options.planeNormalThreshold = node[
"planeNormalThreshold"].as<
float>();
181 if (node[
"planeIterations"])
183 options.planeIterations = node[
"planeIterations"].as<
int>();
186 if (node[
"minPlaneSize"])
188 options.minPlaneSize = node[
"minPlaneSize"].as<
int>();
191 if (node[
"smallRegionThreshold"])
193 options.smallRegionThreshold = node[
"smallRegionThreshold"].as<
int>();
196 if (node[
"retesselate"])
198 options.retesselate = node[
"retesselate"].as<
bool>();
201 if (node[
"lineFusionThreshold"])
203 options.lineFusionThreshold = node[
"lineFusionThreshold"].as<
float>();