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

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

#include <pcl/io/point_cloud_image_extractors.h>

Inheritance diagram for pcl::io::PointCloudImageExtractor< PointT >:
Inheritance graph
[legend]

List of all members.

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.
virtual ~PointCloudImageExtractor ()
 Destructor.
virtual bool extract (const PointCloud &cloud, pcl::PCLImage &image) const =0
 Obtain the image from the given cloud.

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)
   pcl::PointCloud<pcl::PointXYZLabel> cloud;
   // Target image
   pcl::PCLImage image;
   // Create PointCloudImageExtractor subclass that can handle "label" field
   pcl::io::PointCloudImageExtractorFromLabelField<pcl::XYZLabel> pcie;
   // Set it up if not happy with the defaults
   pcie.setColorMode(pcie.COLORS_RGB_RANDOM);
   // 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 81 of file point_cloud_image_extractors.h.

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

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 (  )  [inline, virtual]

Destructor.

Definition at line 90 of file point_cloud_image_extractors.h.


Member Function Documentation

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

Obtain the image from the given cloud.

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

Implemented in pcl::io::PointCloudImageExtractorWithScaling< PointT >, pcl::io::PointCloudImageExtractorFromNormalField< PointT >, pcl::io::PointCloudImageExtractorFromRGBField< PointT >, and pcl::io::PointCloudImageExtractorFromLabelField< PointT >.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends