41 #ifndef PCL_COMMON_IO_H_
42 #define PCL_COMMON_IO_H_
45 #include <pcl/pcl_base.h>
46 #include <pcl/PointIndices.h>
47 #include <pcl/conversions.h>
61 for (
size_t d = 0; d < cloud.
fields.size (); ++d)
62 if (cloud.
fields[d].name == field_name)
63 return (static_cast<int>(d));
73 template <
typename Po
intT>
inline int
75 std::vector<pcl::PCLPointField> &fields);
82 template <
typename Po
intT>
inline int
84 std::vector<pcl::PCLPointField> &fields);
91 template <
typename Po
intT>
inline void
98 template <
typename Po
intT>
inline void
99 getFields (std::vector<pcl::PCLPointField> &fields);
105 template <
typename Po
intT>
inline std::string
116 for (
size_t i = 0; i < cloud.
fields.size () - 1; ++i)
117 result += cloud.
fields[i].name +
" ";
158 std::vector<int> &field_sizes);
168 type = std::toupper (type, std::locale::classic ());
247 const std::vector<int> &indices,
259 const std::vector<
int, Eigen::aligned_allocator<int> > &indices,
272 template <
typename Po
int1T,
typename Po
int2T>
inline bool
275 return (
typeid (Point1T) ==
typeid (Point2T));
285 template <
typename Po
intT>
void
287 const std::vector<int> &indices,
297 template <
typename Po
intT>
void
299 const std::vector<
int, Eigen::aligned_allocator<int> > &indices,
309 template <
typename Po
intT>
void
311 const PointIndices &indices,
321 template <
typename Po
intT>
void
323 const std::vector<pcl::PointIndices> &indices,
331 template <
typename Po
intInT,
typename Po
intOutT>
void
342 template <
typename Po
intInT,
typename Po
intOutT>
void
344 const std::vector<int> &indices,
354 template <
typename Po
intInT,
typename Po
intOutT>
void
356 const std::vector<
int, Eigen::aligned_allocator<int> > &indices,
366 template <
typename Po
intInT,
typename Po
intOutT>
void
368 const PointIndices &indices,
378 template <
typename Po
intInT,
typename Po
intOutT>
void
380 const std::vector<pcl::PointIndices> &indices,
394 template <
typename Po
intIn1T,
typename Po
intIn2T,
typename Po
intOutT>
void
438 template <std::
size_t N>
void
444 template <>
inline void
451 template <>
inline void
457 template <>
inline void
460 std::swap (bytes[0], bytes[3]);
461 std::swap (bytes[1], bytes[2]);
467 template <>
inline void
470 std::swap (bytes[0], bytes[7]);
471 std::swap (bytes[1], bytes[6]);
472 std::swap (bytes[2], bytes[5]);
473 std::swap (bytes[3], bytes[4]);
479 template <
typename T>
void
482 pcl::io::swapByte<sizeof(T)> (
reinterpret_cast<char*
> (&value));
487 #include <pcl/common/impl/io.hpp>
489 #endif //#ifndef PCL_COMMON_IO_H_