Point Cloud Library (PCL)
1.10.0
|
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>
138 template <
typename Po
intT>
157 getName ()
const {
return (
"PointCloudGeometryHandlerXYZ"); }
186 template <
typename Po
intT>
202 getName ()
const {
return (
"PointCloudGeometryHandlerSurfaceNormal"); }
231 template <
typename Po
intT>
244 const std::string &x_field_name,
245 const std::string &y_field_name,
246 const std::string &z_field_name)
258 field_name_ = x_field_name + y_field_name + z_field_name;
264 getName ()
const {
return (
"PointCloudGeometryHandlerCustom"); }
281 points->SetDataTypeToFloat ();
282 points->SetNumberOfPoints (
cloud_->points.size ());
287 for (vtkIdType i = 0; i < static_cast<vtkIdType> (
cloud_->points.size ()); ++i)
290 const std::uint8_t* pt_data = reinterpret_cast<const std::uint8_t*> (&
cloud_->points[i]);
300 points->SetPoint (i, p);
314 std::string field_name_;
340 , fields_ (cloud_->fields)
349 getName ()
const = 0;
353 getFieldName ()
const = 0;
421 getName ()
const {
return (
"PointCloudGeometryHandlerXYZ"); }
451 getName ()
const {
return (
"PointCloudGeometryHandlerSurfaceNormal"); }
475 const std::string &x_field_name,
476 const std::string &y_field_name,
477 const std::string &z_field_name);
484 getName ()
const {
return (
"PointCloudGeometryHandlerCustom"); }
492 std::string field_name_;
497 #ifdef PCL_NO_PRECOMPILE
498 #include <pcl/visualization/impl/point_cloud_geometry_handlers.hpp>
std::vector< pcl::PCLPointField > fields_
The list of fields available for this PointCloud.
bool capable_
True if this handler is capable of handling the input data, false otherwise.
void setInputCloud(const PointCloudConstPtr &cloud)
Set the input cloud to be used.
This file defines compatibility wrappers for low level I/O functions.
virtual std::string getFieldName() const =0
Abstract getFieldName method.
PointCloudGeometryHandlerXYZ(const PointCloudConstPtr &cloud)
Constructor.
virtual std::string getName() const =0
Abstract getName method.
PointCloudGeometryHandlerCustom(const PointCloudConstPtr &cloud, const std::string &x_field_name, const std::string &y_field_name, const std::string &z_field_name)
Constructor.
virtual std::string getName() const
Class getName method.
virtual ~PointCloudGeometryHandlerCustom()
Destructor.
PointCloudGeometryHandler(const PointCloudConstPtr &cloud, const Eigen::Vector4f &=Eigen::Vector4f::Zero())
Constructor.
virtual std::string getName() const
Class getName method.
int field_y_idx_
The index of the field holding the Y data.
virtual std::string getName() const
Class getName method.
virtual std::string getFieldName() const
Get the name of the field used.
virtual ~PointCloudGeometryHandler()
Destructor.
PointCloudGeometryHandler(const PointCloudConstPtr &cloud)
Constructor.
virtual void getGeometry(vtkSmartPointer< vtkPoints > &points) const
Obtain the actual point geometry for the input dataset in VTK format.
int field_x_idx_
The index of the field holding the X data.
virtual std::string getName() const
Class getName method.
PointCloud represents the base class in PCL for storing collections of 3D points.
virtual std::string getFieldName() const
Get the name of the field used.
int field_y_idx_
The index of the field holding the Y data.
virtual std::string getName() const
Class getName method.
A point structure representing Euclidean xyz coordinates, and the RGB color.
shared_ptr< PointCloudGeometryHandler< PointT > > Ptr
Custom handler class for PointCloud geometry.
virtual ~PointCloudGeometryHandlerXYZ()
Destructor.
virtual std::string getFieldName() const
Get the name of the field used.
std::vector< pcl::PCLPointField > fields_
The list of fields available for this PointCloud.
typename PointCloud::ConstPtr PointCloudConstPtr
virtual std::string getFieldName() const
Get the name of the field used.
PointCloud::ConstPtr PointCloudConstPtr
void setInputCloud(const PointCloudConstPtr &cloud)
Set the input cloud to be used.
virtual void getGeometry(vtkSmartPointer< vtkPoints > &points) const
Obtain the actual point geometry for the input dataset in VTK format.
PointCloud::Ptr PointCloudPtr
shared_ptr< PointCloudGeometryHandler< PointCloud > > Ptr
shared_ptr< const PointCloudGeometryHandler< PointT > > ConstPtr
bool isCapable() const
Checl if this handler is capable of handling the input data or not.
virtual std::string getFieldName() const
Get the name of the field used.
shared_ptr< const PointCloudGeometryHandler< PointCloud > > ConstPtr
int field_z_idx_
The index of the field holding the Z data.
virtual std::string getFieldName() const
Get the name of the field used.
PointCloudConstPtr cloud_
A pointer to the input dataset.
shared_ptr< PointCloud< PointT > > Ptr
virtual void getGeometry(vtkSmartPointer< vtkPoints > &points) const
Obtain the actual point geometry for the input dataset in VTK format.
virtual ~PointCloudGeometryHandlerXYZ()
Destructor.
int field_x_idx_
The index of the field holding the X data.
PointCloudGeometryHandlerSurfaceNormal(const PointCloudConstPtr &cloud)
Constructor.
shared_ptr< const PointCloud< PointT > > ConstPtr
virtual ~PointCloudGeometryHandler()
Destructor.
typename PointCloud::Ptr PointCloudPtr
Base handler class for PointCloud geometry.
int field_z_idx_
The index of the field holding the Z data.
bool isCapable() const
Check if this handler is capable of handling the input data or not.
XYZ handler class for PointCloud geometry.
bool capable_
True if this handler is capable of handling the input data, false otherwise.
virtual std::string getName() const
Class getName method.
PointCloudConstPtr cloud_
A pointer to the input dataset.
Surface normal handler class for PointCloud geometry.
boost::shared_ptr< T > shared_ptr
Alias for boost::shared_ptr.
virtual void getGeometry(vtkSmartPointer< vtkPoints > &points) const =0
Obtain the actual point geometry for the input dataset in VTK format.