13#include <peak_common_c/detail/peak_common_defines.h>
23#include <peak_icv_c/types/peak_icv_point_cloud.h>
106#ifndef DOXYGEN_SHOULD_SKIP_THIS
110 friend peak::common::detail::BackendAccessor<PointCloudXYZ>;
112 static peak_icv_point_cloud_handle CreatePointCloudHandle(
const XYZImage& image);
113 static peak_icv_point_cloud_handle LoadFromFile(
const std::string& filePath);
114 static peak_icv_point_cloud_handle CreateFromPoints(
const std::vector<PointXYZ>& points);
117inline PointCloudXYZ::PointCloudXYZ(
const XYZImage& image)
125inline PointCloudXYZ::PointCloudXYZ(
const std::string& filePath)
129inline PointCloudXYZ::PointCloudXYZ(
const std::vector<PointXYZ>& points)
133inline peak_icv_point_cloud_handle PointCloudXYZ::CreatePointCloudHandle(
const XYZImage& image)
135 auto*
const imageHandle = peak::common::detail::BackendAccessor<Image>::BackendHandle(image);
137 peak_icv_point_cloud_handle pointCloudHandle{};
139 return PEAK_ICV_C_ABI_PREFIX peak_icv_PointCloud_CreateFromXYZImage(&pointCloudHandle, imageHandle);
141 return pointCloudHandle;
144inline peak_icv_point_cloud_handle PointCloudXYZ::LoadFromFile(
const std::string& filePath)
146 peak_icv_point_cloud_handle handle{};
148 return PEAK_ICV_C_ABI_PREFIX peak_icv_PointCloud_CreateFromFile(&handle, PEAK_ICV_POINT_TYPE_XYZ, filePath.c_str());
153inline peak_icv_point_cloud_handle PointCloudXYZ::CreateFromPoints(
const std::vector<PointXYZ>& points)
155 std::vector<peak_icv_point_xyz> pointsC(points.size());
157 std::transform(points.begin(), points.end(), pointsC.begin(), [](
const PointXYZ& point) -> peak_icv_point_xyz {
158 return { point.GetX(), point.GetY(), point.GetZ(), {} };
161 peak_icv_point_cloud_handle pointCloudHandle{};
163 return PEAK_ICV_C_ABI_PREFIX peak_icv_PointCloud_CreateFromPoints(
164 &pointCloudHandle, pointsC.data(), pointsC.size(), PEAK_ICV_POINT_TYPE_XYZ);
166 return pointCloudHandle;
Represents a point cloud consisting of points with x, y, and z coordinates.
A point consists of x, y and z coordinate.
Represents an image that has undergone undistortion.
Represents a three-channel image with Cartesian coordinates derived from an undistorted depth map.
Represents a generic point cloud interface for spatial data types.
void ExecuteAndMapReturnCodes(const CallableType &callableObject)