37 #ifndef PCL_POINT_CLOUD_GEOMETRY_HANDLERS_H_
38 #define PCL_POINT_CLOUD_GEOMETRY_HANDLERS_H_
41 #pragma GCC system_header
45 #include <pcl/point_cloud.h>
46 #include <pcl/common/io.h>
48 #include <vtkSmartPointer.h>
49 #include <vtkPoints.h>
50 #include <vtkFloatArray.h>
54 namespace visualization
60 template <
typename Po
intT>
68 typedef typename boost::shared_ptr<PointCloudGeometryHandler<PointT> >
Ptr;
69 typedef typename boost::shared_ptr<const PointCloudGeometryHandler<PointT> >
ConstPtr;
138 template <
typename Po
intT>
146 typedef typename boost::shared_ptr<PointCloudGeometryHandlerXYZ<PointT> >
Ptr;
147 typedef typename boost::shared_ptr<const PointCloudGeometryHandlerXYZ<PointT> >
ConstPtr;
157 getName ()
const {
return (
"PointCloudGeometryHandlerXYZ"); }
186 template <
typename Po
intT>
194 typedef typename boost::shared_ptr<PointCloudGeometryHandlerSurfaceNormal<PointT> >
Ptr;
195 typedef typename boost::shared_ptr<const PointCloudGeometryHandlerSurfaceNormal<PointT> >
ConstPtr;
202 getName ()
const {
return (
"PointCloudGeometryHandlerSurfaceNormal"); }
231 template <
typename Po
intT>
239 typedef typename boost::shared_ptr<PointCloudGeometryHandlerCustom<PointT> >
Ptr;
240 typedef typename boost::shared_ptr<const PointCloudGeometryHandlerCustom<PointT> >
ConstPtr;
244 const std::string &x_field_name,
245 const std::string &y_field_name,
246 const std::string &z_field_name)
257 field_name_ = x_field_name + y_field_name + z_field_name;
263 getName ()
const {
return (
"PointCloudGeometryHandlerCustom"); }
280 points->SetDataTypeToFloat ();
281 points->SetNumberOfPoints (
cloud_->points.size ());
286 for (vtkIdType i = 0; i < static_cast<vtkIdType> (
cloud_->points.size ()); ++i)
289 const uint8_t* pt_data =
reinterpret_cast<const uint8_t*
> (&
cloud_->points[i]);
299 points->SetPoint (i, p);
313 std::string field_name_;
329 typedef boost::shared_ptr<PointCloudGeometryHandler<PointCloud> >
Ptr;
330 typedef boost::shared_ptr<const PointCloudGeometryHandler<PointCloud> >
ConstPtr;
339 , fields_ (cloud_->fields)
348 getName ()
const = 0;
352 getFieldName ()
const = 0;
409 typedef boost::shared_ptr<PointCloudGeometryHandlerXYZ<PointCloud> >
Ptr;
410 typedef boost::shared_ptr<const PointCloudGeometryHandlerXYZ<PointCloud> >
ConstPtr;
420 getName ()
const {
return (
"PointCloudGeometryHandlerXYZ"); }
442 typedef boost::shared_ptr<PointCloudGeometryHandlerSurfaceNormal<PointCloud> >
Ptr;
443 typedef boost::shared_ptr<const PointCloudGeometryHandlerSurfaceNormal<PointCloud> >
ConstPtr;
450 getName ()
const {
return (
"PointCloudGeometryHandlerSurfaceNormal"); }
474 const std::string &x_field_name,
475 const std::string &y_field_name,
476 const std::string &z_field_name);
483 getName ()
const {
return (
"PointCloudGeometryHandlerCustom"); }
491 std::string field_name_;
496 #ifdef PCL_NO_PRECOMPILE
497 #include <pcl/visualization/impl/point_cloud_geometry_handlers.hpp>
500 #endif // PCL_POINT_CLOUD_GEOMETRY_HANDLERS_H_