40 #ifndef PCL_IO_IMPL_IO_HPP_
41 #define PCL_IO_IMPL_IO_HPP_
46 template <
typename Po
intT>
int
48 const std::string &field_name,
49 std::vector<sensor_msgs::PointField> &fields)
54 for (
size_t d = 0; d < fields.size (); ++d)
55 if (fields[d].name == field_name)
56 return (static_cast<int>(d));
61 template <
typename Po
intT>
int
63 std::vector<sensor_msgs::PointField> &fields)
68 for (
size_t d = 0; d < fields.size (); ++d)
69 if (fields[d].name == field_name)
70 return (static_cast<int>(d));
75 template <
typename Po
intT>
void
84 template <
typename Po
intT>
void
93 template <
typename Po
intT> std::string
97 std::vector<sensor_msgs::PointField> fields;
100 for (
size_t i = 0; i < fields.size () - 1; ++i)
101 result += fields[i].name +
" ";
102 result += fields[fields.size () - 1].name;
107 template <
typename Po
intInT,
typename Po
intOutT>
void
121 for (
size_t i = 0; i < cloud_in.
points.size (); ++i)
129 template <
typename Po
intT>
void
134 cloud_out.
points.resize (indices.size ());
136 cloud_out.
width =
static_cast<uint32_t
>(indices.size ());
148 for (
size_t i = 0; i < indices.size (); ++i)
154 template <
typename Po
intT>
void
156 const std::vector<
int, Eigen::aligned_allocator<int> > &indices,
160 cloud_out.
points.resize (indices.size ());
162 cloud_out.
width =
static_cast<uint32_t
> (indices.size ());
174 for (
size_t i = 0; i < indices.size (); ++i)
180 template <
typename Po
intInT,
typename Po
intOutT>
void
185 cloud_out.
points.resize (indices.size ());
187 cloud_out.
width = indices.size ();
201 for (
size_t i = 0; i < indices.size (); ++i)
207 template <
typename Po
intInT,
typename Po
intOutT>
void
209 const std::vector<
int, Eigen::aligned_allocator<int> > &indices,
213 cloud_out.
points.resize (indices.size ());
215 cloud_out.
width =
static_cast<uint32_t
> (indices.size ());
229 for (
size_t i = 0; i < indices.size (); ++i)
235 template <
typename Po
intT>
void
254 for (
size_t i = 0; i < indices.
indices.size (); ++i)
260 template <
typename Po
intInT,
typename Po
intOutT>
void
281 for (
size_t i = 0; i < indices.
indices.size (); ++i)
287 template <
typename Po
intT>
void
292 for (
size_t i = 0; i < indices.size (); ++i)
293 nr_p += indices[i].indices.size ();
296 cloud_out.
points.resize (nr_p);
298 cloud_out.
width = nr_p;
311 for (
size_t cc = 0; cc < indices.size (); ++cc)
314 for (
size_t i = 0; i < indices[cc].indices.size (); ++i)
324 template <
typename Po
intInT,
typename Po
intOutT>
void
329 for (
size_t i = 0; i < indices.size (); ++i)
330 nr_p += indices[i].indices.size ();
333 cloud_out.
points.resize (nr_p);
335 cloud_out.
width = nr_p;
350 for (
size_t cc = 0; cc < indices.size (); ++cc)
353 for (
size_t i = 0; i < indices[cc].indices.size (); ++i)
363 template <
typename Po
intIn1T,
typename Po
intIn2T,
typename Po
intOutT>
void
371 if (cloud1_in.
points.size () != cloud2_in.
points.size ())
373 PCL_ERROR (
"[pcl::concatenateFields] The number of points in the two input datasets differs!\n");
388 for (
size_t i = 0; i < cloud_out.
points.size (); ++i)
396 #endif // PCL_IO_IMPL_IO_H_