13#include <peak_common_c/detail/peak_common_defines.h>
21#include <peak_icv_c/types/peak_icv_point_cloud.h>
118 friend peak::common::detail::BackendAccessor<PointCloudXYZI>;
119#ifndef DOXYGEN_SHOULD_SKIP_THIS
123 static peak_icv_point_cloud_handle CreatePointCloudHandle(
const XYZImage& xyzImage,
const Image& intensityImage);
126 static peak_icv_point_cloud_handle CreateFromPoints(
130inline PointCloudXYZI::PointCloudXYZI(
const XYZImage& xyzImage,
const Image& intensityImage)
146inline peak_icv_point_cloud_handle PointCloudXYZI::CreatePointCloudHandle(
const XYZImage& xyzImage,
const Image& intensityImage)
148 auto*
const xyzImageHandle = peak::common::detail::BackendAccessor<Image>::BackendHandle(xyzImage);
149 auto*
const intensityImageHandle = peak::common::detail::BackendAccessor<Image>::BackendHandle(intensityImage);
151 peak_icv_point_cloud_handle handle{};
153 return PEAK_ICV_C_ABI_PREFIX peak_icv_PointCloud_CreateFromXYZImageAndIntensityImage(
154 &handle, xyzImageHandle, intensityImageHandle);
161 switch (pixelFormatName)
164 return PEAK_ICV_POINT_TYPE_XYZ_I8;
166 return PEAK_ICV_POINT_TYPE_XYZ_I10;
168 return PEAK_ICV_POINT_TYPE_XYZ_I12;
174inline peak_icv_point_cloud_handle PointCloudXYZI::LoadFromFile(
177 peak_icv_point_cloud_handle handle{};
181 return PEAK_ICV_C_ABI_PREFIX peak_icv_PointCloud_CreateFromFile(
182 &handle, PointTypeFromPixelFormat(pixelFormatName), filePath.c_str());
187inline peak_icv_point_cloud_handle PointCloudXYZI::CreateFromPoints(
190 std::vector<peak_icv_point_xyzi> pointsC{};
191 pointsC.reserve(points.size());
193 std::transform(points.begin(), points.end(), std::back_inserter(pointsC), [](
const PointXYZI& point) -> peak_icv_point_xyzi {
194 return { point.GetX(), point.GetY(), point.GetZ(), point.GetIntensity() };
197 peak_icv_point_cloud_handle pointCloudHandle{};
199 return PEAK_ICV_C_ABI_PREFIX peak_icv_PointCloud_CreateFromPoints(
200 &pointCloudHandle, pointsC.data(), pointsC.size(), PointTypeFromPixelFormat(pixelFormatName));
202 return pointCloudHandle;
For detailed information about the use of ids_peak_icv Image refer to the Image Guide.
Occurs when a requested operation is not implemented or supported (e.g., exporting to an unsupported ...
Represents a point cloud consisting of points with x, y, z coordinates and an intensity value.
A point consists of x, y, z coordinates and intensity meta data.
Represents an image that has undergone undistortion.
Represents a three-channel image encoding cartesian coordinates (x, y, z) of a 3D point.
Represents a generic point cloud interface for spatial data types.
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)