3#ifndef __YARP_CLOUD_UTILS_HPP__
4#define __YARP_CLOUD_UTILS_HPP__
9#include <yarp/os/Property.h>
10#include <yarp/os/Searchable.h>
12#include <yarp/sig/PointCloud.h>
13#include <yarp/sig/Vector.h>
31namespace YarpCloudUtils
46bool savePLY(
const std::string & filename,
const yarp::sig::PointCloud<T> & cloud,
const yarp::sig::VectorOf<int> & indices,
bool isBinary =
true);
59bool savePLY(
const std::string & filename,
const yarp::sig::PointCloud<T> & cloud,
bool isBinary =
true)
61 return savePLY(filename, cloud, {}, isBinary);
78bool loadPLY(
const std::string & filename, yarp::sig::PointCloud<T> & cloud, yarp::sig::VectorOf<int> & indices);
93bool loadPLY(
const std::string & filename, yarp::sig::PointCloud<T> & cloud)
95 yarp::sig::VectorOf<int> indices;
96 return loadPLY(filename, cloud, indices);
113template <
typename T1,
typename T2 = T1>
115 yarp::sig::PointCloud<T2> & meshPoints,
116 yarp::sig::VectorOf<int> & meshIndices,
117 const std::vector<yarp::os::Property> & options);
134template <
typename T1,
typename T2 = T1>
136 yarp::sig::PointCloud<T2> & meshPoints,
137 yarp::sig::VectorOf<int> & meshIndices,
138 const yarp::os::Searchable & config,
139 const std::string & collection =
"meshPipeline");
155template <
typename T1,
typename T2 = T1>
157 yarp::sig::PointCloud<T2> & out,
158 const std::vector<yarp::os::Property> & options);
175template <
typename T1,
typename T2 = T1>
177 yarp::sig::PointCloud<T2> & out,
178 const yarp::os::Searchable & config,
179 const std::string & collection =
"cloudPipeline");
bool processCloud(const yarp::sig::PointCloud< T1 > &in, yarp::sig::PointCloud< T2 > &out, const std::vector< yarp::os::Property > &options)
Processes a cloud of points.
Definition YarpCloudUtils-pcl.cpp:361
bool loadPLY(const std::string &filename, yarp::sig::PointCloud< T > &cloud, yarp::sig::VectorOf< int > &indices)
Reads a triangular polygon mesh from file.
Definition YarpCloudUtils-ply-import.cpp:523
bool savePLY(const std::string &filename, const yarp::sig::PointCloud< T > &cloud, const yarp::sig::VectorOf< int > &indices, bool isBinary)
Writes a triangular polygon mesh to file.
Definition YarpCloudUtils-ply-export.cpp:368
bool meshFromCloud(const yarp::sig::PointCloud< T1 > &cloud, yarp::sig::PointCloud< T2 > &meshPoints, yarp::sig::VectorOf< int > &meshIndices, const std::vector< yarp::os::Property > &options)
Constructs a triangular polygon mesh from a point cloud.
Definition YarpCloudUtils-pcl.cpp:284
The main, catch-all namespace for Robotics Lab UC3M.
Definition groups.dox:5