Point Cloud Library (PCL) 1.15.1-dev
Loading...
Searching...
No Matches
io.h
1/*
2 * Software License Agreement (BSD License)
3 *
4 * Point Cloud Library (PCL) - www.pointclouds.org
5 * Copyright (c) 2010-2011, Willow Garage, Inc.
6 * Copyright (c) 2012-, Open Perception, Inc.
7 *
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 *
14 * * Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * * Redistributions in binary form must reproduce the above
17 * copyright notice, this list of conditions and the following
18 * disclaimer in the documentation and/or other materials provided
19 * with the distribution.
20 * * Neither the name of the copyright holder(s) nor the names of its
21 * contributors may be used to endorse or promote products derived
22 * from this software without specific prior written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 *
37 * $Id$
38 *
39 */
40
41#pragma once
42
43#include <numeric>
44#include <string>
45
46#include <pcl/point_cloud.h>
47#include <pcl/PointIndices.h>
48#include <pcl/pcl_macros.h>
49#include <pcl/PolygonMesh.h>
50#include <locale>
51
52namespace pcl
53{
54 /** \brief Get the index of a specified field (i.e., dimension/channel)
55 * \param[in] cloud the point cloud message
56 * \param[in] field_name the string defining the field name
57 * \return the index of the field or a negative integer if no field with the given name exists
58 * \ingroup common
59 */
60 inline int
61 getFieldIndex (const pcl::PCLPointCloud2 &cloud, const std::string &field_name)
62 {
63 // Get the index we need
64 const auto result = std::find_if(cloud.fields.begin (), cloud.fields.end (),
65 [&field_name](const auto field) { return field.name == field_name; });
66 if (result == cloud.fields.end ())
67 return -1;
68 return std::distance(cloud.fields.begin (), result);
69 }
70
71 /** \brief Get the index of a specified field (i.e., dimension/channel)
72 * \tparam PointT datatype for which fields is being queries
73 * \param[in] field_name the string defining the field name
74 * \param[out] fields a vector to the original \a PCLPointField vector that the raw PointCloud message contains
75 * \return the index of the field or a negative integer if no field with the given name exists
76 * \ingroup common
77 */
78 template <typename PointT> inline int
79 getFieldIndex (const std::string &field_name,
80 std::vector<pcl::PCLPointField> &fields);
81 /** \brief Get the index of a specified field (i.e., dimension/channel)
82 * \tparam PointT datatype for which fields is being queries
83 * \param[in] field_name the string defining the field name
84 * \param[in] fields a vector to the original \a PCLPointField vector that the raw PointCloud message contains
85 * \ingroup common
86 */
87 template <typename PointT> inline int
88 getFieldIndex (const std::string &field_name,
89 const std::vector<pcl::PCLPointField> &fields);
90
91 /** \brief Get the list of available fields (i.e., dimension/channel)
92 * \tparam PointT datatype whose details are requested
93 * \ingroup common
94 */
95 template <typename PointT> inline std::vector<pcl::PCLPointField>
96 getFields ();
97
98 /** \brief Get the list of available fields (i.e., dimension/channel) from cloud type,
99 * not point type
100 * \tparam CloudT cloud type, PointCloud or PCLPointCloud2
101 * \param cloud input cloud. Unsused for PointCloud, needed for PCLPointCloud2 because the fields are not available statically
102 * \ingroup common
103 */
104 template <typename CloudT> inline std::vector<pcl::PCLPointField>
105 getFields (const CloudT& cloud) ;
106
107
108 /** \brief Get the list of all fields available in a given cloud
109 * \param[in] cloud the point cloud message
110 * \ingroup common
111 */
112 template <typename PointT> inline std::string
114
115 /** \brief Get the available point cloud fields as a space separated string
116 * \param[in] cloud a pointer to the PointCloud message
117 * \ingroup common
118 */
119 inline std::string
121 {
122 if (cloud.fields.empty())
123 {
124 return "";
125 } else
126 {
127 return std::accumulate(std::next (cloud.fields.begin ()), cloud.fields.end (), cloud.fields[0].name,
128 [](const auto& acc, const auto& field) { return acc + " " + field.name; });
129 }
130 }
131
132 /** \brief Obtains the size of a specific field data type in bytes
133 * \param[in] datatype the field data type (see PCLPointField.h)
134 * \ingroup common
135 */
136 inline int
137 getFieldSize (const int datatype)
138 {
139 switch (datatype)
140 {
142 return sizeof(bool);
143
146 return (1);
147
150 return (2);
151
155 return (4);
156
160 return (8);
161
162 default:
163 return (0);
164 }
165 }
166
167 /** \brief Obtain a vector with the sizes of all valid fields (e.g., not "_")
168 * \param[in] fields the input vector containing the fields
169 * \param[out] field_sizes the resultant field sizes in bytes
170 */
171 PCL_EXPORTS void
172 getFieldsSizes (const std::vector<pcl::PCLPointField> &fields,
173 std::vector<int> &field_sizes);
174
175 /** \brief Obtains the type of the PCLPointField from a specific size and type
176 * \param[in] size the size in bytes of the data field
177 * \param[in] type a char describing the type of the field ('B' = bool, 'F' = float, 'I' = signed, 'U' = unsigned)
178 * \ingroup common
179 */
180 inline int
181 getFieldType (const int size, char type)
182 {
183 type = std::toupper (type, std::locale::classic ());
184
185 // extra logic for bool because its size is undefined
186 if (type == 'B') {
187 if (size == sizeof(bool)) {
189 } else {
190 return -1;
191 }
192 }
193
194 switch (size)
195 {
196 case 1:
197 if (type == 'I')
199 if (type == 'U')
201 break;
202
203 case 2:
204 if (type == 'I')
206 if (type == 'U')
208 break;
209
210 case 4:
211 if (type == 'I')
213 if (type == 'U')
215 if (type == 'F')
217 break;
218
219 case 8:
220 if (type == 'I')
222 if (type == 'U')
224 if (type == 'F')
226 break;
227 }
228 return (-1);
229 }
230
231 /** \brief Obtains the type of the PCLPointField from a specific PCLPointField as a char
232 * \param[in] type the PCLPointField field type
233 * \ingroup common
234 */
235 inline char
236 getFieldType (const int type)
237 {
238 switch (type)
239 {
241 return ('B');
242
247 return ('I');
248
253 return ('U');
254
257 return ('F');
258
259 default:
260 return ('?');
261 }
262 }
263
264 /**
265 * \brief Get the value of a point field from raw data pointer and field type.
266 *
267 * \tparam T return type the field will be cast as
268 * \param data data pointer
269 * \param type point field type
270 * \ingroup common
271 *
272 * \return field value
273 */
274 template <typename T> T point_field_as (const std::uint8_t* data, const std::uint8_t type);
275
276 /**
277 * \brief Set the value of a point field from raw data pointer and field type.
278 *
279 * Integer field types are rounded to the nearest value and saturated to their range.
280 *
281 * \param value value to store
282 * \param data data pointer
283 * \param type point field type (see pcl::PCLPointField::PointFieldTypes)
284 * \ingroup common
285 */
286 inline void storeFieldValue (const double value, std::uint8_t* data, const std::uint8_t type);
287
288
296
297 /** \brief \return the right index according to the interpolation type.
298 * \note this is adapted from OpenCV
299 * \param p the index of point to interpolate
300 * \param length the top/bottom row or left/right column index
301 * \param type the requested interpolation
302 * \throws pcl::BadArgumentException if type is unknown
303 */
304 PCL_EXPORTS int
305 interpolatePointIndex (int p, int length, InterpolationType type);
306
307 /** \brief Concatenate two pcl::PointCloud<PointT>
308 * \param[in] cloud1 the first input point cloud dataset
309 * \param[in] cloud2 the second input point cloud dataset
310 * \param[out] cloud_out the resultant output point cloud dataset
311 * \return true if successful, false otherwise
312 * \ingroup common
313 */
314 template <typename PointT>
315 bool
317 const pcl::PointCloud<PointT> &cloud2,
318 pcl::PointCloud<PointT> &cloud_out)
319 {
320 return pcl::PointCloud<PointT>::concatenate(cloud1, cloud2, cloud_out);
321 }
322
323 /** \brief Concatenate two pcl::PCLPointCloud2
324 *
325 * \warning This function will concatenate IFF the non-skip fields are in the correct
326 * order and same in number.
327 * \param[in] cloud1 the first input point cloud dataset
328 * \param[in] cloud2 the second input point cloud dataset
329 * \param[out] cloud_out the resultant output point cloud dataset
330 * \return true if successful, false otherwise
331 * \ingroup common
332 */
333 inline bool
335 const pcl::PCLPointCloud2 &cloud2,
336 pcl::PCLPointCloud2 &cloud_out)
337 {
338 return pcl::PCLPointCloud2::concatenate(cloud1, cloud2, cloud_out);
339 }
340
341 /** \brief Concatenate two pcl::PolygonMesh
342 * \param[in] mesh1 the first input mesh
343 * \param[in] mesh2 the second input mesh
344 * \param[out] mesh_out the resultant output mesh
345 * \return true if successful, false otherwise
346 * \ingroup common
347 */
348 inline bool
350 const pcl::PolygonMesh &mesh2,
351 pcl::PolygonMesh &mesh_out)
352 {
353 return pcl::PolygonMesh::concatenate(mesh1, mesh2, mesh_out);
354 }
355
356 /** \brief Extract the indices of a given point cloud as a new point cloud
357 * \param[in] cloud_in the input point cloud dataset
358 * \param[in] indices the vector of indices representing the points to be copied from \a cloud_in
359 * \param[out] cloud_out the resultant output point cloud dataset
360 * \note Assumes unique indices.
361 * \ingroup common
362 */
363 PCL_EXPORTS void
365 const Indices &indices,
366 pcl::PCLPointCloud2 &cloud_out);
367
368 /** \brief Extract the indices of a given point cloud as a new point cloud
369 * \param[in] cloud_in the input point cloud dataset
370 * \param[in] indices the vector of indices representing the points to be copied from \a cloud_in
371 * \param[out] cloud_out the resultant output point cloud dataset
372 * \note Assumes unique indices.
373 * \ingroup common
374 */
375 PCL_EXPORTS void
377 const IndicesAllocator< Eigen::aligned_allocator<index_t> > &indices,
378 pcl::PCLPointCloud2 &cloud_out);
379
380 /** \brief Copy fields and point cloud data from \a cloud_in to \a cloud_out
381 * \param[in] cloud_in the input point cloud dataset
382 * \param[out] cloud_out the resultant output point cloud dataset
383 * \ingroup common
384 */
385 PCL_EXPORTS void
387 pcl::PCLPointCloud2 &cloud_out);
388
389 /** \brief Check if two given point types are the same or not. */
390template <typename Point1T, typename Point2T> constexpr bool
392 {
393 return (std::is_same<remove_cvref_t<Point1T>, remove_cvref_t<Point2T>>::value);
394 }
395
396 /** \brief Extract the indices of a given point cloud as a new point cloud
397 * \param[in] cloud_in the input point cloud dataset
398 * \param[in] indices the vector of indices representing the points to be copied from \a cloud_in
399 * \param[out] cloud_out the resultant output point cloud dataset
400 * \note Assumes unique indices.
401 * \ingroup common
402 */
403 template <typename PointT, typename IndicesVectorAllocator = std::allocator<index_t>> void
405 const IndicesAllocator< IndicesVectorAllocator> &indices,
406 pcl::PointCloud<PointT> &cloud_out);
407
408 /** \brief Extract the indices of a given point cloud as a new point cloud
409 * \param[in] cloud_in the input point cloud dataset
410 * \param[in] indices the PointIndices structure representing the points to be copied from cloud_in
411 * \param[out] cloud_out the resultant output point cloud dataset
412 * \note Assumes unique indices.
413 * \ingroup common
414 */
415 template <typename PointT> void
417 const PointIndices &indices,
418 pcl::PointCloud<PointT> &cloud_out);
419
420 /** \brief Extract the indices of a given point cloud as a new point cloud
421 * \param[in] cloud_in the input point cloud dataset
422 * \param[in] indices the vector of indices representing the points to be copied from \a cloud_in
423 * \param[out] cloud_out the resultant output point cloud dataset
424 * \note Assumes unique indices.
425 * \ingroup common
426 */
427 template <typename PointT> void
429 const std::vector<pcl::PointIndices> &indices,
430 pcl::PointCloud<PointT> &cloud_out);
431
432 /** \brief Copy all the fields from a given point cloud into a new point cloud
433 * \param[in] cloud_in the input point cloud dataset
434 * \param[out] cloud_out the resultant output point cloud dataset
435 * \ingroup common
436 */
437 template <typename PointInT, typename PointOutT> void
439 pcl::PointCloud<PointOutT> &cloud_out);
440
441 /** \brief Extract the indices of a given point cloud as a new point cloud
442 * \param[in] cloud_in the input point cloud dataset
443 * \param[in] indices the vector of indices representing the points to be copied from \a cloud_in
444 * \param[out] cloud_out the resultant output point cloud dataset
445 * \note Assumes unique indices.
446 * \ingroup common
447 */
448 template <typename PointInT, typename PointOutT, typename IndicesVectorAllocator = std::allocator<index_t>> void
450 const IndicesAllocator<IndicesVectorAllocator> &indices,
451 pcl::PointCloud<PointOutT> &cloud_out);
452
453 /** \brief Extract the indices of a given point cloud as a new point cloud
454 * \param[in] cloud_in the input point cloud dataset
455 * \param[in] indices the PointIndices structure representing the points to be copied from cloud_in
456 * \param[out] cloud_out the resultant output point cloud dataset
457 * \note Assumes unique indices.
458 * \ingroup common
459 */
460 template <typename PointInT, typename PointOutT> void
462 const PointIndices &indices,
463 pcl::PointCloud<PointOutT> &cloud_out);
464
465 /** \brief Extract the indices of a given point cloud as a new point cloud
466 * \param[in] cloud_in the input point cloud dataset
467 * \param[in] indices the vector of indices representing the points to be copied from cloud_in
468 * \param[out] cloud_out the resultant output point cloud dataset
469 * \note Assumes unique indices.
470 * \ingroup common
471 */
472 template <typename PointInT, typename PointOutT> void
474 const std::vector<pcl::PointIndices> &indices,
475 pcl::PointCloud<PointOutT> &cloud_out);
476
477 /** \brief Copy a point cloud inside a larger one interpolating borders.
478 * \param[in] cloud_in the input point cloud dataset
479 * \param[out] cloud_out the resultant output point cloud dataset
480 * \param top
481 * \param bottom
482 * \param left
483 * \param right
484 * Position of cloud_in inside cloud_out is given by \a top, \a left, \a bottom \a right.
485 * \param[in] border_type the interpolating method (pcl::BORDER_XXX)
486 * BORDER_REPLICATE: aaaaaa|abcdefgh|hhhhhhh
487 * BORDER_REFLECT: fedcba|abcdefgh|hgfedcb
488 * BORDER_REFLECT_101: gfedcb|abcdefgh|gfedcba
489 * BORDER_WRAP: cdefgh|abcdefgh|abcdefg
490 * BORDER_CONSTANT: iiiiii|abcdefgh|iiiiiii with some specified 'i'
491 * BORDER_TRANSPARENT: mnopqr|abcdefgh|tuvwxyz where m-r and t-z are original values of cloud_out
492 * \param value
493 * \throw pcl::BadArgumentException if any of top, bottom, left or right is negative.
494 * \ingroup common
495 */
496 template <typename PointT> void
498 pcl::PointCloud<PointT> &cloud_out,
499 int top, int bottom, int left, int right,
500 pcl::InterpolationType border_type, const PointT& value);
501
502 /** \brief Concatenate two datasets representing different fields.
503 *
504 * \note If the input datasets have overlapping fields (i.e., both contain
505 * the same fields), then the data in the second cloud (cloud2_in) will
506 * overwrite the data in the first (cloud1_in).
507 *
508 * \param[in] cloud1_in the first input dataset
509 * \param[in] cloud2_in the second input dataset (overwrites the fields of the first dataset for those that are shared)
510 * \param[out] cloud_out the resultant output dataset created by the concatenation of all the fields in the input datasets
511 * \ingroup common
512 */
513 template <typename PointIn1T, typename PointIn2T, typename PointOutT> void
515 const pcl::PointCloud<PointIn2T> &cloud2_in,
516 pcl::PointCloud<PointOutT> &cloud_out);
517
518 /** \brief Concatenate two datasets representing different fields.
519 *
520 * \note If the input datasets have overlapping fields (i.e., both contain
521 * the same fields), then the data in the second cloud (cloud2_in) will
522 * overwrite the data in the first (cloud1_in).
523 *
524 * \param[in] cloud1_in the first input dataset
525 * \param[in] cloud2_in the second input dataset (overwrites the fields of the first dataset for those that are shared)
526 * \param[out] cloud_out the output dataset created by concatenating all the fields in the input datasets
527 * \ingroup common
528 */
529 PCL_EXPORTS bool
531 const pcl::PCLPointCloud2 &cloud2_in,
532 pcl::PCLPointCloud2 &cloud_out);
533
534 /** \brief Copy the XYZ dimensions of a pcl::PCLPointCloud2 into Eigen format
535 * \param[in] in the point cloud message
536 * \param[out] out the resultant Eigen MatrixXf format containing XYZ0 / point
537 * \ingroup common
538 */
539 PCL_EXPORTS bool
540 getPointCloudAsEigen (const pcl::PCLPointCloud2 &in, Eigen::MatrixXf &out);
541
542 /** \brief Copy the XYZ dimensions from an Eigen MatrixXf into a pcl::PCLPointCloud2 message
543 * \param[in] in the Eigen MatrixXf format containing XYZ0 / point
544 * \param[out] out the resultant point cloud message
545 * \note the method assumes that the PCLPointCloud2 message already has the fields set up properly !
546 * \ingroup common
547 */
548 PCL_EXPORTS bool
549 getEigenAsPointCloud (Eigen::MatrixXf &in, pcl::PCLPointCloud2 &out);
550
551 namespace io
552 {
553 /** \brief swap bytes order of a char array of length N
554 * \param bytes char array to swap
555 * \ingroup common
556 */
557 template <std::size_t N> void
558 swapByte (char* bytes);
559
560 /** \brief specialization of swapByte for dimension 1
561 * \param bytes char array to swap
562 */
563 template <> inline void
564 swapByte<1> (char* bytes) { bytes[0] = bytes[0]; }
565
566
567 /** \brief specialization of swapByte for dimension 2
568 * \param bytes char array to swap
569 */
570 template <> inline void
571 swapByte<2> (char* bytes) { std::swap (bytes[0], bytes[1]); }
572
573 /** \brief specialization of swapByte for dimension 4
574 * \param bytes char array to swap
575 */
576 template <> inline void
577 swapByte<4> (char* bytes)
578 {
579 std::swap (bytes[0], bytes[3]);
580 std::swap (bytes[1], bytes[2]);
581 }
582
583 /** \brief specialization of swapByte for dimension 8
584 * \param bytes char array to swap
585 */
586 template <> inline void
587 swapByte<8> (char* bytes)
588 {
589 std::swap (bytes[0], bytes[7]);
590 std::swap (bytes[1], bytes[6]);
591 std::swap (bytes[2], bytes[5]);
592 std::swap (bytes[3], bytes[4]);
593 }
594
595 /** \brief swaps byte of an arbitrary type T casting it to char*
596 * \param value the data you want its bytes swapped
597 */
598 template <typename T> void
599 swapByte (T& value)
600 {
601 pcl::io::swapByte<sizeof(T)> (reinterpret_cast<char*> (&value));
602 }
603 }
604}
605
606#include <pcl/common/impl/io.hpp>
PointCloud represents the base class in PCL for storing collections of 3D points.
static bool concatenate(pcl::PointCloud< PointT > &cloud1, const pcl::PointCloud< PointT > &cloud2)
bool concatenate(const pcl::PointCloud< PointT > &cloud1, const pcl::PointCloud< PointT > &cloud2, pcl::PointCloud< PointT > &cloud_out)
Concatenate two pcl::PointCloud<PointT>
Definition io.h:316
void swapByte(char *bytes)
swap bytes order of a char array of length N
T point_field_as(const std::uint8_t *data, const std::uint8_t type)
Get the value of a point field from raw data pointer and field type.
Definition io.hpp:153
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.
Definition io.h:137
std::string getFieldsList(const pcl::PointCloud< PointT > &)
Get the list of all fields available in a given cloud.
Definition io.hpp:124
void storeFieldValue(const double value, std::uint8_t *data, const std::uint8_t type)
Set the value of a point field from raw data pointer and field type.
Definition io.hpp:216
int getFieldType(const int size, char type)
Obtains the type of the PCLPointField from a specific size and type.
Definition io.h:181
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.
Definition io.hpp:443
std::vector< pcl::PCLPointField > getFields()
Get the list of available fields (i.e., dimension/channel)
Definition io.hpp:102
#define PCL_FALLTHROUGH
Macro to add a no-op or a fallthrough attribute based on compiler feature.
Definition pcl_macros.h:436
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.
Definition io.hpp:282
void swapByte< 1 >(char *bytes)
specialization of swapByte for dimension 1
Definition io.h:564
void swapByte< 4 >(char *bytes)
specialization of swapByte for dimension 4
Definition io.h:577
void swapByte< 2 >(char *bytes)
specialization of swapByte for dimension 2
Definition io.h:571
void swapByte< 8 >(char *bytes)
specialization of swapByte for dimension 8
Definition io.h:587
int getFieldIndex(const pcl::PointCloud< PointT > &, const std::string &field_name, std::vector< pcl::PCLPointField > &fields)
Definition io.hpp:57
InterpolationType
Definition io.h:290
@ BORDER_REFLECT
Definition io.h:292
@ BORDER_REFLECT_101
Definition io.h:293
@ BORDER_TRANSPARENT
Definition io.h:293
@ BORDER_DEFAULT
Definition io.h:294
@ BORDER_CONSTANT
Definition io.h:291
@ BORDER_WRAP
Definition io.h:292
@ BORDER_REPLICATE
Definition io.h:291
PCL_EXPORTS int interpolatePointIndex(int p, int length, InterpolationType type)
constexpr bool isSamePointType() noexcept
Check if two given point types are the same or not.
Definition io.h:391
std::vector< index_t, Allocator > IndicesAllocator
Type used for indices in PCL.
Definition types.h:128
std::remove_cv_t< std::remove_reference_t< T > > remove_cvref_t
IndicesAllocator<> Indices
Type used for indices in PCL.
Definition types.h:133
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.
Definition PolygonMesh.h:30