Fawkes API
Fawkes Development Version
|
23 #ifndef _LIBS_PCL_UTILS_POINTCLOUD_MANAGER_H_
24 #define _LIBS_PCL_UTILS_POINTCLOUD_MANAGER_H_
26 #include <core/exception.h>
27 #include <core/threading/mutex_locker.h>
28 #include <core/utils/lock_map.h>
29 #include <core/utils/refptr.h>
30 #include <pcl_utils/storage_adapter.h>
31 #include <utils/time/time.h>
40 template <
typename Po
intT>
52 template <
typename Po
intT>
57 template <
typename Po
intT>
65 template <
typename Po
intT>
76 template <
typename Po
intT>
82 if (clouds_.find(
id) == clouds_.end()) {
85 throw Exception(
"Cloud %s already registered",
id);
89 template <
typename Po
intT>
95 if (clouds_.find(
id) != clouds_.end()) {
101 if (strcmp(clouds_[
id]->get_typename(),
107 throw Exception(
"The desired point cloud is of a different type");
111 throw Exception(
"No point cloud with ID '%s' registered",
id);
115 template <
typename Po
intT>
bool exists_pointcloud(const char *id)
Check if point cloud exists.
RefPtr<> is a reference-counting shared smartpointer.
void remove_pointcloud(const char *id)
Remove the point cloud.
const RefPtr< pcl::PointCloud< PointT > > cloud
The point cloud.
PointCloudManager()
Constructor.
const RefPtr< const pcl::PointCloud< PointT > > get_pointcloud(const char *id)
const fawkes::LockMap< std::string, pcl_utils::StorageAdapter * > & get_pointclouds() const
Get map of point clouds.
const pcl_utils::StorageAdapter * get_storage_adapter(const char *id)
Get a storage adapter.
std::vector< std::string > get_pointcloud_list() const
Get list of point cloud IDs.
virtual ~PointCloudManager()
Destructor.
void add_pointcloud(const char *id, RefPtr< pcl::PointCloud< PointT >> cloud)