MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / writeParameters

Method writeParameters

io/src/lzf_image_io.cpp:201–221  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

199
200//////////////////////////////////////////////////////////////////////////////
201bool
202pcl::io::LZFDepth16ImageWriter::writeParameters (const pcl::io::CameraParameters &parameters,
203 const std::string &filename)
204{
205 boost::property_tree::ptree pt;
206 try
207 {
208 boost::property_tree::xml_parser::read_xml (filename, pt, boost::property_tree::xml_parser::trim_whitespace);
209 }
210 catch (std::exception&)
211 {}
212
213 pt.put ("depth.focal_length_x", parameters.focal_length_x);
214 pt.put ("depth.focal_length_y", parameters.focal_length_y);
215 pt.put ("depth.principal_point_x", parameters.principal_point_x);
216 pt.put ("depth.principal_point_y", parameters.principal_point_y);
217 pt.put ("depth.z_multiplication_factor", z_multiplication_factor_);
218 write_xml (filename, pt, std::locale (), xml_writer_settings ('\t', 1));
219
220 return (true);
221}
222
223//////////////////////////////////////////////////////////////////////////////
224bool

Callers 1

writeToDiskMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected