Point Cloud Library (PCL)  1.7.1
List of all members | Public Types | Public Member Functions
pcl::io::PointCloudImageExtractorFromLabelField< PointT > Class Template Reference

Image Extractor which uses the data present in the "label" field to produce either monochrome or RGB image where different labels correspond to different colors. More...

#include <pcl/io/point_cloud_image_extractors.h>

+ Inheritance diagram for pcl::io::PointCloudImageExtractorFromLabelField< PointT >:
+ Collaboration diagram for pcl::io::PointCloudImageExtractorFromLabelField< PointT >:

Public Types

enum  ColorMode { COLORS_MONO, COLORS_RGB_RANDOM }
 Different modes for color mapping. More...
 
typedef boost::shared_ptr
< PointCloudImageExtractorFromLabelField
< PointT > > 
Ptr
 
typedef boost::shared_ptr
< const
PointCloudImageExtractorFromLabelField
< PointT > > 
ConstPtr
 
- Public Types inherited from pcl::io::PointCloudImageExtractor< PointT >
typedef pcl::PointCloud< PointTPointCloud
 
typedef boost::shared_ptr
< PointCloudImageExtractor
< PointT > > 
Ptr
 
typedef boost::shared_ptr
< const
PointCloudImageExtractor
< PointT > > 
ConstPtr
 

Public Member Functions

 PointCloudImageExtractorFromLabelField (const ColorMode color_mode=COLORS_MONO)
 Constructor. More...
 
virtual ~PointCloudImageExtractorFromLabelField ()
 Destructor. More...
 
virtual bool extract (const PointCloud &cloud, pcl::PCLImage &img) const
 Obtain the label image from the given cloud. More...
 
void setColorMode (const ColorMode color_mode)
 Set color mapping mode. More...
 
- Public Member Functions inherited from pcl::io::PointCloudImageExtractor< PointT >
 PointCloudImageExtractor ()
 Constructor. More...
 
virtual ~PointCloudImageExtractor ()
 Destructor. More...
 

Detailed Description

template<typename PointT>
class pcl::io::PointCloudImageExtractorFromLabelField< PointT >

Image Extractor which uses the data present in the "label" field to produce either monochrome or RGB image where different labels correspond to different colors.

In the monochrome case colors are shades of gray, in the RGB case the colors are generated randomly.

Author
Sergey Alexandrov

Definition at line 249 of file point_cloud_image_extractors.h.

Member Typedef Documentation

template<typename PointT>
typedef boost::shared_ptr<const PointCloudImageExtractorFromLabelField<PointT> > pcl::io::PointCloudImageExtractorFromLabelField< PointT >::ConstPtr

Definition at line 255 of file point_cloud_image_extractors.h.

Definition at line 254 of file point_cloud_image_extractors.h.

Constructor & Destructor Documentation

Constructor.

Definition at line 270 of file point_cloud_image_extractors.h.

template<typename PointT>
virtual pcl::io::PointCloudImageExtractorFromLabelField< PointT >::~PointCloudImageExtractorFromLabelField ( )
inlinevirtual

Destructor.

Definition at line 276 of file point_cloud_image_extractors.h.

Member Function Documentation

template<typename PointT >
bool pcl::io::PointCloudImageExtractorFromLabelField< PointT >::extract ( const PointCloud cloud,
pcl::PCLImage img 
) const
virtual

Obtain the label image from the given cloud.

The cloud should contain "label" field.

Note
Labels using more than 16 bits will cause problems in COLORS_MONO mode.
Parameters
[in]cloudorganized point cloud to extract image from
[out]imagethe output image
Returns
true if the operation was successful, false otherwise

Implements pcl::io::PointCloudImageExtractor< PointT >.

Definition at line 123 of file point_cloud_image_extractors.hpp.

References pcl::PCLImage::data, pcl::PCLImage::encoding, pcl::getFieldIndex(), pcl::PCLImage::height, pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::isOrganized(), pcl::PointCloud< PointT >::points, pcl::PCLImage::step, pcl::PCLImage::width, and pcl::PointCloud< PointT >::width.

template<typename PointT>
void pcl::io::PointCloudImageExtractorFromLabelField< PointT >::setColorMode ( const ColorMode  color_mode)
inline

Set color mapping mode.

Definition at line 290 of file point_cloud_image_extractors.h.


The documentation for this class was generated from the following files: