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 >:

## Public Types

enum | ColorMode { COLORS_MONO, COLORS_RGB_RANDOM, COLORS_RGB_GLASBEY }
| Different modes for color mapping. More...
using | Ptr = shared_ptr< PointCloudImageExtractorFromLabelField< PointT > >
using | ConstPtr = shared_ptr< const PointCloudImageExtractorFromLabelField< PointT > >
Public Types inherited from pcl::io::PointCloudImageExtractor< PointT >
using | PointCloud = pcl::PointCloud< PointT >
using | Ptr = shared_ptr< PointCloudImageExtractor< PointT > >
using | ConstPtr = shared_ptr< const PointCloudImageExtractor< PointT > >

## Public Member Functions

| PointCloudImageExtractorFromLabelField (const ColorMode color_mode=COLORS_MONO)
| Constructor. More...
| ~PointCloudImageExtractorFromLabelField ()
| Destructor. 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...
bool | extract (const PointCloud &cloud, pcl::PCLImage &image) const
| Obtain the image from the given cloud. More...
void | setPaintNaNsWithBlack (bool flag)
| Set a flag that controls if image pixels corresponding to NaN (infinite) points should be painted black. More...

## Protected Member Functions

bool | extractImpl (const PointCloud &cloud, pcl::PCLImage &img) const override
| Implementation of the extract() function, has to be implemented in deriving classes. More...

## Additional Inherited Members

Protected Attributes inherited from pcl::io::PointCloudImageExtractor< PointT >
bool | paint_nans_with_black_
| A flag that controls if image pixels corresponding to NaN (infinite) points should be painted black. 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.

See the documentation for ColorMode to learn about available coloring options.

Author
  Sergey Alexandrov

Definition at line 259 of file point_cloud_image_extractors.h.

## Member Typedef Documentation

## ConstPtr

template<typename PointT>

using pcl::io::PointCloudImageExtractorFromLabelField< PointT >::ConstPtr = shared_ptr<const PointCloudImageExtractorFromLabelField<PointT> >

Definition at line 265 of file point_cloud_image_extractors.h.

## Ptr

template<typename PointT>

using pcl::io::PointCloudImageExtractorFromLabelField< PointT >::Ptr = shared_ptr<PointCloudImageExtractorFromLabelField<PointT> >

Definition at line 264 of file point_cloud_image_extractors.h.

## Member Enumeration Documentation

## ColorMode

template<typename PointT>

enum pcl::io::PointCloudImageExtractorFromLabelField::ColorMode

Different modes for color mapping.

Enumerator

COLORS_MONO

Shades of gray (according to label id)

Note
  Labels using more than 16 bits will cause problems

COLORS_RGB_RANDOM | Randomly generated RGB colors.
COLORS_RGB_GLASBEY | Fixed RGB colors from the Glasbey lookup table, assigned in the ascending order of label id.

Definition at line 268 of file point_cloud_image_extractors.h.

## Constructor & Destructor Documentation

## PointCloudImageExtractorFromLabelField()

template<typename PointT>

pcl::io::PointCloudImageExtractorFromLabelField< PointT >::PointCloudImageExtractorFromLabelField | ( | const ColorMode | color_mode = `COLORS_MONO` | ) |

inline

Constructor.

Definition at line 281 of file point_cloud_image_extractors.h.

## ~PointCloudImageExtractorFromLabelField()

template<typename PointT>

pcl::io::PointCloudImageExtractorFromLabelField< PointT >::~PointCloudImageExtractorFromLabelField | ( |  | ) |

inline

Destructor.

Definition at line 287 of file point_cloud_image_extractors.h.

## Member Function Documentation

## extractImpl()

template<typename PointT >

bool pcl::io::PointCloudImageExtractorFromLabelField< PointT >::extractImpl | ( | const PointCloud & | cloud,
|  | pcl::PCLImage & | image
| ) |  | const

override protected virtual

Implementation of the extract() function, has to be implemented in deriving classes.

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

Definition at line 139 of file point_cloud_image_extractors.hpp.

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

## setColorMode()

template<typename PointT>

void pcl::io::PointCloudImageExtractorFromLabelField< PointT >::setColorMode | ( | const ColorMode | color_mode | ) |

inline

Set color mapping mode.

Definition at line 291 of file point_cloud_image_extractors.h.

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

- pcl/io/point_cloud_image_extractors.h
- pcl/io/impl/point_cloud_image_extractors.hpp