40 #ifndef PCL_IO_PCD_IO_H_
41 #define PCL_IO_PCD_IO_H_
115 Eigen::Vector4f &origin, Eigen::Quaternionf &orientation,
int &pcd_version,
116 int &data_type,
unsigned int &data_idx,
const int offset = 0);
172 int &pcd_version,
int &data_type,
unsigned int &data_idx,
const int offset = 0);
193 Eigen::Vector4f &origin, Eigen::Quaternionf &orientation,
int &pcd_version,
const int offset = 0);
232 template<
typename Po
intT>
int
238 pcd_version, offset);
286 setMapSynchronization (
bool sync)
288 map_synchronization_ = sync;
298 const Eigen::Vector4f &origin,
299 const Eigen::Quaternionf &orientation);
308 const Eigen::Vector4f &origin,
309 const Eigen::Quaternionf &orientation);
318 const Eigen::Vector4f &origin,
319 const Eigen::Quaternionf &orientation);
326 template <
typename Po
intT>
static std::string
328 const int nr_points = std::numeric_limits<int>::max ());
341 const int nr_points = std::numeric_limits<int>::max ());
361 const Eigen::Vector4f &origin = Eigen::Vector4f::Zero (),
362 const Eigen::Quaternionf &orientation = Eigen::Quaternionf::Identity (),
363 const int precision = 8);
373 const Eigen::Vector4f &origin = Eigen::Vector4f::Zero (),
374 const Eigen::Quaternionf &orientation = Eigen::Quaternionf::Identity ());
384 const Eigen::Vector4f &origin = Eigen::Vector4f::Zero (),
385 const Eigen::Quaternionf &orientation = Eigen::Quaternionf::Identity ());
406 const Eigen::Vector4f &origin = Eigen::Vector4f::Zero (),
407 const Eigen::Quaternionf &orientation = Eigen::Quaternionf::Identity (),
408 const bool binary =
false)
411 return (writeBinary (file_name, cloud, origin, orientation));
413 return (writeASCII (file_name, cloud, origin, orientation, 8));
433 const Eigen::Vector4f &origin = Eigen::Vector4f::Zero (),
434 const Eigen::Quaternionf &orientation = Eigen::Quaternionf::Identity (),
435 const bool binary =
false)
437 return (write (file_name, *cloud, origin, orientation, binary));
444 template <
typename Po
intT>
int
445 writeBinary (
const std::string &file_name,
457 writeBinaryEigen (
const std::string &file_name,
464 template <
typename Po
intT>
int
465 writeBinaryCompressed (
const std::string &file_name,
477 writeBinaryCompressedEigen (
const std::string &file_name,
485 template <
typename Po
intT>
int
486 writeBinary (
const std::string &file_name,
488 const std::vector<int> &indices);
495 template <
typename Po
intT>
int
496 writeASCII (
const std::string &file_name,
498 const int precision = 8);
510 writeASCIIEigen (
const std::string &file_name,
512 const int precision = 8);
520 template <
typename Po
intT>
int
521 writeASCII (
const std::string &file_name,
523 const std::vector<int> &indices,
524 const int precision = 8);
539 template<
typename Po
intT>
inline int
540 write (
const std::string &file_name,
542 const bool binary =
false)
545 return (writeBinary<PointT> (file_name, cloud));
547 return (writeASCII<PointT> (file_name, cloud));
564 template<
typename Po
intT>
inline int
565 write (
const std::string &file_name,
567 const std::vector<int> &indices,
571 return (writeBinary<PointT> (file_name, cloud, indices));
573 return (writeASCII<PointT> (file_name, cloud, indices));
578 bool map_synchronization_;
580 typedef std::pair<std::string, pcl::ChannelProperties> pair_channel_properties;
584 struct ChannelPropertiesComparator
587 operator()(
const pair_channel_properties &lhs,
const pair_channel_properties &rhs)
589 return (lhs.second.offset < rhs.second.offset);
609 return (p.
read (file_name, cloud));
622 Eigen::Vector4f &origin, Eigen::Quaternionf &orientation)
626 return (p.
read (file_name, cloud, origin, orientation, pcd_version));
634 template<
typename Po
intT>
inline int
638 return (p.
read (file_name, cloud));
658 const Eigen::Vector4f &origin = Eigen::Vector4f::Zero (),
659 const Eigen::Quaternionf &orientation = Eigen::Quaternionf::Identity (),
660 const bool binary_mode =
false)
663 return (w.
write (file_name, cloud, origin, orientation, binary_mode));
680 template<
typename Po
intT>
inline int
684 return (w.
write<
PointT> (file_name, cloud, binary_mode));
703 template<
typename Po
intT>
inline int
707 return (w.
write<
PointT> (file_name, cloud,
false));
719 template<
typename Po
intT>
inline int
743 template<
typename Po
intT>
int
746 const std::vector<int> &indices,
747 const bool binary_mode =
false)
751 return (w.
write<
PointT> (file_name, cloud, indices, binary_mode));
758 #endif //#ifndef PCL_IO_PCD_IO_H_