point_cloud_color_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.
*
*/
#ifndef PCL_POINT_CLOUD_COLOR_HANDLERS_H_
#define PCL_POINT_CLOUD_COLOR_HANDLERS_H_
#if defined __GNUC__
#pragma GCC system_header
#endif
// PCL includes
#include <pcl/point_cloud.h>
#include <pcl/common/io.h>
#include <pcl/visualization/common/common.h>
// VTK includes
#include <vtkSmartPointer.h>
#include <vtkDataArray.h>
#include <vtkFloatArray.h>
#include <vtkUnsignedCharArray.h>
namespace pcl
{
namespace visualization
{
//////////////////////////////////////////////////////////////////////////////////////
/** \brief Base Handler class for PointCloud colors.
* \author Radu B. Rusu
* \ingroup visualization
*/
template <typename PointT>
class PointCloudColorHandler
{
public:
typedef pcl::PointCloud<PointT> PointCloud;
typedef typename PointCloud::Ptr PointCloudPtr;
typedef typename PointCloud::ConstPtr PointCloudConstPtr;
typedef boost::shared_ptr<PointCloudColorHandler<PointT> > Ptr;
typedef boost::shared_ptr<const PointCloudColorHandler<PointT> > ConstPtr;
/** \brief Constructor. */
PointCloudColorHandler () :
cloud_ (), capable_ (false), field_idx_ (-1), fields_ ()
{}
/** \brief Constructor. */
PointCloudColorHandler (const PointCloudConstPtr &cloud) :
cloud_ (cloud), capable_ (false), field_idx_ (-1), fields_ ()
{}
/** \brief Destructor. */
virtual ~PointCloudColorHandler () {}
/** \brief Check if this handler is capable of handling the input data or not. */
inline bool
isCapable () const { return (capable_); }
/** \brief Abstract getName method. */
virtual std::string
getName () const = 0;
/** \brief Abstract getFieldName method. */
virtual std::string
getFieldName () const = 0;
/** \brief Obtain the actual color for the input dataset as vtk scalars.
* \param[out] scalars the output scalars containing the color for the dataset
* \return true if the operation was successful (the handler is capable and
* the input cloud was given as a valid pointer), false otherwise
*/
virtual bool
getColor (vtkSmartPointer<vtkDataArray> &scalars) const = 0;
/** \brief Set the input cloud to be used.
* \param[in] cloud the input cloud to be used by the handler
*/
virtual 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 data that represents the color. */
int field_idx_;
/** \brief The list of fields available for this PointCloud. */
std::vector<pcl::PCLPointField> fields_;
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief Handler for random PointCloud colors (i.e., R, G, B will be randomly chosen)
* \author Radu B. Rusu
* \ingroup visualization
*/
template <typename PointT>
class PointCloudColorHandlerRandom : public PointCloudColorHandler<PointT>
{
typedef typename PointCloudColorHandler<PointT>::PointCloud PointCloud;
typedef typename PointCloud::Ptr PointCloudPtr;
typedef typename PointCloud::ConstPtr PointCloudConstPtr;
public:
typedef boost::shared_ptr<PointCloudColorHandlerRandom<PointT> > Ptr;
typedef boost::shared_ptr<const PointCloudColorHandlerRandom<PointT> > ConstPtr;
/** \brief Constructor. */
PointCloudColorHandlerRandom () :
PointCloudColorHandler<PointT> ()
{
capable_ = true;
}
/** \brief Constructor. */
PointCloudColorHandlerRandom (const PointCloudConstPtr &cloud) :
PointCloudColorHandler<PointT> (cloud)
{
capable_ = true;
}
/** \brief Abstract getName method. */
virtual std::string
getName () const { return ("PointCloudColorHandlerRandom"); }
/** \brief Get the name of the field used. */
virtual std::string
getFieldName () const { return ("[random]"); }
/** \brief Obtain the actual color for the input dataset as vtk scalars.
* \param[out] scalars the output scalars containing the color for the dataset
* \return true if the operation was successful (the handler is capable and
* the input cloud was given as a valid pointer), false otherwise
*/
virtual bool
getColor (vtkSmartPointer<vtkDataArray> &scalars) const;
protected:
// Members derived from the base class
using PointCloudColorHandler<PointT>::cloud_;
using PointCloudColorHandler<PointT>::capable_;
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief Handler for predefined user colors. The color at each point will be drawn
* as the use given R, G, B values.
* \author Radu B. Rusu
* \ingroup visualization
*/
template <typename PointT>
class PointCloudColorHandlerCustom : public PointCloudColorHandler<PointT>
{
typedef typename PointCloudColorHandler<PointT>::PointCloud PointCloud;
typedef typename PointCloud::Ptr PointCloudPtr;
typedef typename PointCloud::ConstPtr PointCloudConstPtr;
public:
typedef boost::shared_ptr<PointCloudColorHandlerCustom<PointT> > Ptr;
typedef boost::shared_ptr<const PointCloudColorHandlerCustom<PointT> > ConstPtr;
/** \brief Constructor. */
PointCloudColorHandlerCustom (double r, double g, double b)
: PointCloudColorHandler<PointT> ()
, r_ (r)
, g_ (g)
, b_ (b)
{
capable_ = true;
}
/** \brief Constructor. */
PointCloudColorHandlerCustom (const PointCloudConstPtr &cloud,
double r, double g, double b)
: PointCloudColorHandler<PointT> (cloud)
, r_ (r)
, g_ (g)
, b_ (b)
{
capable_ = true;
}
/** \brief Destructor. */
virtual ~PointCloudColorHandlerCustom () {};
/** \brief Abstract getName method. */
virtual std::string
getName () const { return ("PointCloudColorHandlerCustom"); }
/** \brief Get the name of the field used. */
virtual std::string
getFieldName () const { return (""); }
/** \brief Obtain the actual color for the input dataset as vtk scalars.
* \param[out] scalars the output scalars containing the color for the dataset
* \return true if the operation was successful (the handler is capable and
* the input cloud was given as a valid pointer), false otherwise
*/
virtual bool
getColor (vtkSmartPointer<vtkDataArray> &scalars) const;
protected:
// Members derived from the base class
using PointCloudColorHandler<PointT>::cloud_;
using PointCloudColorHandler<PointT>::capable_;
/** \brief Internal R, G, B holding the values given by the user. */
double r_, g_, b_;
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief RGB handler class for colors. Uses the data present in the "rgb" or "rgba"
* fields as the color at each point.
* \author Radu B. Rusu
* \ingroup visualization
*/
template <typename PointT>
class PointCloudColorHandlerRGBField : public PointCloudColorHandler<PointT>
{
typedef typename PointCloudColorHandler<PointT>::PointCloud PointCloud;
typedef typename PointCloud::Ptr PointCloudPtr;
typedef typename PointCloud::ConstPtr PointCloudConstPtr;
public:
typedef boost::shared_ptr<PointCloudColorHandlerRGBField<PointT> > Ptr;
typedef boost::shared_ptr<const PointCloudColorHandlerRGBField<PointT> > ConstPtr;
/** \brief Constructor. */
PointCloudColorHandlerRGBField ()
{
capable_ = false;
}
/** \brief Constructor. */
PointCloudColorHandlerRGBField (const PointCloudConstPtr &cloud)
: PointCloudColorHandler<PointT> (cloud)
{
setInputCloud (cloud);
}
/** \brief Destructor. */
virtual ~PointCloudColorHandlerRGBField () {}
/** \brief Get the name of the field used. */
virtual std::string
getFieldName () const { return ("rgb"); }
/** \brief Obtain the actual color for the input dataset as vtk scalars.
* \param[out] scalars the output scalars containing the color for the dataset
* \return true if the operation was successful (the handler is capable and
* the input cloud was given as a valid pointer), false otherwise
*/
virtual bool
getColor (vtkSmartPointer<vtkDataArray> &scalars) const;
/** \brief Set the input cloud to be used.
* \param[in] cloud the input cloud to be used by the handler
*/
virtual void
setInputCloud (const PointCloudConstPtr &cloud);
protected:
/** \brief Class getName method. */
virtual std::string
getName () const { return ("PointCloudColorHandlerRGBField"); }
private:
// Members derived from the base class
using PointCloudColorHandler<PointT>::cloud_;
using PointCloudColorHandler<PointT>::capable_;
using PointCloudColorHandler<PointT>::field_idx_;
using PointCloudColorHandler<PointT>::fields_;
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief HSV handler class for colors. Uses the data present in the "h", "s", "v"
* fields as the color at each point.
* \ingroup visualization
*/
template <typename PointT>
class PointCloudColorHandlerHSVField : public PointCloudColorHandler<PointT>
{
typedef typename PointCloudColorHandler<PointT>::PointCloud PointCloud;
typedef typename PointCloud::Ptr PointCloudPtr;
typedef typename PointCloud::ConstPtr PointCloudConstPtr;
public:
typedef boost::shared_ptr<PointCloudColorHandlerHSVField<PointT> > Ptr;
typedef boost::shared_ptr<const PointCloudColorHandlerHSVField<PointT> > ConstPtr;
/** \brief Constructor. */
PointCloudColorHandlerHSVField (const PointCloudConstPtr &cloud);
/** \brief Empty destructor */
virtual ~PointCloudColorHandlerHSVField () {}
/** \brief Get the name of the field used. */
virtual std::string
getFieldName () const { return ("hsv"); }
/** \brief Obtain the actual color for the input dataset as vtk scalars.
* \param[out] scalars the output scalars containing the color for the dataset
* \return true if the operation was successful (the handler is capable and
* the input cloud was given as a valid pointer), false otherwise
*/
virtual bool
getColor (vtkSmartPointer<vtkDataArray> &scalars) const;
protected:
/** \brief Class getName method. */
virtual std::string
getName () const { return ("PointCloudColorHandlerHSVField"); }
/** \brief The field index for "S". */
int s_field_idx_;
/** \brief The field index for "V". */
int v_field_idx_;
private:
// Members derived from the base class
using PointCloudColorHandler<PointT>::cloud_;
using PointCloudColorHandler<PointT>::capable_;
using PointCloudColorHandler<PointT>::field_idx_;
using PointCloudColorHandler<PointT>::fields_;
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief Generic field handler class for colors. Uses an user given field to extract
* 1D data and display the color at each point using a min-max lookup table.
* \author Radu B. Rusu
* \ingroup visualization
*/
template <typename PointT>
class PointCloudColorHandlerGenericField : public PointCloudColorHandler<PointT>
{
typedef typename PointCloudColorHandler<PointT>::PointCloud PointCloud;
typedef typename PointCloud::Ptr PointCloudPtr;
typedef typename PointCloud::ConstPtr PointCloudConstPtr;
public:
typedef boost::shared_ptr<PointCloudColorHandlerGenericField<PointT> > Ptr;
typedef boost::shared_ptr<const PointCloudColorHandlerGenericField<PointT> > ConstPtr;
/** \brief Constructor. */
PointCloudColorHandlerGenericField (const std::string &field_name)
: field_name_ (field_name)
{
capable_ = false;
}
/** \brief Constructor. */
PointCloudColorHandlerGenericField (const PointCloudConstPtr &cloud,
const std::string &field_name)
: PointCloudColorHandler<PointT> (cloud)
, field_name_ (field_name)
{
setInputCloud (cloud);
}
/** \brief Destructor. */
virtual ~PointCloudColorHandlerGenericField () {}
/** \brief Get the name of the field used. */
virtual std::string getFieldName () const { return (field_name_); }
/** \brief Obtain the actual color for the input dataset as vtk scalars.
* \param[out] scalars the output scalars containing the color for the dataset
* \return true if the operation was successful (the handler is capable and
* the input cloud was given as a valid pointer), false otherwise
*/
virtual bool
getColor (vtkSmartPointer<vtkDataArray> &scalars) const;
/** \brief Set the input cloud to be used.
* \param[in] cloud the input cloud to be used by the handler
*/
virtual void
setInputCloud (const PointCloudConstPtr &cloud);
protected:
/** \brief Class getName method. */
virtual std::string
getName () const { return ("PointCloudColorHandlerGenericField"); }
private:
using PointCloudColorHandler<PointT>::cloud_;
using PointCloudColorHandler<PointT>::capable_;
using PointCloudColorHandler<PointT>::field_idx_;
using PointCloudColorHandler<PointT>::fields_;
/** \brief Name of the field used to create the color handler. */
std::string field_name_;
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief RGBA handler class for colors. Uses the data present in the "rgba" field as
* the color at each point. Transparency is handled.
* \author Nizar Sallem
* \ingroup visualization
*/
template <typename PointT>
class PointCloudColorHandlerRGBAField : public PointCloudColorHandler<PointT>
{
typedef typename PointCloudColorHandler<PointT>::PointCloud PointCloud;
typedef typename PointCloud::Ptr PointCloudPtr;
typedef typename PointCloud::ConstPtr PointCloudConstPtr;
public:
typedef boost::shared_ptr<PointCloudColorHandlerRGBAField<PointT> > Ptr;
typedef boost::shared_ptr<const PointCloudColorHandlerRGBAField<PointT> > ConstPtr;
/** \brief Constructor. */
PointCloudColorHandlerRGBAField ()
{
capable_ = false;
}
/** \brief Constructor. */
PointCloudColorHandlerRGBAField (const PointCloudConstPtr &cloud)
: PointCloudColorHandler<PointT> (cloud)
{
setInputCloud (cloud);
}
/** \brief Destructor. */
virtual ~PointCloudColorHandlerRGBAField () {}
/** \brief Get the name of the field used. */
virtual std::string
getFieldName () const { return ("rgba"); }
/** \brief Obtain the actual color for the input dataset as vtk scalars.
* \param[out] scalars the output scalars containing the color for the dataset
* \return true if the operation was successful (the handler is capable and
* the input cloud was given as a valid pointer), false otherwise
*/
virtual bool
getColor (vtkSmartPointer<vtkDataArray> &scalars) const;
/** \brief Set the input cloud to be used.
* \param[in] cloud the input cloud to be used by the handler
*/
virtual void
setInputCloud (const PointCloudConstPtr &cloud);
protected:
/** \brief Class getName method. */
virtual std::string
getName () const { return ("PointCloudColorHandlerRGBAField"); }
// Members derived from the base class
using PointCloudColorHandler<PointT>::cloud_;
using PointCloudColorHandler<PointT>::capable_;
using PointCloudColorHandler<PointT>::field_idx_;
using PointCloudColorHandler<PointT>::fields_;
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief Base Handler class for PointCloud colors.
* \author Radu B. Rusu
* \ingroup visualization
*/
template <>
class PCL_EXPORTS PointCloudColorHandler<pcl::PCLPointCloud2>
{
public:
typedef pcl::PCLPointCloud2 PointCloud;
typedef PointCloud::Ptr PointCloudPtr;
typedef PointCloud::ConstPtr PointCloudConstPtr;
typedef boost::shared_ptr<PointCloudColorHandler<PointCloud> > Ptr;
typedef boost::shared_ptr<const PointCloudColorHandler<PointCloud> > ConstPtr;
/** \brief Constructor. */
PointCloudColorHandler (const PointCloudConstPtr &cloud) :
cloud_ (cloud), capable_ (false), field_idx_ ()
{}
/** \brief Destructor. */
virtual ~PointCloudColorHandler () {}
/** \brief Return whether this handler is capable of handling the input data or not. */
inline bool
isCapable () const { return (capable_); }
/** \brief Abstract getName method. */
virtual std::string
getName () const = 0;
/** \brief Abstract getFieldName method. */
virtual std::string
getFieldName () const = 0;
/** \brief Obtain the actual color for the input dataset as vtk scalars.
* \param[out] scalars the output scalars containing the color for the dataset
* \return true if the operation was successful (the handler is capable and
* the input cloud was given as a valid pointer), false otherwise
*/
virtual bool
getColor (vtkSmartPointer<vtkDataArray> &scalars) 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 data that represents the color. */
int field_idx_;
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief Handler for random PointCloud colors (i.e., R, G, B will be randomly chosen)
* \author Radu B. Rusu
* \ingroup visualization
*/
template <>
class PCL_EXPORTS PointCloudColorHandlerRandom<pcl::PCLPointCloud2> : public PointCloudColorHandler<pcl::PCLPointCloud2>
{
typedef PointCloudColorHandler<pcl::PCLPointCloud2>::PointCloud PointCloud;
typedef PointCloud::Ptr PointCloudPtr;
typedef PointCloud::ConstPtr PointCloudConstPtr;
public:
typedef boost::shared_ptr<PointCloudColorHandlerRandom<PointCloud> > Ptr;
typedef boost::shared_ptr<const PointCloudColorHandlerRandom<PointCloud> > ConstPtr;
/** \brief Constructor. */
PointCloudColorHandlerRandom (const PointCloudConstPtr &cloud) :
PointCloudColorHandler<pcl::PCLPointCloud2> (cloud)
{
capable_ = true;
}
/** \brief Empty destructor */
virtual ~PointCloudColorHandlerRandom () {}
/** \brief Get the name of the class. */
virtual std::string
getName () const { return ("PointCloudColorHandlerRandom"); }
/** \brief Get the name of the field used. */
virtual std::string
getFieldName () const { return ("[random]"); }
/** \brief Obtain the actual color for the input dataset as vtk scalars.
* \param[out] scalars the output scalars containing the color for the dataset
* \return true if the operation was successful (the handler is capable and
* the input cloud was given as a valid pointer), false otherwise
*/
virtual bool
getColor (vtkSmartPointer<vtkDataArray> &scalars) const;
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief Handler for predefined user colors. The color at each point will be drawn
* as the use given R, G, B values.
* \author Radu B. Rusu
* \ingroup visualization
*/
template <>
class PCL_EXPORTS PointCloudColorHandlerCustom<pcl::PCLPointCloud2> : public PointCloudColorHandler<pcl::PCLPointCloud2>
{
typedef PointCloudColorHandler<pcl::PCLPointCloud2>::PointCloud PointCloud;
typedef PointCloud::Ptr PointCloudPtr;
typedef PointCloud::ConstPtr PointCloudConstPtr;
public:
/** \brief Constructor. */
PointCloudColorHandlerCustom (const PointCloudConstPtr &cloud,
double r, double g, double b) :
PointCloudColorHandler<pcl::PCLPointCloud2> (cloud),
r_ (r), g_ (g), b_ (b)
{
capable_ = true;
}
/** \brief Empty destructor */
virtual ~PointCloudColorHandlerCustom () {}
/** \brief Get the name of the class. */
virtual std::string
getName () const { return ("PointCloudColorHandlerCustom"); }
/** \brief Get the name of the field used. */
virtual std::string
getFieldName () const { return (""); }
/** \brief Obtain the actual color for the input dataset as vtk scalars.
* \param[out] scalars the output scalars containing the color for the dataset
* \return true if the operation was successful (the handler is capable and
* the input cloud was given as a valid pointer), false otherwise
*/
virtual bool
getColor (vtkSmartPointer<vtkDataArray> &scalars) const;
protected:
/** \brief Internal R, G, B holding the values given by the user. */
double r_, g_, b_;
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief RGB handler class for colors. Uses the data present in the "rgb" or "rgba"
* fields as the color at each point.
* \author Radu B. Rusu
* \ingroup visualization
*/
template <>
class PCL_EXPORTS PointCloudColorHandlerRGBField<pcl::PCLPointCloud2> : public PointCloudColorHandler<pcl::PCLPointCloud2>
{
typedef PointCloudColorHandler<pcl::PCLPointCloud2>::PointCloud PointCloud;
typedef PointCloud::Ptr PointCloudPtr;
typedef PointCloud::ConstPtr PointCloudConstPtr;
public:
typedef boost::shared_ptr<PointCloudColorHandlerRGBField<PointCloud> > Ptr;
typedef boost::shared_ptr<const PointCloudColorHandlerRGBField<PointCloud> > ConstPtr;
/** \brief Constructor. */
PointCloudColorHandlerRGBField (const PointCloudConstPtr &cloud);
/** \brief Empty destructor */
virtual ~PointCloudColorHandlerRGBField () {}
/** \brief Obtain the actual color for the input dataset as vtk scalars.
* \param[out] scalars the output scalars containing the color for the dataset
* \return true if the operation was successful (the handler is capable and
* the input cloud was given as a valid pointer), false otherwise
*/
virtual bool
getColor (vtkSmartPointer<vtkDataArray> &scalars) const;
protected:
/** \brief Get the name of the class. */
virtual std::string
getName () const { return ("PointCloudColorHandlerRGBField"); }
/** \brief Get the name of the field used. */
virtual std::string
getFieldName () const { return ("rgb"); }
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief HSV handler class for colors. Uses the data present in the "h", "s", "v"
* fields as the color at each point.
* \ingroup visualization
*/
template <>
class PCL_EXPORTS PointCloudColorHandlerHSVField<pcl::PCLPointCloud2> : public PointCloudColorHandler<pcl::PCLPointCloud2>
{
typedef PointCloudColorHandler<pcl::PCLPointCloud2>::PointCloud PointCloud;
typedef PointCloud::Ptr PointCloudPtr;
typedef PointCloud::ConstPtr PointCloudConstPtr;
public:
typedef boost::shared_ptr<PointCloudColorHandlerHSVField<PointCloud> > Ptr;
typedef boost::shared_ptr<const PointCloudColorHandlerHSVField<PointCloud> > ConstPtr;
/** \brief Constructor. */
PointCloudColorHandlerHSVField (const PointCloudConstPtr &cloud);
/** \brief Empty destructor */
virtual ~PointCloudColorHandlerHSVField () {}
/** \brief Obtain the actual color for the input dataset as vtk scalars.
* \param[out] scalars the output scalars containing the color for the dataset
* \return true if the operation was successful (the handler is capable and
* the input cloud was given as a valid pointer), false otherwise
*/
virtual bool
getColor (vtkSmartPointer<vtkDataArray> &scalars) const;
protected:
/** \brief Get the name of the class. */
virtual std::string
getName () const { return ("PointCloudColorHandlerHSVField"); }
/** \brief Get the name of the field used. */
virtual std::string
getFieldName () const { return ("hsv"); }
/** \brief The field index for "S". */
int s_field_idx_;
/** \brief The field index for "V". */
int v_field_idx_;
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief Generic field handler class for colors. Uses an user given field to extract
* 1D data and display the color at each point using a min-max lookup table.
* \author Radu B. Rusu
* \ingroup visualization
*/
template <>
class PCL_EXPORTS PointCloudColorHandlerGenericField<pcl::PCLPointCloud2> : public PointCloudColorHandler<pcl::PCLPointCloud2>
{
typedef PointCloudColorHandler<pcl::PCLPointCloud2>::PointCloud PointCloud;
typedef PointCloud::Ptr PointCloudPtr;
typedef PointCloud::ConstPtr PointCloudConstPtr;
public:
typedef boost::shared_ptr<PointCloudColorHandlerGenericField<PointCloud> > Ptr;
typedef boost::shared_ptr<const PointCloudColorHandlerGenericField<PointCloud> > ConstPtr;
/** \brief Constructor. */
PointCloudColorHandlerGenericField (const PointCloudConstPtr &cloud,
const std::string &field_name);
/** \brief Empty destructor */
virtual ~PointCloudColorHandlerGenericField () {}
/** \brief Obtain the actual color for the input dataset as vtk scalars.
* \param[out] scalars the output scalars containing the color for the dataset
* \return true if the operation was successful (the handler is capable and
* the input cloud was given as a valid pointer), false otherwise
*/
virtual bool
getColor (vtkSmartPointer<vtkDataArray> &scalars) const;
protected:
/** \brief Get the name of the class. */
virtual std::string
getName () const { return ("PointCloudColorHandlerGenericField"); }
/** \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 color handler. */
std::string field_name_;
};
//////////////////////////////////////////////////////////////////////////////////////
/** \brief RGBA handler class for colors. Uses the data present in the "rgba" field as
* the color at each point. Transparency is handled.
* \author Nizar Sallem
* \ingroup visualization
*/
template <>
class PCL_EXPORTS PointCloudColorHandlerRGBAField<pcl::PCLPointCloud2> : public PointCloudColorHandler<pcl::PCLPointCloud2>
{
typedef PointCloudColorHandler<pcl::PCLPointCloud2>::PointCloud PointCloud;
typedef PointCloud::Ptr PointCloudPtr;
typedef PointCloud::ConstPtr PointCloudConstPtr;
public:
typedef boost::shared_ptr<PointCloudColorHandlerRGBAField<PointCloud> > Ptr;
typedef boost::shared_ptr<const PointCloudColorHandlerRGBAField<PointCloud> > ConstPtr;
/** \brief Constructor. */
PointCloudColorHandlerRGBAField (const PointCloudConstPtr &cloud);
/** \brief Empty destructor */
virtual ~PointCloudColorHandlerRGBAField () {}
/** \brief Obtain the actual color for the input dataset as vtk scalars.
* \param[out] scalars the output scalars containing the color for the dataset
* \return true if the operation was successful (the handler is capable and
* the input cloud was given as a valid pointer), false otherwise
*/
virtual bool
getColor (vtkSmartPointer<vtkDataArray> &scalars) const;
protected:
/** \brief Get the name of the class. */
virtual std::string
getName () const { return ("PointCloudColorHandlerRGBAField"); }
/** \brief Get the name of the field used. */
virtual std::string
getFieldName () const { return ("rgba"); }
};
}
}
#include <pcl/visualization/impl/point_cloud_color_handlers.hpp>
#endif // PCL_POINT_CLOUD_COLOR_HANDLERS_H_
pcl::visualization::PointCloudColorHandler< pcl::PCLPointCloud2 >::cloud_
PointCloudConstPtr cloud_
A pointer to the input dataset.
Definition: point_cloud_color_handlers.h:553
pcl::visualization::PointCloudColorHandler::isCapable
bool isCapable() const
Check if this handler is capable of handling the input data or not.
Definition: point_cloud_color_handlers.h:89
pcl::visualization::PointCloudColorHandlerGenericField::getName
virtual std::string getName() const
Class getName method.
Definition: point_cloud_color_handlers.h:422
pcl::visualization::PointCloudColorHandlerCustom< pcl::PCLPointCloud2 >::getName
virtual std::string getName() const
Get the name of the class.
Definition: point_cloud_color_handlers.h:635
pcl::visualization::PointCloudColorHandlerRandom< pcl::PCLPointCloud2 >::PointCloudColorHandlerRandom
PointCloudColorHandlerRandom(const PointCloudConstPtr &cloud)
Constructor.
Definition: point_cloud_color_handlers.h:581
pcl::visualization::PointCloudColorHandlerRGBField::ConstPtr
boost::shared_ptr< const PointCloudColorHandlerRGBField< PointT > > ConstPtr
Definition: point_cloud_color_handlers.h:265
pcl::visualization::PointCloudColorHandlerRandom::PointCloudColorHandlerRandom
PointCloudColorHandlerRandom()
Constructor.
Definition: point_cloud_color_handlers.h:149
pcl::visualization::PointCloudColorHandlerCustom< pcl::PCLPointCloud2 >::~PointCloudColorHandlerCustom
virtual ~PointCloudColorHandlerCustom()
Empty destructor.
Definition: point_cloud_color_handlers.h:631
pcl::visualization::PointCloudColorHandlerRandom< pcl::PCLPointCloud2 >::~PointCloudColorHandlerRandom
virtual ~PointCloudColorHandlerRandom()
Empty destructor.
Definition: point_cloud_color_handlers.h:588
pcl::visualization::PointCloudColorHandlerHSVField< pcl::PCLPointCloud2 >::ConstPtr
boost::shared_ptr< const PointCloudColorHandlerHSVField< PointCloud > > ConstPtr
Definition: point_cloud_color_handlers.h:709
pcl::visualization::PointCloudColorHandlerGenericField< pcl::PCLPointCloud2 >::getName
virtual std::string getName() const
Get the name of the class.
Definition: point_cloud_color_handlers.h:776
pcl::visualization::PointCloudColorHandlerRandom
Handler for random PointCloud colors (i.e., R, G, B will be randomly chosen)
Definition: point_cloud_color_handlers.h:138
vtkSmartPointer
Definition: actor_map.h:50
pcl::visualization::PointCloudColorHandlerGenericField< pcl::PCLPointCloud2 >::ConstPtr
boost::shared_ptr< const PointCloudColorHandlerGenericField< PointCloud > > ConstPtr
Definition: point_cloud_color_handlers.h:756
pcl::visualization::PointCloudColorHandlerRGBField::~PointCloudColorHandlerRGBField
virtual ~PointCloudColorHandlerRGBField()
Destructor.
Definition: point_cloud_color_handlers.h:281
pcl::visualization::PointCloudColorHandlerGenericField< pcl::PCLPointCloud2 >::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_color_handlers.h:780
pcl::visualization::PointCloudColorHandlerRandom< pcl::PCLPointCloud2 >::ConstPtr
boost::shared_ptr< const PointCloudColorHandlerRandom< PointCloud > > ConstPtr
Definition: point_cloud_color_handlers.h:578
pcl::visualization::PointCloudColorHandler::PointCloudPtr
PointCloud::Ptr PointCloudPtr
Definition: point_cloud_color_handlers.h:68
pcl::visualization::PointCloudColorHandler< pcl::PCLPointCloud2 >::PointCloudPtr
PointCloud::Ptr PointCloudPtr
Definition: point_cloud_color_handlers.h:508
pcl::visualization::PointCloudColorHandlerGenericField< pcl::PCLPointCloud2 >::~PointCloudColorHandlerGenericField
virtual ~PointCloudColorHandlerGenericField()
Empty destructor.
Definition: point_cloud_color_handlers.h:763
pcl
Definition: cloud_iterator.h:46
pcl::visualization::PointCloudColorHandlerGenericField< pcl::PCLPointCloud2 >::Ptr
boost::shared_ptr< PointCloudColorHandlerGenericField< PointCloud > > Ptr
Definition: point_cloud_color_handlers.h:755
pcl::visualization::PointCloudColorHandlerGenericField::Ptr
boost::shared_ptr< PointCloudColorHandlerGenericField< PointT > > Ptr
Definition: point_cloud_color_handlers.h:380
pcl::visualization::PointCloudColorHandlerHSVField< pcl::PCLPointCloud2 >::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_color_handlers.h:732
pcl::visualization::PointCloudColorHandlerCustom::PointCloudColorHandlerCustom
PointCloudColorHandlerCustom(const PointCloudConstPtr &cloud, double r, double g, double b)
Constructor.
Definition: point_cloud_color_handlers.h:212
pcl::visualization::PointCloudColorHandler< pcl::PCLPointCloud2 >::ConstPtr
boost::shared_ptr< const PointCloudColorHandler< PointCloud > > ConstPtr
Definition: point_cloud_color_handlers.h:512
pcl::visualization::PointCloudColorHandlerRGBField::PointCloudColorHandlerRGBField
PointCloudColorHandlerRGBField()
Constructor.
Definition: point_cloud_color_handlers.h:268
pcl::visualization::PointCloudColorHandler::setInputCloud
virtual void setInputCloud(const PointCloudConstPtr &cloud)
Set the input cloud to be used.
Definition: point_cloud_color_handlers.h:111
pcl::visualization::PointCloudColorHandlerRGBAField::~PointCloudColorHandlerRGBAField
virtual ~PointCloudColorHandlerRGBAField()
Destructor.
Definition: point_cloud_color_handlers.h:466
pcl::visualization::PointCloudColorHandlerRGBAField< pcl::PCLPointCloud2 >::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_color_handlers.h:825
pcl::visualization::PointCloudColorHandlerRGBAField< pcl::PCLPointCloud2 >::~PointCloudColorHandlerRGBAField
virtual ~PointCloudColorHandlerRGBAField()
Empty destructor.
Definition: point_cloud_color_handlers.h:808
pcl::visualization::PointCloudColorHandlerHSVField< pcl::PCLPointCloud2 >::Ptr
boost::shared_ptr< PointCloudColorHandlerHSVField< PointCloud > > Ptr
Definition: point_cloud_color_handlers.h:708
pcl::visualization::PointCloudColorHandlerRGBField::PointCloudColorHandlerRGBField
PointCloudColorHandlerRGBField(const PointCloudConstPtr &cloud)
Constructor.
Definition: point_cloud_color_handlers.h:274
pcl::visualization::PointCloudColorHandlerCustom::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_color_handlers.h:231
pcl::visualization::PointCloudColorHandler::PointCloudColorHandler
PointCloudColorHandler(const PointCloudConstPtr &cloud)
Constructor.
Definition: point_cloud_color_handlers.h:80
pcl::visualization::PointCloudColorHandlerCustom::~PointCloudColorHandlerCustom
virtual ~PointCloudColorHandlerCustom()
Destructor.
Definition: point_cloud_color_handlers.h:223
pcl::visualization::PointCloudColorHandlerCustom::getName
virtual std::string getName() const
Abstract getName method.
Definition: point_cloud_color_handlers.h:227
pcl::PCLPointCloud2::Ptr
boost::shared_ptr< ::pcl::PCLPointCloud2 > Ptr
Definition: PCLPointCloud2.h:51
pcl::visualization::PointCloudColorHandler
Base Handler class for PointCloud colors.
Definition: point_cloud_color_handlers.h:64
pcl::visualization::PointCloudColorHandler::PointCloudConstPtr
PointCloud::ConstPtr PointCloudConstPtr
Definition: point_cloud_color_handlers.h:69
pcl::visualization::PointCloudColorHandlerRGBAField::ConstPtr
boost::shared_ptr< const PointCloudColorHandlerRGBAField< PointT > > ConstPtr
Definition: point_cloud_color_handlers.h:450
pcl::visualization::PointCloudColorHandlerRGBAField< pcl::PCLPointCloud2 >::ConstPtr
boost::shared_ptr< const PointCloudColorHandlerRGBAField< PointCloud > > ConstPtr
Definition: point_cloud_color_handlers.h:802
pcl::visualization::PointCloudColorHandlerRGBField::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_color_handlers.h:285
pcl::visualization::PointCloudColorHandlerRandom< pcl::PCLPointCloud2 >::getName
virtual std::string getName() const
Get the name of the class.
Definition: point_cloud_color_handlers.h:592
pcl::visualization::PointCloudColorHandlerHSVField::s_field_idx_
int s_field_idx_
The field index for "S".
Definition: point_cloud_color_handlers.h:354
pcl::visualization::PointCloudColorHandler< pcl::PCLPointCloud2 >::setInputCloud
void setInputCloud(const PointCloudConstPtr &cloud)
Set the input cloud to be used.
Definition: point_cloud_color_handlers.h:546
pcl::visualization::PointCloudColorHandlerCustom::PointCloudColorHandlerCustom
PointCloudColorHandlerCustom(double r, double g, double b)
Constructor.
Definition: point_cloud_color_handlers.h:202
pcl::PointCloud::Ptr
boost::shared_ptr< PointCloud< PointT > > Ptr
Definition: point_cloud.h:428
pcl::visualization::PointCloudColorHandler::fields_
std::vector< pcl::PCLPointField > fields_
The list of fields available for this PointCloud.
Definition: point_cloud_color_handlers.h:129
pcl::visualization::PointCloudColorHandlerHSVField< pcl::PCLPointCloud2 >::~PointCloudColorHandlerHSVField
virtual ~PointCloudColorHandlerHSVField()
Empty destructor.
Definition: point_cloud_color_handlers.h:715
pcl::visualization::PointCloudColorHandlerCustom< pcl::PCLPointCloud2 >::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_color_handlers.h:639
pcl::visualization::PointCloudColorHandlerGenericField::PointCloudColorHandlerGenericField
PointCloudColorHandlerGenericField(const std::string &field_name)
Constructor.
Definition: point_cloud_color_handlers.h:384
pcl::visualization::PointCloudColorHandlerRandom< pcl::PCLPointCloud2 >::Ptr
boost::shared_ptr< PointCloudColorHandlerRandom< PointCloud > > Ptr
Definition: point_cloud_color_handlers.h:577
pcl::visualization::PointCloudColorHandlerRGBField< pcl::PCLPointCloud2 >::~PointCloudColorHandlerRGBField
virtual ~PointCloudColorHandlerRGBField()
Empty destructor.
Definition: point_cloud_color_handlers.h:675
pcl::visualization::PointCloudColorHandlerHSVField
HSV handler class for colors.
Definition: point_cloud_color_handlers.h:320
pcl::visualization::PointCloudColorHandlerRGBAField::Ptr
boost::shared_ptr< PointCloudColorHandlerRGBAField< PointT > > Ptr
Definition: point_cloud_color_handlers.h:449
pcl::visualization::PointCloudColorHandlerHSVField::Ptr
boost::shared_ptr< PointCloudColorHandlerHSVField< PointT > > Ptr
Definition: point_cloud_color_handlers.h:327
pcl::visualization::PointCloudColorHandlerRGBAField::getName
virtual std::string getName() const
Class getName method.
Definition: point_cloud_color_handlers.h:489
pcl::visualization::PointCloudColorHandlerCustom::r_
double r_
Internal R, G, B holding the values given by the user.
Definition: point_cloud_color_handlers.h:247
pcl::visualization::PointCloudColorHandlerRandom< pcl::PCLPointCloud2 >::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_color_handlers.h:596
pcl::visualization::PointCloudColorHandlerRGBField< pcl::PCLPointCloud2 >::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_color_handlers.h:692
pcl::visualization::PointCloudColorHandlerCustom
Handler for predefined user colors.
Definition: point_cloud_color_handlers.h:191
pcl::visualization::PointCloudColorHandlerRGBField< pcl::PCLPointCloud2 >::ConstPtr
boost::shared_ptr< const PointCloudColorHandlerRGBField< PointCloud > > ConstPtr
Definition: point_cloud_color_handlers.h:669
pcl::visualization::PointCloudColorHandlerRandom::PointCloudColorHandlerRandom
PointCloudColorHandlerRandom(const PointCloudConstPtr &cloud)
Constructor.
Definition: point_cloud_color_handlers.h:156
pcl::visualization::PointCloudColorHandlerRGBField
RGB handler class for colors.
Definition: point_cloud_color_handlers.h:257
pcl::visualization::PointCloudColorHandler::PointCloudColorHandler
PointCloudColorHandler()
Constructor.
Definition: point_cloud_color_handlers.h:75
pcl::visualization::PointCloudColorHandlerRandom::ConstPtr
boost::shared_ptr< const PointCloudColorHandlerRandom< PointT > > ConstPtr
Definition: point_cloud_color_handlers.h:146
pcl::visualization::PointCloudColorHandlerHSVField::~PointCloudColorHandlerHSVField
virtual ~PointCloudColorHandlerHSVField()
Empty destructor.
Definition: point_cloud_color_handlers.h:334
pcl::PointCloud::ConstPtr
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
Definition: point_cloud.h:429
pcl::visualization::PointCloudColorHandlerHSVField< pcl::PCLPointCloud2 >::s_field_idx_
int s_field_idx_
The field index for "S".
Definition: point_cloud_color_handlers.h:735
pcl::visualization::PointCloudColorHandler< pcl::PCLPointCloud2 >::PointCloudColorHandler
PointCloudColorHandler(const PointCloudConstPtr &cloud)
Constructor.
Definition: point_cloud_color_handlers.h:515
pcl::visualization::PointCloudColorHandlerGenericField
Generic field handler class for colors.
Definition: point_cloud_color_handlers.h:373
pcl::PCLPointCloud2::ConstPtr
boost::shared_ptr< ::pcl::PCLPointCloud2 const > ConstPtr
Definition: PCLPointCloud2.h:52
pcl::visualization::PointCloudColorHandlerRandom::Ptr
boost::shared_ptr< PointCloudColorHandlerRandom< PointT > > Ptr
Definition: point_cloud_color_handlers.h:145
pcl::visualization::PointCloudColorHandlerRandom::getName
virtual std::string getName() const
Abstract getName method.
Definition: point_cloud_color_handlers.h:164
pcl::PointCloud
PointCloud represents the base class in PCL for storing collections of 3D points. ...
Definition: projection_matrix.h:53
pcl::visualization::PointCloudColorHandler< pcl::PCLPointCloud2 >::~PointCloudColorHandler
virtual ~PointCloudColorHandler()
Destructor.
Definition: point_cloud_color_handlers.h:520
pcl::visualization::PointCloudColorHandler< pcl::PCLPointCloud2 >::PointCloud
pcl::PCLPointCloud2 PointCloud
Definition: point_cloud_color_handlers.h:507
pcl::visualization::PointCloudColorHandler< pcl::PCLPointCloud2 >::Ptr
boost::shared_ptr< PointCloudColorHandler< PointCloud > > Ptr
Definition: point_cloud_color_handlers.h:511
pcl::visualization::PointCloudColorHandlerHSVField::v_field_idx_
int v_field_idx_
The field index for "V".
Definition: point_cloud_color_handlers.h:357
pcl::visualization::PointCloudColorHandlerHSVField< pcl::PCLPointCloud2 >::v_field_idx_
int v_field_idx_
The field index for "V".
Definition: point_cloud_color_handlers.h:738
pcl::visualization::PointCloudColorHandlerHSVField< pcl::PCLPointCloud2 >::getName
virtual std::string getName() const
Get the name of the class.
Definition: point_cloud_color_handlers.h:728
pcl::visualization::PointCloudColorHandlerCustom::ConstPtr
boost::shared_ptr< const PointCloudColorHandlerCustom< PointT > > ConstPtr
Definition: point_cloud_color_handlers.h:199
pcl::visualization::PointCloudColorHandlerRGBAField::PointCloudColorHandlerRGBAField
PointCloudColorHandlerRGBAField(const PointCloudConstPtr &cloud)
Constructor.
Definition: point_cloud_color_handlers.h:459
pcl::visualization::PointCloudColorHandler< pcl::PCLPointCloud2 >::field_idx_
int field_idx_
The index of the field holding the data that represents the color.
Definition: point_cloud_color_handlers.h:561
pcl::visualization::PointCloudColorHandler::Ptr
boost::shared_ptr< PointCloudColorHandler< PointT > > Ptr
Definition: point_cloud_color_handlers.h:71
pcl::visualization::PointCloudColorHandler::cloud_
PointCloudConstPtr cloud_
A pointer to the input dataset.
Definition: point_cloud_color_handlers.h:118
pcl::visualization::PointCloudColorHandlerRGBAField< pcl::PCLPointCloud2 >::getName
virtual std::string getName() const
Get the name of the class.
Definition: point_cloud_color_handlers.h:821
pcl::visualization::PointCloudColorHandler::ConstPtr
boost::shared_ptr< const PointCloudColorHandler< PointT > > ConstPtr
Definition: point_cloud_color_handlers.h:72
pcl::visualization::PointCloudColorHandler::getFieldName
virtual std::string getFieldName() const =0
Abstract getFieldName method.
pcl::visualization::PointCloudColorHandlerGenericField::ConstPtr
boost::shared_ptr< const PointCloudColorHandlerGenericField< PointT > > ConstPtr
Definition: point_cloud_color_handlers.h:381
pcl::visualization::PointCloudColorHandlerCustom::Ptr
boost::shared_ptr< PointCloudColorHandlerCustom< PointT > > Ptr
Definition: point_cloud_color_handlers.h:198
pcl::visualization::PointCloudColorHandlerHSVField::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_color_handlers.h:338
pcl::PCLPointCloud2
Definition: PCLPointCloud2.h:20
pcl::visualization::PointCloudColorHandlerRGBField::Ptr
boost::shared_ptr< PointCloudColorHandlerRGBField< PointT > > Ptr
Definition: point_cloud_color_handlers.h:264
pcl::visualization::PointCloudColorHandlerGenericField::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_color_handlers.h:403
pcl::visualization::PointCloudColorHandler< pcl::PCLPointCloud2 >::isCapable
bool isCapable() const
Return whether this handler is capable of handling the input data or not.
Definition: point_cloud_color_handlers.h:524
pcl::visualization::PointCloudColorHandlerGenericField::PointCloudColorHandlerGenericField
PointCloudColorHandlerGenericField(const PointCloudConstPtr &cloud, const std::string &field_name)
Constructor.
Definition: point_cloud_color_handlers.h:391
pcl::visualization::PointCloudColorHandlerHSVField::getName
virtual std::string getName() const
Class getName method.
Definition: point_cloud_color_handlers.h:351
pcl::visualization::PointCloudColorHandler::field_idx_
int field_idx_
The index of the field holding the data that represents the color.
Definition: point_cloud_color_handlers.h:126
pcl::PointXYZRGB
A point structure representing Euclidean xyz coordinates, and the RGB color.
Definition: point_types.hpp:594
pcl::visualization::PointCloudColorHandlerHSVField::ConstPtr
boost::shared_ptr< const PointCloudColorHandlerHSVField< PointT > > ConstPtr
Definition: point_cloud_color_handlers.h:328
pcl::visualization::PointCloudColorHandler::getName
virtual std::string getName() const =0
Abstract getName method.
pcl::visualization::PointCloudColorHandlerRGBField< pcl::PCLPointCloud2 >::getName
virtual std::string getName() const
Get the name of the class.
Definition: point_cloud_color_handlers.h:688
pcl::visualization::PointCloudColorHandler::capable_
bool capable_
True if this handler is capable of handling the input data, false otherwise.
Definition: point_cloud_color_handlers.h:123
pcl::visualization::PointCloudColorHandlerRandom::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_color_handlers.h:168
pcl::visualization::PointCloudColorHandlerRGBAField::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_color_handlers.h:470
pcl::visualization::PointCloudColorHandler::~PointCloudColorHandler
virtual ~PointCloudColorHandler()
Destructor.
Definition: point_cloud_color_handlers.h:85
pcl::visualization::PointCloudColorHandlerRGBField< pcl::PCLPointCloud2 >::Ptr
boost::shared_ptr< PointCloudColorHandlerRGBField< PointCloud > > Ptr
Definition: point_cloud_color_handlers.h:668
pcl::visualization::PointCloudColorHandlerRGBAField::PointCloudColorHandlerRGBAField
PointCloudColorHandlerRGBAField()
Constructor.
Definition: point_cloud_color_handlers.h:453
pcl::visualization::PointCloudColorHandler< pcl::PCLPointCloud2 >::PointCloudConstPtr
PointCloud::ConstPtr PointCloudConstPtr
Definition: point_cloud_color_handlers.h:509
pcl::visualization::PointCloudColorHandlerRGBAField< pcl::PCLPointCloud2 >::Ptr
boost::shared_ptr< PointCloudColorHandlerRGBAField< PointCloud > > Ptr
Definition: point_cloud_color_handlers.h:801
pcl::visualization::PointCloudColorHandler::getColor
virtual bool getColor(vtkSmartPointer< vtkDataArray > &scalars) const =0
Obtain the actual color for the input dataset as vtk scalars.
pcl::visualization::PointCloudColorHandlerGenericField::~PointCloudColorHandlerGenericField
virtual ~PointCloudColorHandlerGenericField()
Destructor.
Definition: point_cloud_color_handlers.h:400
pcl::visualization::PointCloudColorHandler< pcl::PCLPointCloud2 >::capable_
bool capable_
True if this handler is capable of handling the input data, false otherwise.
Definition: point_cloud_color_handlers.h:558
pcl::visualization::PointCloudColorHandlerRGBAField
RGBA handler class for colors.
Definition: point_cloud_color_handlers.h:442
pcl::visualization::PointCloudColorHandlerRGBField::getName
virtual std::string getName() const
Class getName method.
Definition: point_cloud_color_handlers.h:304
pcl::visualization::PointCloudColorHandlerCustom< pcl::PCLPointCloud2 >::r_
double r_
Internal R, G, B holding the values given by the user.
Definition: point_cloud_color_handlers.h:651
pcl::visualization::PointCloudColorHandler::PointCloud
pcl::PointCloud< PointT > PointCloud
Definition: point_cloud_color_handlers.h:67
pcl::visualization::PointCloudColorHandlerCustom< pcl::PCLPointCloud2 >::PointCloudColorHandlerCustom
PointCloudColorHandlerCustom(const PointCloudConstPtr &cloud, double r, double g, double b)
Constructor.
Definition: point_cloud_color_handlers.h:622