Point Cloud Library (PCL)  1.8.1-dev
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
pcl::io::PointCloudImageExtractor< PointT > Class Template Referenceabstract

Base Image Extractor class for organized point clouds. More...

#include <pcl/io/point_cloud_image_extractors.h>

+ Inheritance diagram for pcl::io::PointCloudImageExtractor< PointT >:

Public Types

typedef pcl::PointCloud< PointTPointCloud
 
typedef boost::shared_ptr
< PointCloudImageExtractor
< PointT > > 
Ptr
 
typedef boost::shared_ptr
< const
PointCloudImageExtractor
< PointT > > 
ConstPtr
 

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

Detailed Description

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

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.

// Source point cloud (needs to be filled with data of course)
// Target image
// Create PointCloudImageExtractor subclass that can handle "label" field
// Set it up if not happy with the defaults
// Try to extract an image
bool success = pcie.extract(cloud, image);
// Save to file if succeeded
if (success)
pcl::io::saveImage ("filename.png", image);
Author
Sergey Alexandrov

Definition at line 78 of file point_cloud_image_extractors.h.

Member Typedef Documentation

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

Definition at line 84 of file point_cloud_image_extractors.h.

Definition at line 81 of file point_cloud_image_extractors.h.

template<typename PointT>
typedef boost::shared_ptr<PointCloudImageExtractor<PointT> > pcl::io::PointCloudImageExtractor< PointT >::Ptr

Definition at line 83 of file point_cloud_image_extractors.h.

Constructor & Destructor Documentation

template<typename PointT>
pcl::io::PointCloudImageExtractor< PointT >::PointCloudImageExtractor ( )
inline

Constructor.

Definition at line 87 of file point_cloud_image_extractors.h.

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

Destructor.

Definition at line 92 of file point_cloud_image_extractors.h.

Member Function Documentation

template<typename PointT >
bool pcl::io::PointCloudImageExtractor< PointT >::extract ( const PointCloud cloud,
pcl::PCLImage image 
) const

Obtain the image from the given cloud.

Parameters
[in]cloudorganized point cloud to extract image from
[out]imagethe output image
Returns
true if the operation was successful, false otherwise

Definition at line 51 of file point_cloud_image_extractors.hpp.

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

template<typename PointT>
virtual bool pcl::io::PointCloudImageExtractor< PointT >::extractImpl ( const PointCloud cloud,
pcl::PCLImage image 
) const
protectedpure virtual
template<typename PointT>
void pcl::io::PointCloudImageExtractor< PointT >::setPaintNaNsWithBlack ( bool  flag)
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_.

Member Data Documentation

template<typename PointT>
bool 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().


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