Loading...
Searching...
No Matches
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/pcl_base.h> // for UNAVAILABLE
#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_ (UNAVAILABLE), field_y_idx_ (UNAVAILABLE), field_z_idx_ (UNAVAILABLE),
fields_ ()
{}
/** \brief Destructor. */
virtual ~PointCloudGeometryHandler() = default;
/** \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 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 = 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. */
index_t field_x_idx_;
/** \brief The index of the field holding the Y data. */
index_t field_y_idx_;
/** \brief The index of the field holding the Z data. */
index_t 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 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_ == UNAVAILABLE)
return;
field_y_idx_ = pcl::getFieldIndex<PointT> (y_field_name, fields_);
if (field_y_idx_ == UNAVAILABLE)
return;
field_z_idx_ = pcl::getFieldIndex<PointT> (z_field_name, fields_);
if (field_z_idx_ == UNAVAILABLE)
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_->size ());
float data;
// Add all points
double p[3];
for (vtkIdType i = 0; i < static_cast<vtkIdType> (cloud_->size ()); ++i)
{
// Copy the value at the specified field
const std::uint8_t* pt_data = reinterpret_cast<const std::uint8_t*> (&(*cloud_)[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_ (UNAVAILABLE)
, field_y_idx_ (UNAVAILABLE)
, field_z_idx_ (UNAVAILABLE)
, fields_ (cloud_->fields)
{
}
/** \brief Destructor. */
virtual ~PointCloudGeometryHandler() = default;
/** \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. */
index_t field_x_idx_;
/** \brief The index of the field holding the Y data. */
index_t field_y_idx_;
/** \brief The index of the field holding the Z data. */
index_t 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 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 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::PointCloud
PointCloud represents the base class in PCL for storing collections of 3D points.
Definition point_cloud.h:173
pcl::PointCloud::Ptr
shared_ptr< PointCloud< PointT > > Ptr
Definition point_cloud.h:413
pcl::PointCloud::ConstPtr
shared_ptr< const PointCloud< PointT > > ConstPtr
Definition point_cloud.h:414
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::~PointCloudGeometryHandler
virtual ~PointCloudGeometryHandler()=default
Destructor.
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::getName
virtual std::string getName() const =0
Abstract getName method.
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::Ptr
shared_ptr< PointCloudGeometryHandler< PointCloud > > Ptr
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:367
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::ConstPtr
shared_ptr< const PointCloudGeometryHandler< PointCloud > > ConstPtr
Definition point_cloud_geometry_handlers.h:329
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::PointCloudPtr
PointCloud::Ptr PointCloudPtr
Definition point_cloud_geometry_handlers.h:325
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::cloud_
PointCloudConstPtr cloud_
A pointer to the input dataset.
Definition point_cloud_geometry_handlers.h:374
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::getGeometry
virtual void getGeometry(vtkSmartPointer< vtkPoints > &points) const
Obtain the actual point geometry for the input dataset in VTK format.
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:355
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::field_z_idx_
index_t field_z_idx_
The index of the field holding the Z data.
Definition point_cloud_geometry_handlers.h:388
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:379
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::PointCloudConstPtr
PointCloud::ConstPtr PointCloudConstPtr
Definition point_cloud_geometry_handlers.h:326
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:391
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::field_y_idx_
index_t field_y_idx_
The index of the field holding the Y data.
Definition point_cloud_geometry_handlers.h:385
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::PointCloudGeometryHandler
PointCloudGeometryHandler(const PointCloudConstPtr &cloud, const Eigen::Vector4f &=Eigen::Vector4f::Zero())
Constructor.
Definition point_cloud_geometry_handlers.h:332
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::field_x_idx_
index_t field_x_idx_
The index of the field holding the X data.
Definition point_cloud_geometry_handlers.h:382
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::getFieldName
virtual std::string getFieldName() const =0
Abstract getFieldName method.
pcl::visualization::PointCloudGeometryHandlerCustom< pcl::PCLPointCloud2 >::PointCloud
PointCloudGeometryHandler< pcl::PCLPointCloud2 >::PointCloud PointCloud
Definition point_cloud_geometry_handlers.h:464
pcl::visualization::PointCloudGeometryHandlerCustom< pcl::PCLPointCloud2 >::getName
virtual std::string getName() const
Class getName method.
Definition point_cloud_geometry_handlers.h:476
pcl::visualization::PointCloudGeometryHandlerCustom< pcl::PCLPointCloud2 >::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition point_cloud_geometry_handlers.h:480
pcl::visualization::PointCloudGeometryHandlerCustom< pcl::PCLPointCloud2 >::PointCloudPtr
PointCloud::Ptr PointCloudPtr
Definition point_cloud_geometry_handlers.h:465
pcl::visualization::PointCloudGeometryHandlerCustom< pcl::PCLPointCloud2 >::PointCloudConstPtr
PointCloud::ConstPtr PointCloudConstPtr
Definition point_cloud_geometry_handlers.h:466
pcl::visualization::PointCloudGeometryHandlerCustom< pcl::PCLPointCloud2 >::PointCloudGeometryHandlerCustom
PointCloudGeometryHandlerCustom(const PointCloudConstPtr &cloud, const std::string &x_field_name, const std::string &y_field_name, const std::string &z_field_name)
Constructor.
pcl::visualization::PointCloudGeometryHandlerCustom
Custom handler class for PointCloud geometry.
Definition point_cloud_geometry_handlers.h:231
pcl::visualization::PointCloudGeometryHandlerCustom::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition point_cloud_geometry_handlers.h:266
pcl::visualization::PointCloudGeometryHandlerCustom::PointCloud
typename PointCloudGeometryHandler< PointT >::PointCloud PointCloud
Definition point_cloud_geometry_handlers.h:233
pcl::visualization::PointCloudGeometryHandlerCustom::PointCloudPtr
typename PointCloud::Ptr PointCloudPtr
Definition point_cloud_geometry_handlers.h:234
pcl::visualization::PointCloudGeometryHandlerCustom::Ptr
shared_ptr< PointCloudGeometryHandlerCustom< PointT > > Ptr
Definition point_cloud_geometry_handlers.h:237
pcl::visualization::PointCloudGeometryHandlerCustom::ConstPtr
shared_ptr< const PointCloudGeometryHandlerCustom< PointT > > ConstPtr
Definition point_cloud_geometry_handlers.h:238
pcl::visualization::PointCloudGeometryHandlerCustom::getName
virtual std::string getName() const
Class getName method.
Definition point_cloud_geometry_handlers.h:262
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:272
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:241
pcl::visualization::PointCloudGeometryHandlerCustom::PointCloudConstPtr
typename PointCloud::ConstPtr PointCloudConstPtr
Definition point_cloud_geometry_handlers.h:235
pcl::visualization::PointCloudGeometryHandler
Base handler class for PointCloud geometry.
Definition point_cloud_geometry_handlers.h:63
pcl::visualization::PointCloudGeometryHandler::fields_
std::vector< pcl::PCLPointField > fields_
The list of fields available for this PointCloud.
Definition point_cloud_geometry_handlers.h:130
pcl::visualization::PointCloudGeometryHandler::field_y_idx_
index_t field_y_idx_
The index of the field holding the Y data.
Definition point_cloud_geometry_handlers.h:124
pcl::visualization::PointCloudGeometryHandler::getName
virtual std::string getName() const =0
Abstract getName method.
pcl::visualization::PointCloudGeometryHandler::isCapable
bool isCapable() const
Check if this handler is capable of handling the input data or not.
Definition point_cloud_geometry_handlers.h:94
pcl::visualization::PointCloudGeometryHandler::field_z_idx_
index_t field_z_idx_
The index of the field holding the Z data.
Definition point_cloud_geometry_handlers.h:127
pcl::visualization::PointCloudGeometryHandler::ConstPtr
shared_ptr< const PointCloudGeometryHandler< PointT > > ConstPtr
Definition point_cloud_geometry_handlers.h:70
pcl::visualization::PointCloudGeometryHandler::PointCloudGeometryHandler
PointCloudGeometryHandler(const PointCloudConstPtr &cloud)
Constructor.
Definition point_cloud_geometry_handlers.h:73
pcl::visualization::PointCloudGeometryHandler::PointCloudPtr
typename PointCloud::Ptr PointCloudPtr
Definition point_cloud_geometry_handlers.h:66
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:118
pcl::visualization::PointCloudGeometryHandler::PointCloudConstPtr
typename PointCloud::ConstPtr PointCloudConstPtr
Definition point_cloud_geometry_handlers.h:67
pcl::visualization::PointCloudGeometryHandler::setInputCloud
void setInputCloud(const PointCloudConstPtr &cloud)
Set the input cloud to be used.
Definition point_cloud_geometry_handlers.h:106
pcl::visualization::PointCloudGeometryHandler::PointCloud
pcl::PointCloud< PointT > PointCloud
Definition point_cloud_geometry_handlers.h:65
pcl::visualization::PointCloudGeometryHandler::cloud_
PointCloudConstPtr cloud_
A pointer to the input dataset.
Definition point_cloud_geometry_handlers.h:113
pcl::visualization::PointCloudGeometryHandler::getFieldName
virtual std::string getFieldName() const =0
Abstract getFieldName method.
pcl::visualization::PointCloudGeometryHandler::getGeometry
virtual void getGeometry(vtkSmartPointer< vtkPoints > &points) const =0
Obtain the actual point geometry for the input dataset in VTK format.
pcl::visualization::PointCloudGeometryHandler::~PointCloudGeometryHandler
virtual ~PointCloudGeometryHandler()=default
Destructor.
pcl::visualization::PointCloudGeometryHandler::Ptr
shared_ptr< PointCloudGeometryHandler< PointT > > Ptr
Definition point_cloud_geometry_handlers.h:69
pcl::visualization::PointCloudGeometryHandler::field_x_idx_
index_t field_x_idx_
The index of the field holding the X data.
Definition point_cloud_geometry_handlers.h:121
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal< pcl::PCLPointCloud2 >::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition point_cloud_geometry_handlers.h:450
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal< pcl::PCLPointCloud2 >::Ptr
shared_ptr< PointCloudGeometryHandlerSurfaceNormal< PointCloud > > Ptr
Definition point_cloud_geometry_handlers.h:438
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal< pcl::PCLPointCloud2 >::PointCloudGeometryHandlerSurfaceNormal
PointCloudGeometryHandlerSurfaceNormal(const PointCloudConstPtr &cloud)
Constructor.
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal< pcl::PCLPointCloud2 >::PointCloudConstPtr
PointCloud::ConstPtr PointCloudConstPtr
Definition point_cloud_geometry_handlers.h:436
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal< pcl::PCLPointCloud2 >::getName
virtual std::string getName() const
Class getName method.
Definition point_cloud_geometry_handlers.h:446
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal< pcl::PCLPointCloud2 >::ConstPtr
shared_ptr< const PointCloudGeometryHandlerSurfaceNormal< PointCloud > > ConstPtr
Definition point_cloud_geometry_handlers.h:439
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal< pcl::PCLPointCloud2 >::PointCloud
PointCloudGeometryHandler< pcl::PCLPointCloud2 >::PointCloud PointCloud
Definition point_cloud_geometry_handlers.h:434
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal< pcl::PCLPointCloud2 >::PointCloudPtr
PointCloud::Ptr PointCloudPtr
Definition point_cloud_geometry_handlers.h:435
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal
Surface normal handler class for PointCloud geometry.
Definition point_cloud_geometry_handlers.h:186
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal::Ptr
shared_ptr< PointCloudGeometryHandlerSurfaceNormal< PointT > > Ptr
Definition point_cloud_geometry_handlers.h:192
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal::PointCloudPtr
typename PointCloud::Ptr PointCloudPtr
Definition point_cloud_geometry_handlers.h:189
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal::PointCloud
typename PointCloudGeometryHandler< PointT >::PointCloud PointCloud
Definition point_cloud_geometry_handlers.h:188
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition point_cloud_geometry_handlers.h:204
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:138
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal::ConstPtr
shared_ptr< const PointCloudGeometryHandlerSurfaceNormal< PointT > > ConstPtr
Definition point_cloud_geometry_handlers.h:193
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal::getName
virtual std::string getName() const
Class getName method.
Definition point_cloud_geometry_handlers.h:200
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal::PointCloudConstPtr
typename PointCloud::ConstPtr PointCloudConstPtr
Definition point_cloud_geometry_handlers.h:190
pcl::visualization::PointCloudGeometryHandlerXYZ< pcl::PCLPointCloud2 >::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition point_cloud_geometry_handlers.h:420
pcl::visualization::PointCloudGeometryHandlerXYZ< pcl::PCLPointCloud2 >::PointCloudConstPtr
PointCloud::ConstPtr PointCloudConstPtr
Definition point_cloud_geometry_handlers.h:406
pcl::visualization::PointCloudGeometryHandlerXYZ< pcl::PCLPointCloud2 >::ConstPtr
shared_ptr< const PointCloudGeometryHandlerXYZ< PointCloud > > ConstPtr
Definition point_cloud_geometry_handlers.h:409
pcl::visualization::PointCloudGeometryHandlerXYZ< pcl::PCLPointCloud2 >::PointCloudGeometryHandlerXYZ
PointCloudGeometryHandlerXYZ(const PointCloudConstPtr &cloud)
Constructor.
pcl::visualization::PointCloudGeometryHandlerXYZ< pcl::PCLPointCloud2 >::getName
virtual std::string getName() const
Class getName method.
Definition point_cloud_geometry_handlers.h:416
pcl::visualization::PointCloudGeometryHandlerXYZ< pcl::PCLPointCloud2 >::PointCloud
PointCloudGeometryHandler< pcl::PCLPointCloud2 >::PointCloud PointCloud
Definition point_cloud_geometry_handlers.h:404
pcl::visualization::PointCloudGeometryHandlerXYZ< pcl::PCLPointCloud2 >::PointCloudPtr
PointCloud::Ptr PointCloudPtr
Definition point_cloud_geometry_handlers.h:405
pcl::visualization::PointCloudGeometryHandlerXYZ< pcl::PCLPointCloud2 >::Ptr
shared_ptr< PointCloudGeometryHandlerXYZ< PointCloud > > Ptr
Definition point_cloud_geometry_handlers.h:408
pcl::visualization::PointCloudGeometryHandlerXYZ
XYZ handler class for PointCloud geometry.
Definition point_cloud_geometry_handlers.h:141
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:70
pcl::visualization::PointCloudGeometryHandlerXYZ::PointCloudPtr
typename PointCloud::Ptr PointCloudPtr
Definition point_cloud_geometry_handlers.h:144
pcl::visualization::PointCloudGeometryHandlerXYZ::PointCloud
typename PointCloudGeometryHandler< PointT >::PointCloud PointCloud
Definition point_cloud_geometry_handlers.h:143
pcl::visualization::PointCloudGeometryHandlerXYZ::PointCloudConstPtr
typename PointCloud::ConstPtr PointCloudConstPtr
Definition point_cloud_geometry_handlers.h:145
pcl::visualization::PointCloudGeometryHandlerXYZ::ConstPtr
shared_ptr< const PointCloudGeometryHandlerXYZ< PointT > > ConstPtr
Definition point_cloud_geometry_handlers.h:148
pcl::visualization::PointCloudGeometryHandlerXYZ::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition point_cloud_geometry_handlers.h:159
pcl::visualization::PointCloudGeometryHandlerXYZ::Ptr
shared_ptr< PointCloudGeometryHandlerXYZ< PointT > > Ptr
Definition point_cloud_geometry_handlers.h:147
pcl::visualization::PointCloudGeometryHandlerXYZ::getName
virtual std::string getName() const
Class getName method.
Definition point_cloud_geometry_handlers.h:155
vtkSmartPointer
Definition actor_map.h:51
pcl
Definition convolution.h:46
pcl::UNAVAILABLE
static constexpr index_t UNAVAILABLE
Definition pcl_base.h:62
pcl::index_t
detail::int_type_t< detail::index_type_size, detail::index_type_signed > index_t
Type used for an index in PCL.
Definition types.h:112
pcl::PCLPointCloud2
Definition PCLPointCloud2.h:17
pcl::PointXYZRGB
A point structure representing Euclidean xyz coordinates, and the RGB color.
Definition point_types.hpp:594