IDS peak ICV v1.0.0
Loading...
Searching...
No Matches
peak_icv_point_cloud_writer.hpp
Go to the documentation of this file.
1
11#pragma once
12
15
16#include <string>
17
18namespace peak
19{
20namespace icv
21{
22
23namespace experimental
24{
25
34{
35public:
55 template <typename PointCloud>
56 void Write(const std::string& filePath, const PointCloud& cloud) const;
57};
58
59template <typename PointCloudType>
60void PointCloudWriter::Write(const std::string& filePath, const PointCloudType& cloud) const
61{
62 static_assert(detail::is_pointcloud_v<PointCloudType>, "Write must be called on PointCloud types!");
63
64 auto pointCloudHandle = peak::common::detail::BackendAccessor<PointCloudType>::BackendHandle(cloud);
66 return PEAK_ICV_C_ABI_PREFIX peak_icv_PointCloud_SaveToFile(pointCloudHandle, filePath.c_str(), {});
67 });
68}
69
70} /* namespace experimental */
71
72} /* namespace icv */
73} /* namespace peak */
Class for writing a point cloud to file, currently supporting only the ply format....
void Write(const std::string &filePath, const PointCloud &cloud) const
Saves a point cloud to a file on the disk.
void ExecuteAndMapReturnCodes(const CallableType &callableObject)