21#include <peak_icv_c/types/peak_icv_point_cloud.h>
102 friend peak::common::detail::BackendAccessor<PointCloudXYZI>;
103#ifndef DOXYGEN_SHOULD_SKIP_THIS
107 static peak_icv_point_cloud_handle CreatePointCloudHandle(
const XYZImage& xyzImage,
const Image& intensityImage);
110 static peak_icv_point_cloud_handle CreateFromPoints(
114inline PointCloudXYZI::PointCloudXYZI(
const XYZImage& xyzImage,
const Image& intensityImage)
130inline peak_icv_point_cloud_handle PointCloudXYZI::CreatePointCloudHandle(
const XYZImage& xyzImage,
const Image& intensityImage)
132 auto*
const xyzImageHandle = peak::common::detail::BackendAccessor<Image>::BackendHandle(xyzImage);
133 auto*
const intensityImageHandle = peak::common::detail::BackendAccessor<Image>::BackendHandle(intensityImage);
135 peak_icv_point_cloud_handle handle{};
137 return PEAK_ICV_C_ABI_PREFIX peak_icv_PointCloud_CreateFromXYZImageAndIntensityImage(
138 &handle, xyzImageHandle, intensityImageHandle);
145 switch (pixelFormatName)
148 return PEAK_ICV_POINT_TYPE_XYZ_I8;
150 return PEAK_ICV_POINT_TYPE_XYZ_I10;
152 return PEAK_ICV_POINT_TYPE_XYZ_I12;
158inline peak_icv_point_cloud_handle PointCloudXYZI::LoadFromFile(
161 peak_icv_point_cloud_handle handle{};
165 return PEAK_ICV_C_ABI_PREFIX peak_icv_PointCloud_CreateFromFile(
166 &handle, PointTypeFromPixelFormat(pixelFormatName), filePath.c_str());
171inline peak_icv_point_cloud_handle PointCloudXYZI::CreateFromPoints(
174 std::vector<peak_icv_point_xyzi> pointsC{};
175 pointsC.reserve(points.size());
177 std::transform(points.begin(), points.end(), std::back_inserter(pointsC), [](
const PointXYZI& point) -> peak_icv_point_xyzi {
178 return { point.GetX(), point.GetY(), point.GetZ(), point.GetIntensity() };
181 peak_icv_point_cloud_handle pointCloudHandle{};
183 return PEAK_ICV_C_ABI_PREFIX peak_icv_PointCloud_CreateFromPoints(
184 &pointCloudHandle, pointsC.data(), pointsC.size(), PointTypeFromPixelFormat(pixelFormatName));
186 return pointCloudHandle;
For detailed information about the use of ids_peak_icv Image refer to the Image Guide.
Thrown when a requested operation is not implemented or supported.
A point cloud base class.
A point cloud consists of points with x, y, z coordinates and intensity meta data.
A point consists of x, y, z coordinates and intensity meta data.
Transforms an undistorted depth map with radial coordinates to a three-channel image with cartesian c...
PixelFormat
Enum listing all supported pixel formats and their internal IDs.
@ Mono12
Mono 12-Bit pixel format.
@ Mono10
Mono 10-Bit pixel format.
@ Mono8
Mono 8-Bit pixel format.
void ExecuteAndMapReturnCodes(const CallableType &callableObject)