429 template<
typename DataFormat>
433 HasCopyDataImplReturnArray2DTag<DataFormat>::value,
434 "The provided DataFormat is unsupported. Please refer to the documentation for "
435 "this method for the supported DataFormats.");
436 return copyDataImpl(ReturnArray2DTag<DataFormat>{});
525 template<
typename DataFormat>
529 HasCopyDataImpl<DataFormat *>::value,
530 "The provided DataFormat is unsupported. Please refer to the documentation for "
531 "this method for the supported data formats.");
532 return copyDataImpl(destination);
617 struct ReturnArray2DTag
620 template<
typename... Args>
621 class HasCopyDataImplReturnArray2DTag
625 typename =
decltype(std::declval<C>().copyDataImpl(std::declval<ReturnArray2DTag<Args>>()...))>
626 static std::true_type test(
int);
628 static std::false_type test(...);
631 static constexpr bool value =
decltype(test<PointCloud>(0))::value;
634 template<
typename... Args>
635 class HasCopyDataImpl
637 template<typename C, typename = decltype(std::declval<C>().copyDataImpl(std::declval<Args>()...))>
638 static std::true_type test(
int);
640 static std::false_type test(...);
643 static constexpr bool value =
decltype(test<PointCloud>(0))::value;
646 ZIVID_CORE_EXPORT Array2D<PointXYZ> copyDataImpl(ReturnArray2DTag<PointXYZ> )
const;
647 ZIVID_CORE_EXPORT Array2D<PointXYZW> copyDataImpl(ReturnArray2DTag<PointXYZW> )
const;
649 ZIVID_CORE_EXPORT Array2D<ColorRGBA> copyDataImpl(ReturnArray2DTag<ColorRGBA> )
const;
650 ZIVID_CORE_EXPORT Array2D<ColorBGRA> copyDataImpl(ReturnArray2DTag<ColorBGRA> )
const;
651 ZIVID_CORE_EXPORT Array2D<ColorRGBA_SRGB> copyDataImpl(ReturnArray2DTag<ColorRGBA_SRGB> )
const;
652 ZIVID_CORE_EXPORT Array2D<ColorBGRA_SRGB> copyDataImpl(ReturnArray2DTag<ColorBGRA_SRGB> )
const;
653 ZIVID_CORE_EXPORT Array2D<PointXYZColorRGBA> copyDataImpl(ReturnArray2DTag<PointXYZColorRGBA> )
const;
655 ReturnArray2DTag<PointXYZColorRGBA_SRGB> )
const;
656 ZIVID_CORE_EXPORT Array2D<PointXYZColorBGRA> copyDataImpl(ReturnArray2DTag<PointXYZColorBGRA> )
const;
658 ReturnArray2DTag<PointXYZColorBGRA_SRGB> )
const;
660 ZIVID_CORE_EXPORT Array2D<NormalXYZ> copyDataImpl(ReturnArray2DTag<NormalXYZ> )
const;
676 std::shared_ptr<class PointCloudImpl> m_impl;
#define ZIVID_CORE_EXPORT
Definition CoreExport.h:56
Two-dimensional container of data.
Definition Array2D.h:83
A 2-dimensional image.
Definition Image.h:89
Point cloud with x, y, z, RGB color and SNR laid out on a 2D grid.
Definition PointCloud.h:81
ZIVID_CORE_EXPORT Image< ColorBGRA_SRGB > copyImageBGRA_SRGB() const
Get point cloud colors as 8-bit BGRA image in the sRGB color space.
ZIVID_CORE_EXPORT Array2D< PointXYZW > copyPointsXYZW() const
Array2D of point coordinates in 4D.
ZIVID_CORE_EXPORT Array2D< PointXYZColorRGBA_SRGB > copyPointsXYZColorsRGBA_SRGB() const
Array2D of PointXYZColorRGBA_SRGB.
ZIVID_CORE_EXPORT PointCloud clone() const
Returns a clone of the point cloud. The clone will include a copy of all of the point cloud data on t...
ZIVID_CORE_EXPORT PointCloud & downsample(Downsampling downsampling)
Downsample the point cloud in-place.
ZIVID_CORE_EXPORT Image< ColorRGBA > copyImageRGBA() const
Get point cloud colors as 8-bit RGBA image.
void copyData(DataFormat *destination) const
Copy data in the specified DataFormat to a destination buffer.
Definition PointCloud.h:526
ZIVID_CORE_EXPORT Array2D< SNR > copySNRs() const
Array2D of SNR values.
ZIVID_CORE_EXPORT PointCloud & transform(const Zivid::Matrix4x4 &matrix)
Transform the point cloud in-place by the given 4x4 transformation matrix.
Downsampling
Option for downsampling.
Definition PointCloud.h:90
ZIVID_CORE_EXPORT Array2D< ColorRGBA > copyColorsRGBA() const
Array2D of point colors in 8-bit RGBA format.
ZIVID_CORE_EXPORT size_t size() const
Get the size of the point cloud (total number of points)
ZIVID_CORE_EXPORT Array2D< ColorBGRA_SRGB > copyColorsBGRA_SRGB() const
Array2D of point colors in 8-bit BGRA format in the sRGB color space.
ZIVID_CORE_EXPORT Array2D< PointXYZColorRGBA > copyPointsXYZColorsRGBA() const
Array2D of PointXYZColorRGBA.
ZIVID_CORE_EXPORT Array2D< ColorRGBA_SRGB > copyColorsSRGB() const
Array2D of point colors in 8-bit RGBA format in the sRGB color space.
ZIVID_CORE_EXPORT Image< ColorRGBA_SRGB > copyImageRGBA_SRGB() const
Get point cloud colors as 8-bit RGBA image in the sRGB color space.
ZIVID_CORE_EXPORT std::string toString() const
Get string representation of the point cloud.
Array2D< DataFormat > copyData() const
Array2D with point cloud data using specified DataFormat.
Definition PointCloud.h:430
ZIVID_CORE_EXPORT PointCloud()
Create an empty point cloud.
ZIVID_CORE_EXPORT Array2D< NormalXYZ > copyNormalsXYZ() const
Array2D of NormalXYZ.
ZIVID_CORE_EXPORT Array2D< ColorRGBA_SRGB > copyColorsRGBA_SRGB() const
Array2D of point colors in 8-bit RGBA format in the sRGB color space.
ZIVID_CORE_EXPORT size_t width() const
Get the width of the point cloud (number of columns)
ZIVID_CORE_EXPORT Array2D< PointXYZ > copyPointsXYZ() const
Array2D of point coordinates.
ZIVID_CORE_EXPORT Array2D< PointXYZColorBGRA > copyPointsXYZColorsBGRA() const
Array2D of PointXYZColorBGRA.
ZIVID_CORE_EXPORT Image< ColorRGBA_SRGB > copyImageSRGB() const
Get point cloud colors as 8-bit RGBA image in the sRGB color space.
ZIVID_CORE_EXPORT Array2D< PointZ > copyPointsZ() const
Array2D of Z coordinates.
ZIVID_CORE_EXPORT PointCloud downsampled(Downsampling downsampling) const
Get a downsampled point cloud.
ZIVID_CORE_EXPORT bool isEmpty() const
Check if the point cloud is empty (contains zero points)
ZIVID_CORE_EXPORT Array2D< PointXYZColorBGRA_SRGB > copyPointsXYZColorsBGRA_SRGB() const
Array2D of PointXYZColorBGRA_SRGB.
ZIVID_CORE_EXPORT Image< ColorBGRA > copyImageBGRA() const
Get point cloud colors as 8-bit BGRA image.
ZIVID_CORE_EXPORT Zivid::Matrix4x4 transformationMatrix() const
Return the current transformation matrix of this point cloud.
ZIVID_CORE_EXPORT size_t height() const
Get the height of the point cloud (number of rows)
ZIVID_CORE_EXPORT Array2D< ColorBGRA > copyColorsBGRA() const
Array2D of point colors in 8-bit BGRA format.
The main Zivid namespace. All Zivid code is found here.
Definition Application.h:84
ColorSRGB ColorRGBA_SRGB
Color with 8-bit red, green, blue and alpha channels in the sRGB color space.
Definition Color.h:79
std::ostream & operator<<(std::ostream &stream, const Array2D< T > &array)
Serialize array information to a stream.
Definition Array2D.h:283