Base Image Extractor class for organized point clouds. More...
#include <pcl/io/point_cloud_image_extractors.h>
Public Types | |
using | PointCloud = pcl::PointCloud< PointT > |
using | Ptr = shared_ptr< PointCloudImageExtractor< PointT > > |
using | ConstPtr = shared_ptr< const PointCloudImageExtractor< PointT > > |
Public Member Functions | |
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 | |
virtual bool | extractImpl (const PointCloud &cloud, pcl::PCLImage &image) const =0 |
Implementation of the extract() function, has to be implemented in deriving classes. More... |
|
Protected Attributes | |
bool | paint_nans_with_black_ |
A flag that controls if image pixels corresponding to NaN (infinite) points should be painted black. More... |
|
Base Image Extractor class for organized point clouds.
This is an abstract class that declares an interface for image extraction from organized point clouds. The family of its subclasses provide functionality to extract images from particular fields.
The following piece of code demonstrates typical usage of a PointCloudImageExtractor subclass. Here the data are extracted from the "label" field and are saved as a PNG image file.
Definition at line 78 of file point_cloud_image_extractors.h.
using pcl::io::PointCloudImageExtractor< PointT >::ConstPtr = shared_ptr<const PointCloudImageExtractor<PointT> > |
Definition at line 84 of file point_cloud_image_extractors.h.
using pcl::io::PointCloudImageExtractor< PointT >::PointCloud = pcl::PointCloud<PointT> |
Definition at line 81 of file point_cloud_image_extractors.h.
using pcl::io::PointCloudImageExtractor< PointT >::Ptr = shared_ptr<PointCloudImageExtractor<PointT> > |
Definition at line 83 of file point_cloud_image_extractors.h.
| inline |
Constructor.
Definition at line 87 of file point_cloud_image_extractors.h.
| inlinevirtual |
Destructor.
Definition at line 92 of file point_cloud_image_extractors.h.
bool pcl::io::PointCloudImageExtractor< PointT >::extract | ( | const PointCloud & | cloud, |
pcl::PCLImage & | image | ||
) | const |
Obtain the image from the given cloud.
[in] | cloud | organized point cloud to extract image from |
[out] | image | the output image |
Definition at line 51 of file point_cloud_image_extractors.hpp.
References pcl::PCLImage::data, pcl::PCLImage::encoding, pcl::PointCloud< PointT >::height, pcl::isFinite(), pcl::PointCloud< PointT >::isOrganized(), pcl::PointCloud< PointT >::size(), and pcl::PointCloud< PointT >::width.
| protectedpure virtual |
Implementation of the extract() function, has to be implemented in deriving classes.
Implemented in pcl::io::PointCloudImageExtractorFromLabelField< PointT >, pcl::io::PointCloudImageExtractorFromRGBField< PointT >, pcl::io::PointCloudImageExtractorFromNormalField< PointT >, and pcl::io::PointCloudImageExtractorWithScaling< PointT >.
| inline |
Set a flag that controls if image pixels corresponding to NaN (infinite) points should be painted black.
Definition at line 106 of file point_cloud_image_extractors.h.
References pcl::io::PointCloudImageExtractor< PointT >::paint_nans_with_black_.
| protected |
A flag that controls if image pixels corresponding to NaN (infinite) points should be painted black.
Definition at line 121 of file point_cloud_image_extractors.h.
Referenced by pcl::io::PointCloudImageExtractor< PointT >::setPaintNaNsWithBlack().
© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1io_1_1_point_cloud_image_extractor.html