Public Member Functions | Public Attributes
cob_3d_mapping_common::PPMWriter Class Reference

2D image PPM file format writer. More...

#include <io.h>

List of all members.

Public Member Functions

 PPMWriter ()
void setMaxZ (const float &max)
 Sets the maximum Z value for the color gradient.
void setMinZ (const float &min)
 Sets the minimum Z value for the color gradient.
int writeDepth (const std::string &file_name, const pcl::PointCloud< pcl::PointXYZRGB > &cloud)
 Writes the depth information of a point cloud to an ASCII formated .ppm 2D color image.
int writeDepthLinear (const std::string &file_name, const pcl::PointCloud< pcl::PointXYZRGB > &cloud)
int writeRGB (const std::string &file_name, const pcl::PointCloud< pcl::PointXYZRGB > &cloud)
 Writes the color information of a point cloud to an ASCII formated .ppm 2D image.
 ~PPMWriter ()

Public Attributes

bool fixed_max_
 Flag whether a max value was defined manually.
bool fixed_min_
 Flag whether a min value was defined manually.
float max_z_
 Holds the maximum Z value.
float min_z_
 Holds the minimum Z value.

Detailed Description

2D image PPM file format writer.

Definition at line 96 of file io.h.


Constructor & Destructor Documentation

Empty constructor

Definition at line 100 of file io.h.

Empty destructor

Definition at line 104 of file io.h.


Member Function Documentation

void cob_3d_mapping_common::PPMWriter::setMaxZ ( const float &  max)

Sets the maximum Z value for the color gradient.

Parameters:
[in]maxthe maximum Z value

Definition at line 425 of file io.cpp.

void cob_3d_mapping_common::PPMWriter::setMinZ ( const float &  min)

Sets the minimum Z value for the color gradient.

Parameters:
[in]minthe minimum Z value

Definition at line 431 of file io.cpp.

int cob_3d_mapping_common::PPMWriter::writeDepth ( const std::string &  file_name,
const pcl::PointCloud< pcl::PointXYZRGB > &  cloud 
)

Writes the depth information of a point cloud to an ASCII formated .ppm 2D color image.

The Z values of the point cloud are encoded as a color gradient with the minimum value defined by setMinZ as RGB(255,0,0) and the maximum value defined by setMaxZ as RGB(0,0,255). If no values are defined, the minimum and maximum values of the point cloud are determined automatically.

Parameters:
[in]file_namethe output .ppm filename
[in]cloudthe input organized point cloud
Returns:
< 0 (-1) on error, else 0

Definition at line 296 of file io.cpp.

int cob_3d_mapping_common::PPMWriter::writeDepthLinear ( const std::string &  file_name,
const pcl::PointCloud< pcl::PointXYZRGB > &  cloud 
)

Definition at line 360 of file io.cpp.

int cob_3d_mapping_common::PPMWriter::writeRGB ( const std::string &  file_name,
const pcl::PointCloud< pcl::PointXYZRGB > &  cloud 
)

Writes the color information of a point cloud to an ASCII formated .ppm 2D image.

Parameters:
[in]file_namethe output .ppm filename
[in]cloudthe input organized point cloud providing RGB fields
Returns:
-1 for error, else 0

Definition at line 261 of file io.cpp.


Member Data Documentation

Flag whether a max value was defined manually.

Definition at line 142 of file io.h.

Flag whether a min value was defined manually.

Definition at line 144 of file io.h.

Holds the maximum Z value.

Definition at line 146 of file io.h.

Holds the minimum Z value.

Definition at line 148 of file io.h.


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


cob_3d_mapping_common
Author(s): Georg Arbeiter
autogenerated on Wed Aug 26 2015 11:02:19