23 #ifndef _LIBS_PCL_UTILS_STORAGE_ADAPTER_H_
24 #define _LIBS_PCL_UTILS_STORAGE_ADAPTER_H_
26 #include <pcl/point_cloud.h>
27 #include <pcl_utils/transforms.h>
28 #include <pcl_utils/utils.h>
33 template <
typename Po
intT>
34 class PointCloudStorageAdapter;
42 template <
typename Po
intT>
45 template <
typename Po
intT>
50 virtual void transform(
const std::string & target_frame,
51 const Time & target_time,
52 const std::string & fixed_frame,
58 virtual unsigned int width()
const = 0;
59 virtual unsigned int height()
const = 0;
62 virtual std::string
frame_id()
const = 0;
66 template <
typename Po
intT>
93 return pcl_utils::cloudptr_from_refptr(
cloud);
102 return pcl_utils::cloudptr_from_refptr(
cloud);
109 virtual void transform(
const std::string & target_frame,
110 const Time & target_time,
111 const std::string & fixed_frame,
117 return typeid(
this).name();
122 return sizeof(PointT);
132 return cloud->height;
137 return cloud->points.size();
142 return &
cloud->points[0];
147 return cloud->header.frame_id;
152 template <
typename Po
intT>
161 template <
typename Po
intT>
167 throw Exception(
"PointCloud storage adapter is not of anticipated type");
172 template <
typename Po
intT>
179 template <
typename Po
intT>
183 pcl_utils::get_time(cloud, time);
186 template <
typename Po
intT>
192 pcl_utils::transform_pointcloud(target_frame, **cloud, tmp, transformer);
196 template <
typename Po
intT>
199 const Time & target_time,
200 const std::string & fixed_frame,
204 pcl_utils::transform_pointcloud(
205 target_frame, target_time, fixed_frame, **cloud, tmp, transformer);