Loading...
Searching...
No Matches
io.h
/*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2010-2011, Willow Garage, Inc.
* Copyright (c) 2012-, Open Perception, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of the copyright holder(s) nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*
*/
#pragma once
#include <numeric>
#include <string>
#include <pcl/point_cloud.h>
#include <pcl/PointIndices.h>
#include <pcl/pcl_macros.h>
#include <pcl/PolygonMesh.h>
#include <locale>
namespace pcl
{
/** \brief Get the index of a specified field (i.e., dimension/channel)
* \param[in] cloud the point cloud message
* \param[in] field_name the string defining the field name
* \return the index of the field or a negative integer if no field with the given name exists
* \ingroup common
*/
inline int
getFieldIndex (const pcl::PCLPointCloud2 &cloud, const std::string &field_name)
{
// Get the index we need
const auto result = std::find_if(cloud.fields.begin (), cloud.fields.end (),
[&field_name](const auto field) { return field.name == field_name; });
if (result == cloud.fields.end ())
return -1;
return std::distance(cloud.fields.begin (), result);
}
/** \brief Get the index of a specified field (i.e., dimension/channel)
* \tparam PointT datatype for which fields is being queries
* \param[in] field_name the string defining the field name
* \param[out] fields a vector to the original \a PCLPointField vector that the raw PointCloud message contains
* \return the index of the field or a negative integer if no field with the given name exists
* \ingroup common
*/
template <typename PointT> inline int
getFieldIndex (const std::string &field_name,
std::vector<pcl::PCLPointField> &fields);
/** \brief Get the index of a specified field (i.e., dimension/channel)
* \tparam PointT datatype for which fields is being queries
* \param[in] field_name the string defining the field name
* \param[in] fields a vector to the original \a PCLPointField vector that the raw PointCloud message contains
* \ingroup common
*/
template <typename PointT> inline int
getFieldIndex (const std::string &field_name,
const std::vector<pcl::PCLPointField> &fields);
/** \brief Get the list of available fields (i.e., dimension/channel)
* \tparam PointT datatype whose details are requested
* \ingroup common
*/
template <typename PointT> inline std::vector<pcl::PCLPointField>
getFields ();
/** \brief Get the list of all fields available in a given cloud
* \param[in] cloud the point cloud message
* \ingroup common
*/
template <typename PointT> inline std::string
getFieldsList (const pcl::PointCloud<PointT> &cloud);
/** \brief Get the available point cloud fields as a space separated string
* \param[in] cloud a pointer to the PointCloud message
* \ingroup common
*/
inline std::string
getFieldsList (const pcl::PCLPointCloud2 &cloud)
{
if (cloud.fields.empty())
{
return "";
} else
{
return std::accumulate(std::next (cloud.fields.begin ()), cloud.fields.end (), cloud.fields[0].name,
[](const auto& acc, const auto& field) { return acc + " " + field.name; });
}
}
/** \brief Obtains the size of a specific field data type in bytes
* \param[in] datatype the field data type (see PCLPointField.h)
* \ingroup common
*/
inline int
getFieldSize (const int datatype)
{
switch (datatype)
{
case pcl::PCLPointField::BOOL:
return sizeof(bool);
case pcl::PCLPointField::INT8: PCL_FALLTHROUGH
case pcl::PCLPointField::UINT8:
return (1);
case pcl::PCLPointField::INT16: PCL_FALLTHROUGH
case pcl::PCLPointField::UINT16:
return (2);
case pcl::PCLPointField::INT32: PCL_FALLTHROUGH
case pcl::PCLPointField::UINT32: PCL_FALLTHROUGH
case pcl::PCLPointField::FLOAT32:
return (4);
case pcl::PCLPointField::INT64: PCL_FALLTHROUGH
case pcl::PCLPointField::UINT64: PCL_FALLTHROUGH
case pcl::PCLPointField::FLOAT64:
return (8);
default:
return (0);
}
}
/** \brief Obtain a vector with the sizes of all valid fields (e.g., not "_")
* \param[in] fields the input vector containing the fields
* \param[out] field_sizes the resultant field sizes in bytes
*/
PCL_EXPORTS void
getFieldsSizes (const std::vector<pcl::PCLPointField> &fields,
std::vector<int> &field_sizes);
/** \brief Obtains the type of the PCLPointField from a specific size and type
* \param[in] size the size in bytes of the data field
* \param[in] type a char describing the type of the field ('B' = bool, 'F' = float, 'I' = signed, 'U' = unsigned)
* \ingroup common
*/
inline int
getFieldType (const int size, char type)
{
type = std::toupper (type, std::locale::classic ());
// extra logic for bool because its size is undefined
if (type == 'B') {
if (size == sizeof(bool)) {
return pcl::PCLPointField::BOOL;
} else {
return -1;
}
}
switch (size)
{
case 1:
if (type == 'I')
return (pcl::PCLPointField::INT8);
if (type == 'U')
return (pcl::PCLPointField::UINT8);
break;
case 2:
if (type == 'I')
return (pcl::PCLPointField::INT16);
if (type == 'U')
return (pcl::PCLPointField::UINT16);
break;
case 4:
if (type == 'I')
return (pcl::PCLPointField::INT32);
if (type == 'U')
return (pcl::PCLPointField::UINT32);
if (type == 'F')
return (pcl::PCLPointField::FLOAT32);
break;
case 8:
if (type == 'I')
return (pcl::PCLPointField::INT64);
if (type == 'U')
return (pcl::PCLPointField::UINT64);
if (type == 'F')
return (pcl::PCLPointField::FLOAT64);
break;
}
return (-1);
}
/** \brief Obtains the type of the PCLPointField from a specific PCLPointField as a char
* \param[in] type the PCLPointField field type
* \ingroup common
*/
inline char
getFieldType (const int type)
{
switch (type)
{
case pcl::PCLPointField::BOOL:
return ('B');
case pcl::PCLPointField::INT8: PCL_FALLTHROUGH
case pcl::PCLPointField::INT16: PCL_FALLTHROUGH
case pcl::PCLPointField::INT32: PCL_FALLTHROUGH
case pcl::PCLPointField::INT64:
return ('I');
case pcl::PCLPointField::UINT8: PCL_FALLTHROUGH
case pcl::PCLPointField::UINT16: PCL_FALLTHROUGH
case pcl::PCLPointField::UINT32: PCL_FALLTHROUGH
case pcl::PCLPointField::UINT64:
return ('U');
case pcl::PCLPointField::FLOAT32: PCL_FALLTHROUGH
case pcl::PCLPointField::FLOAT64:
return ('F');
default:
return ('?');
}
}
enum InterpolationType
{
BORDER_CONSTANT = 0, BORDER_REPLICATE = 1,
BORDER_REFLECT = 2, BORDER_WRAP = 3,
BORDER_REFLECT_101 = 4, BORDER_TRANSPARENT = 5,
BORDER_DEFAULT = BORDER_REFLECT_101
};
/** \brief \return the right index according to the interpolation type.
* \note this is adapted from OpenCV
* \param p the index of point to interpolate
* \param length the top/bottom row or left/right column index
* \param type the requested interpolation
* \throws pcl::BadArgumentException if type is unknown
*/
PCL_EXPORTS int
interpolatePointIndex (int p, int length, InterpolationType type);
/** \brief Concatenate two pcl::PointCloud<PointT>
* \param[in] cloud1 the first input point cloud dataset
* \param[in] cloud2 the second input point cloud dataset
* \param[out] cloud_out the resultant output point cloud dataset
* \return true if successful, false otherwise
* \ingroup common
*/
template <typename PointT>
bool
concatenate (const pcl::PointCloud<PointT> &cloud1,
const pcl::PointCloud<PointT> &cloud2,
pcl::PointCloud<PointT> &cloud_out)
{
return pcl::PointCloud<PointT>::concatenate(cloud1, cloud2, cloud_out);
}
/** \brief Concatenate two pcl::PCLPointCloud2
*
* \warning This function will concatenate IFF the non-skip fields are in the correct
* order and same in number.
* \param[in] cloud1 the first input point cloud dataset
* \param[in] cloud2 the second input point cloud dataset
* \param[out] cloud_out the resultant output point cloud dataset
* \return true if successful, false otherwise
* \ingroup common
*/
inline bool
concatenate (const pcl::PCLPointCloud2 &cloud1,
const pcl::PCLPointCloud2 &cloud2,
pcl::PCLPointCloud2 &cloud_out)
{
return pcl::PCLPointCloud2::concatenate(cloud1, cloud2, cloud_out);
}
/** \brief Concatenate two pcl::PolygonMesh
* \param[in] mesh1 the first input mesh
* \param[in] mesh2 the second input mesh
* \param[out] mesh_out the resultant output mesh
* \return true if successful, false otherwise
* \ingroup common
*/
inline bool
concatenate (const pcl::PolygonMesh &mesh1,
const pcl::PolygonMesh &mesh2,
pcl::PolygonMesh &mesh_out)
{
return pcl::PolygonMesh::concatenate(mesh1, mesh2, mesh_out);
}
/** \brief Extract the indices of a given point cloud as a new point cloud
* \param[in] cloud_in the input point cloud dataset
* \param[in] indices the vector of indices representing the points to be copied from \a cloud_in
* \param[out] cloud_out the resultant output point cloud dataset
* \note Assumes unique indices.
* \ingroup common
*/
PCL_EXPORTS void
copyPointCloud (const pcl::PCLPointCloud2 &cloud_in,
const Indices &indices,
pcl::PCLPointCloud2 &cloud_out);
/** \brief Extract the indices of a given point cloud as a new point cloud
* \param[in] cloud_in the input point cloud dataset
* \param[in] indices the vector of indices representing the points to be copied from \a cloud_in
* \param[out] cloud_out the resultant output point cloud dataset
* \note Assumes unique indices.
* \ingroup common
*/
PCL_EXPORTS void
copyPointCloud (const pcl::PCLPointCloud2 &cloud_in,
const IndicesAllocator< Eigen::aligned_allocator<index_t> > &indices,
pcl::PCLPointCloud2 &cloud_out);
/** \brief Copy fields and point cloud data from \a cloud_in to \a cloud_out
* \param[in] cloud_in the input point cloud dataset
* \param[out] cloud_out the resultant output point cloud dataset
* \ingroup common
*/
PCL_EXPORTS void
copyPointCloud (const pcl::PCLPointCloud2 &cloud_in,
pcl::PCLPointCloud2 &cloud_out);
/** \brief Check if two given point types are the same or not. */
template <typename Point1T, typename Point2T> constexpr bool
isSamePointType() noexcept
{
return (std::is_same<remove_cvref_t<Point1T>, remove_cvref_t<Point2T>>::value);
}
/** \brief Extract the indices of a given point cloud as a new point cloud
* \param[in] cloud_in the input point cloud dataset
* \param[in] indices the vector of indices representing the points to be copied from \a cloud_in
* \param[out] cloud_out the resultant output point cloud dataset
* \note Assumes unique indices.
* \ingroup common
*/
template <typename PointT, typename IndicesVectorAllocator = std::allocator<index_t>> void
copyPointCloud (const pcl::PointCloud<PointT> &cloud_in,
const IndicesAllocator< IndicesVectorAllocator> &indices,
pcl::PointCloud<PointT> &cloud_out);
/** \brief Extract the indices of a given point cloud as a new point cloud
* \param[in] cloud_in the input point cloud dataset
* \param[in] indices the PointIndices structure representing the points to be copied from cloud_in
* \param[out] cloud_out the resultant output point cloud dataset
* \note Assumes unique indices.
* \ingroup common
*/
template <typename PointT> void
copyPointCloud (const pcl::PointCloud<PointT> &cloud_in,
const PointIndices &indices,
pcl::PointCloud<PointT> &cloud_out);
/** \brief Extract the indices of a given point cloud as a new point cloud
* \param[in] cloud_in the input point cloud dataset
* \param[in] indices the vector of indices representing the points to be copied from \a cloud_in
* \param[out] cloud_out the resultant output point cloud dataset
* \note Assumes unique indices.
* \ingroup common
*/
template <typename PointT> void
copyPointCloud (const pcl::PointCloud<PointT> &cloud_in,
const std::vector<pcl::PointIndices> &indices,
pcl::PointCloud<PointT> &cloud_out);
/** \brief Copy all the fields from a given point cloud into a new point cloud
* \param[in] cloud_in the input point cloud dataset
* \param[out] cloud_out the resultant output point cloud dataset
* \ingroup common
*/
template <typename PointInT, typename PointOutT> void
copyPointCloud (const pcl::PointCloud<PointInT> &cloud_in,
pcl::PointCloud<PointOutT> &cloud_out);
/** \brief Extract the indices of a given point cloud as a new point cloud
* \param[in] cloud_in the input point cloud dataset
* \param[in] indices the vector of indices representing the points to be copied from \a cloud_in
* \param[out] cloud_out the resultant output point cloud dataset
* \note Assumes unique indices.
* \ingroup common
*/
template <typename PointInT, typename PointOutT, typename IndicesVectorAllocator = std::allocator<index_t>> void
copyPointCloud (const pcl::PointCloud<PointInT> &cloud_in,
const IndicesAllocator<IndicesVectorAllocator> &indices,
pcl::PointCloud<PointOutT> &cloud_out);
/** \brief Extract the indices of a given point cloud as a new point cloud
* \param[in] cloud_in the input point cloud dataset
* \param[in] indices the PointIndices structure representing the points to be copied from cloud_in
* \param[out] cloud_out the resultant output point cloud dataset
* \note Assumes unique indices.
* \ingroup common
*/
template <typename PointInT, typename PointOutT> void
copyPointCloud (const pcl::PointCloud<PointInT> &cloud_in,
const PointIndices &indices,
pcl::PointCloud<PointOutT> &cloud_out);
/** \brief Extract the indices of a given point cloud as a new point cloud
* \param[in] cloud_in the input point cloud dataset
* \param[in] indices the vector of indices representing the points to be copied from cloud_in
* \param[out] cloud_out the resultant output point cloud dataset
* \note Assumes unique indices.
* \ingroup common
*/
template <typename PointInT, typename PointOutT> void
copyPointCloud (const pcl::PointCloud<PointInT> &cloud_in,
const std::vector<pcl::PointIndices> &indices,
pcl::PointCloud<PointOutT> &cloud_out);
/** \brief Copy a point cloud inside a larger one interpolating borders.
* \param[in] cloud_in the input point cloud dataset
* \param[out] cloud_out the resultant output point cloud dataset
* \param top
* \param bottom
* \param left
* \param right
* Position of cloud_in inside cloud_out is given by \a top, \a left, \a bottom \a right.
* \param[in] border_type the interpolating method (pcl::BORDER_XXX)
* BORDER_REPLICATE: aaaaaa|abcdefgh|hhhhhhh
* BORDER_REFLECT: fedcba|abcdefgh|hgfedcb
* BORDER_REFLECT_101: gfedcb|abcdefgh|gfedcba
* BORDER_WRAP: cdefgh|abcdefgh|abcdefg
* BORDER_CONSTANT: iiiiii|abcdefgh|iiiiiii with some specified 'i'
* BORDER_TRANSPARENT: mnopqr|abcdefgh|tuvwxyz where m-r and t-z are original values of cloud_out
* \param value
* \throw pcl::BadArgumentException if any of top, bottom, left or right is negative.
* \ingroup common
*/
template <typename PointT> void
copyPointCloud (const pcl::PointCloud<PointT> &cloud_in,
pcl::PointCloud<PointT> &cloud_out,
int top, int bottom, int left, int right,
pcl::InterpolationType border_type, const PointT& value);
/** \brief Concatenate two datasets representing different fields.
*
* \note If the input datasets have overlapping fields (i.e., both contain
* the same fields), then the data in the second cloud (cloud2_in) will
* overwrite the data in the first (cloud1_in).
*
* \param[in] cloud1_in the first input dataset
* \param[in] cloud2_in the second input dataset (overwrites the fields of the first dataset for those that are shared)
* \param[out] cloud_out the resultant output dataset created by the concatenation of all the fields in the input datasets
* \ingroup common
*/
template <typename PointIn1T, typename PointIn2T, typename PointOutT> void
concatenateFields (const pcl::PointCloud<PointIn1T> &cloud1_in,
const pcl::PointCloud<PointIn2T> &cloud2_in,
pcl::PointCloud<PointOutT> &cloud_out);
/** \brief Concatenate two datasets representing different fields.
*
* \note If the input datasets have overlapping fields (i.e., both contain
* the same fields), then the data in the second cloud (cloud2_in) will
* overwrite the data in the first (cloud1_in).
*
* \param[in] cloud1_in the first input dataset
* \param[in] cloud2_in the second input dataset (overwrites the fields of the first dataset for those that are shared)
* \param[out] cloud_out the output dataset created by concatenating all the fields in the input datasets
* \ingroup common
*/
PCL_EXPORTS bool
concatenateFields (const pcl::PCLPointCloud2 &cloud1_in,
const pcl::PCLPointCloud2 &cloud2_in,
pcl::PCLPointCloud2 &cloud_out);
/** \brief Copy the XYZ dimensions of a pcl::PCLPointCloud2 into Eigen format
* \param[in] in the point cloud message
* \param[out] out the resultant Eigen MatrixXf format containing XYZ0 / point
* \ingroup common
*/
PCL_EXPORTS bool
getPointCloudAsEigen (const pcl::PCLPointCloud2 &in, Eigen::MatrixXf &out);
/** \brief Copy the XYZ dimensions from an Eigen MatrixXf into a pcl::PCLPointCloud2 message
* \param[in] in the Eigen MatrixXf format containing XYZ0 / point
* \param[out] out the resultant point cloud message
* \note the method assumes that the PCLPointCloud2 message already has the fields set up properly !
* \ingroup common
*/
PCL_EXPORTS bool
getEigenAsPointCloud (Eigen::MatrixXf &in, pcl::PCLPointCloud2 &out);
namespace io
{
/** \brief swap bytes order of a char array of length N
* \param bytes char array to swap
* \ingroup common
*/
template <std::size_t N> void
swapByte (char* bytes);
/** \brief specialization of swapByte for dimension 1
* \param bytes char array to swap
*/
template <> inline void
swapByte<1> (char* bytes) { bytes[0] = bytes[0]; }
/** \brief specialization of swapByte for dimension 2
* \param bytes char array to swap
*/
template <> inline void
swapByte<2> (char* bytes) { std::swap (bytes[0], bytes[1]); }
/** \brief specialization of swapByte for dimension 4
* \param bytes char array to swap
*/
template <> inline void
swapByte<4> (char* bytes)
{
std::swap (bytes[0], bytes[3]);
std::swap (bytes[1], bytes[2]);
}
/** \brief specialization of swapByte for dimension 8
* \param bytes char array to swap
*/
template <> inline void
swapByte<8> (char* bytes)
{
std::swap (bytes[0], bytes[7]);
std::swap (bytes[1], bytes[6]);
std::swap (bytes[2], bytes[5]);
std::swap (bytes[3], bytes[4]);
}
/** \brief swaps byte of an arbitrary type T casting it to char*
* \param value the data you want its bytes swapped
*/
template <typename T> void
swapByte (T& value)
{
pcl::io::swapByte<sizeof(T)> (reinterpret_cast<char*> (&value));
}
}
}
#include <pcl/common/impl/io.hpp>
pcl::PointCloud
PointCloud represents the base class in PCL for storing collections of 3D points.
Definition point_cloud.h:174
pcl::PointCloud::concatenate
static bool concatenate(pcl::PointCloud< PointT > &cloud1, const pcl::PointCloud< PointT > &cloud2)
Definition point_cloud.h:232
pcl::concatenate
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:281
pcl::io::swapByte
void swapByte(char *bytes)
swap bytes order of a char array of length N
pcl::getPointCloudAsEigen
PCL_EXPORTS bool getPointCloudAsEigen(const pcl::PCLPointCloud2 &in, Eigen::MatrixXf &out)
Copy the XYZ dimensions of a pcl::PCLPointCloud2 into Eigen format.
pcl::getEigenAsPointCloud
PCL_EXPORTS bool getEigenAsPointCloud(Eigen::MatrixXf &in, pcl::PCLPointCloud2 &out)
Copy the XYZ dimensions from an Eigen MatrixXf into a pcl::PCLPointCloud2 message.
pcl::getFieldSize
int getFieldSize(const int datatype)
Obtains the size of a specific field data type in bytes.
Definition io.h:127
pcl::getFieldsList
std::string getFieldsList(const pcl::PointCloud< PointT > &)
Get the list of all fields available in a given cloud.
Definition io.hpp:107
pcl::getFieldType
int getFieldType(const int size, char type)
Obtains the type of the PCLPointField from a specific size and type.
Definition io.h:171
pcl::concatenateFields
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:303
pcl::getFields
std::vector< pcl::PCLPointField > getFields()
Get the list of available fields (i.e., dimension/channel).
Definition io.hpp:97
PCL_FALLTHROUGH
#define PCL_FALLTHROUGH
Macro to add a no-op or a fallthrough attribute based on compiler feature.
Definition pcl_macros.h:438
pcl::copyPointCloud
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:142
pcl::fields
Definition type_traits.h:60
pcl::io
Definition io.h:517
pcl::io::swapByte< 1 >
void swapByte< 1 >(char *bytes)
specialization of swapByte for dimension 1
Definition io.h:529
pcl::io::swapByte< 4 >
void swapByte< 4 >(char *bytes)
specialization of swapByte for dimension 4
Definition io.h:542
pcl::io::swapByte< 2 >
void swapByte< 2 >(char *bytes)
specialization of swapByte for dimension 2
Definition io.h:536
pcl::io::swapByte< 8 >
void swapByte< 8 >(char *bytes)
specialization of swapByte for dimension 8
Definition io.h:552
pcl
Definition convolution.h:46
pcl::getFieldIndex
int getFieldIndex(const pcl::PointCloud< PointT > &, const std::string &field_name, std::vector< pcl::PCLPointField > &fields)
Definition io.hpp:52
pcl::remove_cvref_t
std::remove_cv_t< std::remove_reference_t< T > > remove_cvref_t
Definition type_traits.h:298
pcl::InterpolationType
InterpolationType
Definition io.h:255
pcl::BORDER_REFLECT
@ BORDER_REFLECT
Definition io.h:257
pcl::BORDER_REFLECT_101
@ BORDER_REFLECT_101
Definition io.h:258
pcl::BORDER_TRANSPARENT
@ BORDER_TRANSPARENT
Definition io.h:258
pcl::BORDER_DEFAULT
@ BORDER_DEFAULT
Definition io.h:259
pcl::BORDER_CONSTANT
@ BORDER_CONSTANT
Definition io.h:256
pcl::BORDER_WRAP
@ BORDER_WRAP
Definition io.h:257
pcl::BORDER_REPLICATE
@ BORDER_REPLICATE
Definition io.h:256
pcl::IndicesAllocator
std::vector< index_t, Allocator > IndicesAllocator
Type used for indices in PCL.
Definition types.h:128
pcl::interpolatePointIndex
PCL_EXPORTS int interpolatePointIndex(int p, int length, InterpolationType type)
pcl::Indices
IndicesAllocator<> Indices
Type used for indices in PCL.
Definition types.h:133
pcl::isSamePointType
constexpr bool isSamePointType() noexcept
Check if two given point types are the same or not.
Definition io.h:356
pcl::getFieldsSizes
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 "_").
pcl_macros.h
Defines all the PCL and non-PCL macros used.
pcl::PCLPointCloud2
Definition PCLPointCloud2.h:17
pcl::PCLPointCloud2::fields
std::vector<::pcl::PCLPointField > fields
Definition PCLPointCloud2.h:23
pcl::PCLPointCloud2::concatenate
static bool concatenate(pcl::PCLPointCloud2 &cloud1, const pcl::PCLPointCloud2 &cloud2)
Inplace concatenate two pcl::PCLPointCloud2.
pcl::PCLPointField::UINT16
@ UINT16
Definition PCLPointField.h:24
pcl::PCLPointField::FLOAT32
@ FLOAT32
Definition PCLPointField.h:29
pcl::PCLPointField::UINT8
@ UINT8
Definition PCLPointField.h:22
pcl::PCLPointField::INT16
@ INT16
Definition PCLPointField.h:23
pcl::PCLPointField::FLOAT64
@ FLOAT64
Definition PCLPointField.h:30
pcl::PCLPointField::UINT32
@ UINT32
Definition PCLPointField.h:26
pcl::PCLPointField::UINT64
@ UINT64
Definition PCLPointField.h:28
pcl::PCLPointField::INT8
@ INT8
Definition PCLPointField.h:21
pcl::PCLPointField::INT64
@ INT64
Definition PCLPointField.h:27
pcl::PCLPointField::INT32
@ INT32
Definition PCLPointField.h:25
pcl::PCLPointField::BOOL
@ BOOL
Definition PCLPointField.h:20
pcl::PolygonMesh
Definition PolygonMesh.h:15
pcl::PolygonMesh::concatenate
static bool concatenate(pcl::PolygonMesh &mesh1, const pcl::PolygonMesh &mesh2)
Inplace concatenate two pcl::PolygonMesh.
Definition PolygonMesh.h:30