pcl::io::PointCloudImageExtractorFromLabelField< PointT > Class Template Reference
[Module io]

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 >:
Inheritance graph
[legend]
Collaboration diagram for pcl::io::PointCloudImageExtractorFromLabelField< PointT >:
Collaboration graph
[legend]

List of all members.

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 Member Functions

 PointCloudImageExtractorFromLabelField (const ColorMode color_mode=COLORS_MONO)
 Constructor.
virtual ~PointCloudImageExtractorFromLabelField ()
 Destructor.
virtual bool extract (const PointCloud &cloud, pcl::PCLImage &img) const
 Obtain the label image from the given cloud.
void setColorMode (const ColorMode color_mode)
 Set color mapping mode.

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

Reimplemented from pcl::io::PointCloudImageExtractor< PointT >.

Definition at line 255 of file point_cloud_image_extractors.h.

Reimplemented from pcl::io::PointCloudImageExtractor< PointT >.

Definition at line 254 of file point_cloud_image_extractors.h.


Member Enumeration Documentation

Different modes for color mapping.

  • COLORS_MONO - shades of gray (according to label id).
  • COLORS_RGB_RANDOM - randomly generated RGB colors.
Enumerator:
COLORS_MONO 
COLORS_RGB_RANDOM 

Definition at line 263 of file point_cloud_image_extractors.h.


Constructor & Destructor Documentation

template<typename PointT>
pcl::io::PointCloudImageExtractorFromLabelField< PointT >::PointCloudImageExtractorFromLabelField ( const ColorMode  color_mode = COLORS_MONO  )  [inline]

Constructor.

Definition at line 270 of file point_cloud_image_extractors.h.

template<typename PointT>
virtual pcl::io::PointCloudImageExtractorFromLabelField< PointT >::~PointCloudImageExtractorFromLabelField (  )  [inline, virtual]

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 [inline, 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] cloud organized point cloud to extract image from
[out] image the 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::io::PointCloudImageExtractorFromLabelField< PointT >::COLORS_MONO, pcl::io::PointCloudImageExtractorFromLabelField< PointT >::COLORS_RGB_RANDOM, 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:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends