46#include <pcl/point_cloud.h>
47#include <pcl/PointIndices.h>
49#include <pcl/PolygonMesh.h>
76 template <
typename Po
intT>
inline int
78 std::vector<pcl::PCLPointField> &fields);
85 template <
typename Po
intT>
inline int
87 const std::vector<pcl::PCLPointField> &fields);
93 template <
typename Po
intT>
inline std::vector<pcl::PCLPointField>
100 template <
typename Po
intT>
inline std::string
110 return std::accumulate(std::next (cloud.
fields.begin ()), cloud.
fields.end (), cloud.
fields[0].name,
111 [](
const auto&
acc,
const auto&
field) { return acc +
" " + field.name; });
160 type = std::toupper (type, std::locale::classic ());
246 template <
typename Po
intT>
265 PCL_EXPORTS
inline bool
280 PCL_EXPORTS
inline bool
322 template <
typename Po
int1T,
typename Po
int2T>
inline bool
335 template <
typename Po
intT,
typename IndicesVectorAllocator = std::allocator<index_t>>
void
337 const IndicesAllocator< IndicesVectorAllocator> &indices,
347 template <
typename Po
intT>
void
349 const PointIndices &indices,
359 template <
typename Po
intT>
void
361 const std::vector<pcl::PointIndices> &indices,
369 template <
typename Po
intInT,
typename Po
intOutT>
void
380 template <
typename Po
intInT,
typename Po
intOutT,
typename IndicesVectorAllocator = std::allocator<index_t>>
void
382 const IndicesAllocator<IndicesVectorAllocator> &indices,
392 template <
typename Po
intInT,
typename Po
intOutT>
void
394 const PointIndices &indices,
404 template <
typename Po
intInT,
typename Po
intOutT>
void
406 const std::vector<pcl::PointIndices> &indices,
428 template <
typename Po
intT>
void
431 int top,
int bottom,
int left,
int right,
445 template <
typename Po
intIn1T,
typename Po
intIn2T,
typename Po
intOutT>
void
489 template <std::
size_t N>
void
495 template <>
inline void
502 template <>
inline void
508 template <>
inline void
518 template <>
inline void
530 template <
typename T>
void
533 pcl::io::swapByte<sizeof(T)> (
reinterpret_cast<char*
> (&value));
538#include <pcl/common/impl/io.hpp>
Iterator class for point clouds with or without given indices.
static bool concatenate(pcl::PointCloud< PointT > &cloud1, const pcl::PointCloud< PointT > &cloud2)
void swapByte(char *bytes)
swap bytes order of a char array of length N
PCL_EXPORTS bool getPointCloudAsEigen(const pcl::PCLPointCloud2 &in, Eigen::MatrixXf &out)
Copy the XYZ dimensions of a pcl::PCLPointCloud2 into Eigen format.
PCL_EXPORTS bool getEigenAsPointCloud(Eigen::MatrixXf &in, pcl::PCLPointCloud2 &out)
Copy the XYZ dimensions from an Eigen MatrixXf into a pcl::PCLPointCloud2 message.
int getFieldSize(const int datatype)
Obtains the size of a specific field data type in bytes.
std::string getFieldsList(const pcl::PointCloud< PointT > &)
Get the list of all fields available in a given cloud.
int getFieldType(const int size, char type)
Obtains the type of the PCLPointField from a specific size and type.
void concatenateFields(const pcl::PointCloud< PointIn1T > &cloud1_in, const pcl::PointCloud< PointIn2T > &cloud2_in, pcl::PointCloud< PointOutT > &cloud_out)
Concatenate two datasets representing different fields.
std::vector< pcl::PCLPointField > getFields()
Get the list of available fields (i.e., dimension/channel)
PCL_EXPORTS bool concatenate(const pcl::PointCloud< PointT > &cloud1, const pcl::PointCloud< PointT > &cloud2, pcl::PointCloud< PointT > &cloud_out)
Concatenate two pcl::PointCloud<PointT>
void copyPointCloud(const pcl::PointCloud< PointInT > &cloud_in, pcl::PointCloud< PointOutT > &cloud_out)
Copy all the fields from a given point cloud into a new point cloud.
void swapByte< 1 >(char *bytes)
specialization of swapByte for dimension 1
void swapByte< 4 >(char *bytes)
specialization of swapByte for dimension 4
void swapByte< 2 >(char *bytes)
specialization of swapByte for dimension 2
void swapByte< 8 >(char *bytes)
specialization of swapByte for dimension 8
int getFieldIndex(const pcl::PointCloud< PointT > &, const std::string &field_name, std::vector< pcl::PCLPointField > &fields)
std::vector< index_t, Allocator > IndicesAllocator
Type used for indices in PCL.
PCL_EXPORTS int interpolatePointIndex(int p, int length, InterpolationType type)
IndicesAllocator<> Indices
Type used for indices in PCL.
bool isSamePointType()
Check if two given point types are the same or not.
PCL_EXPORTS void getFieldsSizes(const std::vector< pcl::PCLPointField > &fields, std::vector< int > &field_sizes)
Obtain a vector with the sizes of all valid fields (e.g., not "_")
Defines all the PCL and non-PCL macros used.
std::vector<::pcl::PCLPointField > fields
static bool concatenate(pcl::PCLPointCloud2 &cloud1, const pcl::PCLPointCloud2 &cloud2)
Inplace concatenate two pcl::PCLPointCloud2.
A point structure representing Euclidean xyz coordinates, and the RGB color.
static bool concatenate(pcl::PolygonMesh &mesh1, const pcl::PolygonMesh &mesh2)
Inplace concatenate two pcl::PolygonMesh.