point_cloud_geometry_handlers.h
/*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2012-, Open Perception, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of the copyright holder(s) nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#pragma once
#if defined __GNUC__
#pragma GCC system_header
#endif
// PCL includes
#include <pcl/point_cloud.h>
#include <pcl/common/io.h>
// VTK includes
#include <vtkSmartPointer.h>
#include <vtkPoints.h>
#include <vtkFloatArray.h>
namespace pcl
{
namespace visualization
{
/** \brief Base handler class for PointCloud geometry.
* \author Radu B. Rusu
* \ingroup visualization
*/
template <typename PointT>
class PointCloudGeometryHandler
{
public:
using PointCloud = pcl::PointCloud<PointT>;
using PointCloudPtr = typename PointCloud::Ptr;
using PointCloudConstPtr = typename PointCloud::ConstPtr;
using Ptr = shared_ptr<PointCloudGeometryHandler<PointT> >;
using ConstPtr = shared_ptr<const PointCloudGeometryHandler<PointT> >;
/** \brief Constructor. */
PointCloudGeometryHandler (const PointCloudConstPtr &cloud) :
cloud_ (cloud), capable_ (false),
field_x_idx_ (-1), field_y_idx_ (-1), field_z_idx_ (-1),
fields_ ()
{}
/** \brief Destructor. */
virtual ~PointCloudGeometryHandler () {}
/** \brief Abstract getName method.
* \return the name of the class/object.
*/
virtual std::string
getName () const = 0;
/** \brief Abstract getFieldName method. */
virtual std::string
getFieldName () const = 0;
/** \brief Checl if this handler is capable of handling the input data or not. */
inline bool
isCapable () const { return (capable_); }
/** \brief Obtain the actual point geometry for the input dataset in VTK format.
* \param[out] points the resultant geometry
*/
virtual void
getGeometry (vtkSmartPointer<vtkPoints> &points) const = 0;
/** \brief Set the input cloud to be used.
* \param[in] cloud the input cloud to be used by the handler
*/
void
setInputCloud (const PointCloudConstPtr &cloud)
{
cloud_ = cloud;
}
protected:
/** \brief A pointer to the input dataset. */
PointCloudConstPtr cloud_;
/** \brief True if this handler is capable of handling the input data, false
* otherwise.
*/
bool capable_;
/** \brief The index of the field holding the X data. */
int field_x_idx_;
/** \brief The index of the field holding the Y data. */
int field_y_idx_;
/** \brief The index of the field holding the Z data. */
int field_z_idx_;
/** \brief The list of fields available for this PointCloud. */
std::vector<pcl::PCLPointField> fields_;
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief XYZ handler class for PointCloud geometry. Given an input dataset, all XYZ
* data present in fields "x", "y", and "z" is extracted and displayed on screen.
* \author Radu B. Rusu
* \ingroup visualization
*/
template <typename PointT>
class PointCloudGeometryHandlerXYZ : public PointCloudGeometryHandler<PointT>
{
public:
using PointCloud = typename PointCloudGeometryHandler<PointT>::PointCloud;
using PointCloudPtr = typename PointCloud::Ptr;
using PointCloudConstPtr = typename PointCloud::ConstPtr;
using Ptr = shared_ptr<PointCloudGeometryHandlerXYZ<PointT> >;
using ConstPtr = shared_ptr<const PointCloudGeometryHandlerXYZ<PointT> >;
/** \brief Constructor. */
PointCloudGeometryHandlerXYZ (const PointCloudConstPtr &cloud);
/** \brief Destructor. */
virtual ~PointCloudGeometryHandlerXYZ () {};
/** \brief Class getName method. */
virtual std::string
getName () const { return ("PointCloudGeometryHandlerXYZ"); }
/** \brief Get the name of the field used. */
virtual std::string
getFieldName () const { return ("xyz"); }
/** \brief Obtain the actual point geometry for the input dataset in VTK format.
* \param[out] points the resultant geometry
*/
virtual void
getGeometry (vtkSmartPointer<vtkPoints> &points) const;
private:
// Members derived from the base class
using PointCloudGeometryHandler<PointT>::cloud_;
using PointCloudGeometryHandler<PointT>::capable_;
using PointCloudGeometryHandler<PointT>::field_x_idx_;
using PointCloudGeometryHandler<PointT>::field_y_idx_;
using PointCloudGeometryHandler<PointT>::field_z_idx_;
using PointCloudGeometryHandler<PointT>::fields_;
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief Surface normal handler class for PointCloud geometry. Given an input
* dataset, all data present in fields "normal_x", "normal_y", and "normal_z" is
* extracted and displayed on screen as XYZ data.
* \author Radu B. Rusu
* \ingroup visualization
*/
template <typename PointT>
class PointCloudGeometryHandlerSurfaceNormal : public PointCloudGeometryHandler<PointT>
{
public:
using PointCloud = typename PointCloudGeometryHandler<PointT>::PointCloud;
using PointCloudPtr = typename PointCloud::Ptr;
using PointCloudConstPtr = typename PointCloud::ConstPtr;
using Ptr = shared_ptr<PointCloudGeometryHandlerSurfaceNormal<PointT> >;
using ConstPtr = shared_ptr<const PointCloudGeometryHandlerSurfaceNormal<PointT> >;
/** \brief Constructor. */
PointCloudGeometryHandlerSurfaceNormal (const PointCloudConstPtr &cloud);
/** \brief Class getName method. */
virtual std::string
getName () const { return ("PointCloudGeometryHandlerSurfaceNormal"); }
/** \brief Get the name of the field used. */
virtual std::string
getFieldName () const { return ("normal_xyz"); }
/** \brief Obtain the actual point geometry for the input dataset in VTK format.
* \param[out] points the resultant geometry
*/
virtual void
getGeometry (vtkSmartPointer<vtkPoints> &points) const;
private:
// Members derived from the base class
using PointCloudGeometryHandler<PointT>::cloud_;
using PointCloudGeometryHandler<PointT>::capable_;
using PointCloudGeometryHandler<PointT>::field_x_idx_;
using PointCloudGeometryHandler<PointT>::field_y_idx_;
using PointCloudGeometryHandler<PointT>::field_z_idx_;
using PointCloudGeometryHandler<PointT>::fields_;
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief Custom handler class for PointCloud geometry. Given an input dataset and
* three user defined fields, all data present in them is extracted and displayed on
* screen as XYZ data.
* \author Radu B. Rusu
* \ingroup visualization
*/
template <typename PointT>
class PointCloudGeometryHandlerCustom : public PointCloudGeometryHandler<PointT>
{
public:
using PointCloud = typename PointCloudGeometryHandler<PointT>::PointCloud;
using PointCloudPtr = typename PointCloud::Ptr;
using PointCloudConstPtr = typename PointCloud::ConstPtr;
using Ptr = shared_ptr<PointCloudGeometryHandlerCustom<PointT> >;
using ConstPtr = shared_ptr<const PointCloudGeometryHandlerCustom<PointT> >;
/** \brief Constructor. */
PointCloudGeometryHandlerCustom (const PointCloudConstPtr &cloud,
const std::string &x_field_name,
const std::string &y_field_name,
const std::string &z_field_name)
: pcl::visualization::PointCloudGeometryHandler<PointT>::PointCloudGeometryHandler (cloud)
{
field_x_idx_ = pcl::getFieldIndex<PointT> (x_field_name, fields_);
if (field_x_idx_ == -1)
return;
field_y_idx_ = pcl::getFieldIndex<PointT> (y_field_name, fields_);
if (field_y_idx_ == -1)
return;
field_z_idx_ = pcl::getFieldIndex<PointT> (z_field_name, fields_);
if (field_z_idx_ == -1)
return;
field_name_ = x_field_name + y_field_name + z_field_name;
capable_ = true;
}
/** \brief Class getName method. */
virtual std::string
getName () const { return ("PointCloudGeometryHandlerCustom"); }
/** \brief Get the name of the field used. */
virtual std::string
getFieldName () const { return (field_name_); }
/** \brief Obtain the actual point geometry for the input dataset in VTK format.
* \param[out] points the resultant geometry
*/
virtual void
getGeometry (vtkSmartPointer<vtkPoints> &points) const
{
if (!capable_)
return;
if (!points)
points = vtkSmartPointer<vtkPoints>::New ();
points->SetDataTypeToFloat ();
points->SetNumberOfPoints (cloud_->points.size ());
float data;
// Add all points
double p[3];
for (vtkIdType i = 0; i < static_cast<vtkIdType> (cloud_->points.size ()); ++i)
{
// Copy the value at the specified field
const std::uint8_t* pt_data = reinterpret_cast<const std::uint8_t*> (&cloud_->points[i]);
memcpy (&data, pt_data + fields_[field_x_idx_].offset, sizeof (float));
p[0] = data;
memcpy (&data, pt_data + fields_[field_y_idx_].offset, sizeof (float));
p[1] = data;
memcpy (&data, pt_data + fields_[field_z_idx_].offset, sizeof (float));
p[2] = data;
points->SetPoint (i, p);
}
}
private:
// Members derived from the base class
using PointCloudGeometryHandler<PointT>::cloud_;
using PointCloudGeometryHandler<PointT>::capable_;
using PointCloudGeometryHandler<PointT>::field_x_idx_;
using PointCloudGeometryHandler<PointT>::field_y_idx_;
using PointCloudGeometryHandler<PointT>::field_z_idx_;
using PointCloudGeometryHandler<PointT>::fields_;
/** \brief Name of the field used to create the geometry handler. */
std::string field_name_;
};
///////////////////////////////////////////////////////////////////////////////////////
/** \brief Base handler class for PointCloud geometry.
* \author Radu B. Rusu
* \ingroup visualization
*/
template <>
class PCL_EXPORTS PointCloudGeometryHandler<pcl::PCLPointCloud2>
{
public:
using PointCloud = pcl::PCLPointCloud2;
using PointCloudPtr = PointCloud::Ptr;
using PointCloudConstPtr = PointCloud::ConstPtr;
using Ptr = shared_ptr<PointCloudGeometryHandler<PointCloud> >;
using ConstPtr = shared_ptr<const PointCloudGeometryHandler<PointCloud> >;
/** \brief Constructor. */
PointCloudGeometryHandler (const PointCloudConstPtr &cloud, const Eigen::Vector4f & = Eigen::Vector4f::Zero ())
: cloud_ (cloud)
, capable_ (false)
, field_x_idx_ (-1)
, field_y_idx_ (-1)
, field_z_idx_ (-1)
, fields_ (cloud_->fields)
{
}
/** \brief Destructor. */
virtual ~PointCloudGeometryHandler () {}
/** \brief Abstract getName method. */
virtual std::string
getName () const = 0;
/** \brief Abstract getFieldName method. */
virtual std::string
getFieldName () const = 0;
/** \brief Check if this handler is capable of handling the input data or not. */
inline bool
isCapable () const { return (capable_); }
/** \brief Obtain the actual point geometry for the input dataset in VTK format.
* \param[out] points the resultant geometry
*/
virtual void
getGeometry (vtkSmartPointer<vtkPoints> &points) const;
/** \brief Set the input cloud to be used.
* \param[in] cloud the input cloud to be used by the handler
*/
void
setInputCloud (const PointCloudConstPtr &cloud)
{
cloud_ = cloud;
}
protected:
/** \brief A pointer to the input dataset. */
PointCloudConstPtr cloud_;
/** \brief True if this handler is capable of handling the input data, false
* otherwise.
*/
bool capable_;
/** \brief The index of the field holding the X data. */
int field_x_idx_;
/** \brief The index of the field holding the Y data. */
int field_y_idx_;
/** \brief The index of the field holding the Z data. */
int field_z_idx_;
/** \brief The list of fields available for this PointCloud. */
std::vector<pcl::PCLPointField> fields_;
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief XYZ handler class for PointCloud geometry. Given an input dataset, all XYZ
* data present in fields "x", "y", and "z" is extracted and displayed on screen.
* \author Radu B. Rusu
* \ingroup visualization
*/
template <>
class PCL_EXPORTS PointCloudGeometryHandlerXYZ<pcl::PCLPointCloud2> : public PointCloudGeometryHandler<pcl::PCLPointCloud2>
{
public:
using PointCloud = PointCloudGeometryHandler<pcl::PCLPointCloud2>::PointCloud;
using PointCloudPtr = PointCloud::Ptr;
using PointCloudConstPtr = PointCloud::ConstPtr;
using Ptr = shared_ptr<PointCloudGeometryHandlerXYZ<PointCloud> >;
using ConstPtr = shared_ptr<const PointCloudGeometryHandlerXYZ<PointCloud> >;
/** \brief Constructor. */
PointCloudGeometryHandlerXYZ (const PointCloudConstPtr &cloud);
/** \brief Destructor. */
virtual ~PointCloudGeometryHandlerXYZ () {}
/** \brief Class getName method. */
virtual std::string
getName () const { return ("PointCloudGeometryHandlerXYZ"); }
/** \brief Get the name of the field used. */
virtual std::string
getFieldName () const { return ("xyz"); }
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief Surface normal handler class for PointCloud geometry. Given an input
* dataset, all data present in fields "normal_x", "normal_y", and "normal_z" is
* extracted and displayed on screen as XYZ data.
* \author Radu B. Rusu
* \ingroup visualization
*/
template <>
class PCL_EXPORTS PointCloudGeometryHandlerSurfaceNormal<pcl::PCLPointCloud2> : public PointCloudGeometryHandler<pcl::PCLPointCloud2>
{
public:
using PointCloud = PointCloudGeometryHandler<pcl::PCLPointCloud2>::PointCloud;
using PointCloudPtr = PointCloud::Ptr;
using PointCloudConstPtr = PointCloud::ConstPtr;
using Ptr = shared_ptr<PointCloudGeometryHandlerSurfaceNormal<PointCloud> >;
using ConstPtr = shared_ptr<const PointCloudGeometryHandlerSurfaceNormal<PointCloud> >;
/** \brief Constructor. */
PointCloudGeometryHandlerSurfaceNormal (const PointCloudConstPtr &cloud);
/** \brief Class getName method. */
virtual std::string
getName () const { return ("PointCloudGeometryHandlerSurfaceNormal"); }
/** \brief Get the name of the field used. */
virtual std::string
getFieldName () const { return ("normal_xyz"); }
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief Custom handler class for PointCloud geometry. Given an input dataset and
* three user defined fields, all data present in them is extracted and displayed on
* screen as XYZ data.
* \author Radu B. Rusu
* \ingroup visualization
*/
template <>
class PCL_EXPORTS PointCloudGeometryHandlerCustom<pcl::PCLPointCloud2> : public PointCloudGeometryHandler<pcl::PCLPointCloud2>
{
public:
using PointCloud = PointCloudGeometryHandler<pcl::PCLPointCloud2>::PointCloud;
using PointCloudPtr = PointCloud::Ptr;
using PointCloudConstPtr = PointCloud::ConstPtr;
/** \brief Constructor. */
PointCloudGeometryHandlerCustom (const PointCloudConstPtr &cloud,
const std::string &x_field_name,
const std::string &y_field_name,
const std::string &z_field_name);
/** \brief Destructor. */
virtual ~PointCloudGeometryHandlerCustom () {}
/** \brief Class getName method. */
virtual std::string
getName () const { return ("PointCloudGeometryHandlerCustom"); }
/** \brief Get the name of the field used. */
virtual std::string
getFieldName () const { return (field_name_); }
private:
/** \brief Name of the field used to create the geometry handler. */
std::string field_name_;
};
}
}
#ifdef PCL_NO_PRECOMPILE
#include <pcl/visualization/impl/point_cloud_geometry_handlers.hpp>
#endif
pcl::visualization::PointCloudGeometryHandler::fields_
std::vector< pcl::PCLPointField > fields_
The list of fields available for this PointCloud.
Definition: point_cloud_geometry_handlers.h:129
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::capable_
bool capable_
True if this handler is capable of handling the input data, false otherwise.
Definition: point_cloud_geometry_handlers.h:381
pcl::visualization::PointCloudGeometryHandler::setInputCloud
void setInputCloud(const PointCloudConstPtr &cloud)
Set the input cloud to be used.
Definition: point_cloud_geometry_handlers.h:105
pcl
This file defines compatibility wrappers for low level I/O functions.
Definition: convolution.h:45
pcl::visualization::PointCloudGeometryHandler::getFieldName
virtual std::string getFieldName() const =0
Abstract getFieldName method.
pcl::visualization::PointCloudGeometryHandlerXYZ::PointCloudGeometryHandlerXYZ
PointCloudGeometryHandlerXYZ(const PointCloudConstPtr &cloud)
Constructor.
Definition: point_cloud_geometry_handlers.hpp:46
pcl::visualization::PointCloudGeometryHandler::getName
virtual std::string getName() const =0
Abstract getName method.
pcl::visualization::PointCloudGeometryHandlerCustom::PointCloudGeometryHandlerCustom
PointCloudGeometryHandlerCustom(const PointCloudConstPtr &cloud, const std::string &x_field_name, const std::string &y_field_name, const std::string &z_field_name)
Constructor.
Definition: point_cloud_geometry_handlers.h:243
pcl::visualization::PointCloudGeometryHandlerXYZ< pcl::PCLPointCloud2 >::getName
virtual std::string getName() const
Class getName method.
Definition: point_cloud_geometry_handlers.h:421
pcl::visualization::PointCloudGeometryHandlerCustom< pcl::PCLPointCloud2 >::~PointCloudGeometryHandlerCustom
virtual ~PointCloudGeometryHandlerCustom()
Destructor.
Definition: point_cloud_geometry_handlers.h:480
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::PointCloudGeometryHandler
PointCloudGeometryHandler(const PointCloudConstPtr &cloud, const Eigen::Vector4f &=Eigen::Vector4f::Zero())
Constructor.
Definition: point_cloud_geometry_handlers.h:334
pcl::visualization::PointCloudGeometryHandlerCustom< pcl::PCLPointCloud2 >::getName
virtual std::string getName() const
Class getName method.
Definition: point_cloud_geometry_handlers.h:484
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::field_y_idx_
int field_y_idx_
The index of the field holding the Y data.
Definition: point_cloud_geometry_handlers.h:387
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal::getName
virtual std::string getName() const
Class getName method.
Definition: point_cloud_geometry_handlers.h:202
pcl::visualization::PointCloudGeometryHandlerXYZ::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_geometry_handlers.h:161
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::~PointCloudGeometryHandler
virtual ~PointCloudGeometryHandler()
Destructor.
Definition: point_cloud_geometry_handlers.h:345
pcl::visualization::PointCloudGeometryHandler::PointCloudGeometryHandler
PointCloudGeometryHandler(const PointCloudConstPtr &cloud)
Constructor.
Definition: point_cloud_geometry_handlers.h:72
pcl::visualization::PointCloudGeometryHandlerXYZ::getGeometry
virtual void getGeometry(vtkSmartPointer< vtkPoints > &points) const
Obtain the actual point geometry for the input dataset in VTK format.
Definition: point_cloud_geometry_handlers.hpp:63
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::field_x_idx_
int field_x_idx_
The index of the field holding the X data.
Definition: point_cloud_geometry_handlers.h:384
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal< pcl::PCLPointCloud2 >::getName
virtual std::string getName() const
Class getName method.
Definition: point_cloud_geometry_handlers.h:451
pcl::PointCloud
PointCloud represents the base class in PCL for storing collections of 3D points.
Definition: projection_matrix.h:52
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal< pcl::PCLPointCloud2 >::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_geometry_handlers.h:455
pcl::visualization::PointCloudGeometryHandler::field_y_idx_
int field_y_idx_
The index of the field holding the Y data.
Definition: point_cloud_geometry_handlers.h:123
pcl::visualization::PointCloudGeometryHandlerXYZ::getName
virtual std::string getName() const
Class getName method.
Definition: point_cloud_geometry_handlers.h:157
pcl::PointXYZRGB
A point structure representing Euclidean xyz coordinates, and the RGB color.
Definition: point_types.hpp:623
pcl::visualization::PointCloudGeometryHandler::Ptr
shared_ptr< PointCloudGeometryHandler< PointT > > Ptr
Definition: point_cloud_geometry_handlers.h:68
pcl::visualization::PointCloudGeometryHandlerCustom
Custom handler class for PointCloud geometry.
Definition: point_cloud_geometry_handlers.h:232
pcl::visualization::PointCloudGeometryHandlerXYZ< pcl::PCLPointCloud2 >::~PointCloudGeometryHandlerXYZ
virtual ~PointCloudGeometryHandlerXYZ()
Destructor.
Definition: point_cloud_geometry_handlers.h:417
pcl::visualization::PointCloudGeometryHandlerCustom< pcl::PCLPointCloud2 >::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_geometry_handlers.h:488
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::fields_
std::vector< pcl::PCLPointField > fields_
The list of fields available for this PointCloud.
Definition: point_cloud_geometry_handlers.h:393
pcl::visualization::PointCloudGeometryHandler::PointCloudConstPtr
typename PointCloud::ConstPtr PointCloudConstPtr
Definition: point_cloud_geometry_handlers.h:66
pcl::visualization::PointCloudGeometryHandlerCustom::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_geometry_handlers.h:268
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::PointCloudConstPtr
PointCloud::ConstPtr PointCloudConstPtr
Definition: point_cloud_geometry_handlers.h:328
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::setInputCloud
void setInputCloud(const PointCloudConstPtr &cloud)
Set the input cloud to be used.
Definition: point_cloud_geometry_handlers.h:369
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal::getGeometry
virtual void getGeometry(vtkSmartPointer< vtkPoints > &points) const
Obtain the actual point geometry for the input dataset in VTK format.
Definition: point_cloud_geometry_handlers.hpp:131
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::PointCloudPtr
PointCloud::Ptr PointCloudPtr
Definition: point_cloud_geometry_handlers.h:327
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::Ptr
shared_ptr< PointCloudGeometryHandler< PointCloud > > Ptr
Definition: point_cloud_geometry_handlers.h:330
pcl::visualization::PointCloudGeometryHandler::ConstPtr
shared_ptr< const PointCloudGeometryHandler< PointT > > ConstPtr
Definition: point_cloud_geometry_handlers.h:69
pcl::visualization::PointCloudGeometryHandler::isCapable
bool isCapable() const
Checl if this handler is capable of handling the input data or not.
Definition: point_cloud_geometry_handlers.h:93
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_geometry_handlers.h:206
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::ConstPtr
shared_ptr< const PointCloudGeometryHandler< PointCloud > > ConstPtr
Definition: point_cloud_geometry_handlers.h:331
pcl::visualization::PointCloudGeometryHandler::field_z_idx_
int field_z_idx_
The index of the field holding the Z data.
Definition: point_cloud_geometry_handlers.h:126
pcl::PCLPointCloud2
Definition: PCLPointCloud2.h:19
pcl::visualization::PointCloudGeometryHandlerXYZ< pcl::PCLPointCloud2 >::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_geometry_handlers.h:425
pcl::visualization::PointCloudGeometryHandler::cloud_
PointCloudConstPtr cloud_
A pointer to the input dataset.
Definition: point_cloud_geometry_handlers.h:112
pcl::PointCloud::Ptr
shared_ptr< PointCloud< PointT > > Ptr
Definition: point_cloud.h:415
pcl::visualization::PointCloudGeometryHandlerCustom::getGeometry
virtual void getGeometry(vtkSmartPointer< vtkPoints > &points) const
Obtain the actual point geometry for the input dataset in VTK format.
Definition: point_cloud_geometry_handlers.h:274
pcl::visualization::PointCloudGeometryHandlerXYZ::~PointCloudGeometryHandlerXYZ
virtual ~PointCloudGeometryHandlerXYZ()
Destructor.
Definition: point_cloud_geometry_handlers.h:153
pcl::visualization::PointCloudGeometryHandler::field_x_idx_
int field_x_idx_
The index of the field holding the X data.
Definition: point_cloud_geometry_handlers.h:120
pcl::uint8_t
std::uint8_t uint8_t
Definition: pcl_macros.h:92
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal::PointCloudGeometryHandlerSurfaceNormal
PointCloudGeometryHandlerSurfaceNormal(const PointCloudConstPtr &cloud)
Constructor.
Definition: point_cloud_geometry_handlers.hpp:114
pcl::PointCloud::ConstPtr
shared_ptr< const PointCloud< PointT > > ConstPtr
Definition: point_cloud.h:416
pcl::visualization::PointCloudGeometryHandler::~PointCloudGeometryHandler
virtual ~PointCloudGeometryHandler()
Destructor.
Definition: point_cloud_geometry_handlers.h:79
pcl::visualization::PointCloudGeometryHandler::PointCloudPtr
typename PointCloud::Ptr PointCloudPtr
Definition: point_cloud_geometry_handlers.h:65
pcl::visualization::PointCloudGeometryHandler
Base handler class for PointCloud geometry.
Definition: point_cloud_geometry_handlers.h:61
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::field_z_idx_
int field_z_idx_
The index of the field holding the Z data.
Definition: point_cloud_geometry_handlers.h:390
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::isCapable
bool isCapable() const
Check if this handler is capable of handling the input data or not.
Definition: point_cloud_geometry_handlers.h:357
pcl::visualization::PointCloudGeometryHandlerXYZ
XYZ handler class for PointCloud geometry.
Definition: point_cloud_geometry_handlers.h:139
pcl::visualization::PointCloudGeometryHandler::capable_
bool capable_
True if this handler is capable of handling the input data, false otherwise.
Definition: point_cloud_geometry_handlers.h:117
pcl::visualization::PointCloudGeometryHandlerCustom::getName
virtual std::string getName() const
Class getName method.
Definition: point_cloud_geometry_handlers.h:264
PCL_EXPORTS
#define PCL_EXPORTS
Definition: pcl_macros.h:253
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::cloud_
PointCloudConstPtr cloud_
A pointer to the input dataset.
Definition: point_cloud_geometry_handlers.h:376
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal
Surface normal handler class for PointCloud geometry.
Definition: point_cloud_geometry_handlers.h:187
vtkSmartPointer
Definition: actor_map.h:51
pcl::shared_ptr
boost::shared_ptr< T > shared_ptr
Alias for boost::shared_ptr.
Definition: pcl_macros.h:90
pcl::visualization::PointCloudGeometryHandler::getGeometry
virtual void getGeometry(vtkSmartPointer< vtkPoints > &points) const =0
Obtain the actual point geometry for the input dataset in VTK format.