pcl::io::LZFImageReader Class Reference
Module io

PCL-LZF image format reader. More...

`#include <pcl/io/lzf_image_io.h>`

Inheritance diagram for pcl::io::LZFImageReader:

## Public Member Functions

| LZFImageReader ()
| Empty constructor. More...
virtual | ~LZFImageReader ()
| Empty destructor. More...
bool | readParameters (const std::string &filename)
| Read camera parameters from a given file and store them internally. More...
void | setParameters (const CameraParameters &parameters)
| Read the parameters from a struct instead. More...
CameraParameters | getParameters () const
| Get the camera parameters currently being used returns a CameraParameters struct. More...
uint32_t | getWidth () const
| Get the image width as read from disk. More...
uint32_t | getHeight () const
| Get the image height as read from disk. More...
std::string | getImageType () const
| Get the type of the image read from disk. More...

## Protected Member Functions

virtual bool | readParameters (std::istream &)
| Read camera parameters from a given stream and store them internally. More...
bool | loadImageBlob (const std::string &filename, std::vector< char > &data, uint32_t &uncompressed_size)
| Load a compressed image array from disk. More...
bool | decompress (const std::vector< char > &input, std::vector< char > &output)
| Realtime LZF decompression. More...

## Protected Attributes

uint32_t | width_
| The image width, as read from the file. More...
uint32_t | height_
| The image height, as read from the file. More...
std::string | image_type_identifier_
| The image type string, as read from the file. More...
CameraParameters | parameters_
| Internal set of camera parameters. More...

## Detailed Description

PCL-LZF image format reader.

The PCL-LZF image format is nothing else but a LZF-modified compression over an existing file type (e.g., PNG). However, in certain situations, like RGB data for example, an [RGBRGB...RGB] array will be first reordered into [RR...RGG...GBB...B] in order to ensure better compression.

The current list of compressors/decompressors include:

- LZF compressed 24-bit [RR...RGG...GBB...B] data
- LZF compressed 8-bit Bayer data
- LZF compressed 16-bit YUV422 data
- LZF compressed 16-bit depth data

Please note that files found using the above mentioned extensions will be treated as such. Inherit from this class and overwrite the I/O methods if you plan to change this behavior.

The main advantage of using the PCL-LZF image I/O routines is a very good file size versus I/O speed ratio. Tests performed using LZF, Snappy, ZIP, GZ2, BZIP2, as well as PNG, JPEG, and TIFF compression have shown that the internal PCL LZF methods provide the best score for the types of applications PCL is suited for.

Author
  Radu B. Rusu

Definition at line 86 of file lzf_image_io.h.

## Constructor & Destructor Documentation

## LZFImageReader()

pcl::io::LZFImageReader::LZFImageReader | ( |  | ) |

Empty constructor.

## ~LZFImageReader()

virtual pcl::io::LZFImageReader::~LZFImageReader | ( |  | ) |

inline virtual

Empty destructor.

Definition at line 92 of file lzf_image_io.h.

## Member Function Documentation

## decompress()

bool pcl::io::LZFImageReader::decompress | ( | const std::vector< char > & | input,
|  | std::vector< char > & | output
| ) |  |

protected

Realtime LZF decompression.

Parameters

  [in] | input | the array to decompress
  [out] | output | the decompressed array

Returns
  true if operation successful, false otherwise

Referenced by pcl::io::LZFDepth16ImageReader::read(), pcl::io::LZFRGB24ImageReader::read(), pcl::io::LZFYUV422ImageReader::read(), pcl::io::LZFBayer8ImageReader::read(), pcl::io::LZFDepth16ImageReader::readOMP(), pcl::io::LZFRGB24ImageReader::readOMP(), pcl::io::LZFYUV422ImageReader::readOMP(), and pcl::io::LZFBayer8ImageReader::readOMP().

## getHeight()

uint32_t pcl::io::LZFImageReader::getHeight | ( |  | ) | const

inline

Get the image height as read from disk.

Definition at line 125 of file lzf_image_io.h.

Referenced by pcl::io::LZFDepth16ImageReader::read(), pcl::io::LZFRGB24ImageReader::read(), pcl::io::LZFYUV422ImageReader::read(), pcl::io::LZFBayer8ImageReader::read(), pcl::io::LZFDepth16ImageReader::readOMP(), pcl::io::LZFRGB24ImageReader::readOMP(), pcl::io::LZFYUV422ImageReader::readOMP(), and pcl::io::LZFBayer8ImageReader::readOMP().

## getImageType()

std::string pcl::io::LZFImageReader::getImageType | ( |  | ) | const

inline

Get the type of the image read from disk.

Definition at line 132 of file lzf_image_io.h.

Referenced by pcl::io::LZFDepth16ImageReader::read(), pcl::io::LZFRGB24ImageReader::read(), pcl::io::LZFYUV422ImageReader::read(), pcl::io::LZFBayer8ImageReader::read(), pcl::io::LZFDepth16ImageReader::readOMP(), pcl::io::LZFRGB24ImageReader::readOMP(), pcl::io::LZFYUV422ImageReader::readOMP(), and pcl::io::LZFBayer8ImageReader::readOMP().

## getParameters()

CameraParameters pcl::io::LZFImageReader::getParameters | ( |  | ) | const

inline

Get the camera parameters currently being used returns a CameraParameters struct.

Definition at line 111 of file lzf_image_io.h.

## getWidth()

uint32_t pcl::io::LZFImageReader::getWidth | ( |  | ) | const

inline

Get the image width as read from disk.

Definition at line 118 of file lzf_image_io.h.

Referenced by pcl::io::LZFDepth16ImageReader::read(), pcl::io::LZFRGB24ImageReader::read(), pcl::io::LZFYUV422ImageReader::read(), pcl::io::LZFBayer8ImageReader::read(), pcl::io::LZFDepth16ImageReader::readOMP(), pcl::io::LZFRGB24ImageReader::readOMP(), pcl::io::LZFYUV422ImageReader::readOMP(), and pcl::io::LZFBayer8ImageReader::readOMP().

## loadImageBlob()

bool pcl::io::LZFImageReader::loadImageBlob | ( | const std::string & | filename,
|  | std::vector< char > & | data,
|  | uint32_t & | uncompressed_size
| ) |  |

protected

Load a compressed image array from disk.

Parameters

  [in] | filename | the file name to load the data from
  [out] | data | the size of the data
  | uncompressed_size |

Returns
  an array filled with the data loaded from disk, NULL if error

Referenced by pcl::io::LZFDepth16ImageReader::read(), pcl::io::LZFRGB24ImageReader::read(), pcl::io::LZFYUV422ImageReader::read(), pcl::io::LZFBayer8ImageReader::read(), pcl::io::LZFDepth16ImageReader::readOMP(), pcl::io::LZFRGB24ImageReader::readOMP(), pcl::io::LZFYUV422ImageReader::readOMP(), and pcl::io::LZFBayer8ImageReader::readOMP().

## readParameters() [1/2]

bool pcl::io::LZFImageReader::readParameters | ( | const std::string & | filename | ) |

Read camera parameters from a given file and store them internally.

Returns
  true if operation successful, false otherwise

## readParameters() [2/2]

virtual bool pcl::io::LZFImageReader::readParameters | ( | std::istream & |  | ) |

inline protected virtual

Read camera parameters from a given stream and store them internally.

Returns
  true if operation successful, false otherwise

Reimplemented in pcl::io::LZFRGB24ImageReader, and pcl::io::LZFDepth16ImageReader.

Definition at line 142 of file lzf_image_io.h.

## setParameters()

void pcl::io::LZFImageReader::setParameters | ( | const CameraParameters & | parameters | ) |

inline

Read the parameters from a struct instead.

Parameters

  [in] | parameters | Camera parameters to use

Definition at line 103 of file lzf_image_io.h.

## Member Data Documentation

## height_

uint32_t pcl::io::LZFImageReader::height_

protected

The image height, as read from the file.

Definition at line 168 of file lzf_image_io.h.

## image_type_identifier_

std::string pcl::io::LZFImageReader::image_type_identifier_

protected

The image type string, as read from the file.

Definition at line 171 of file lzf_image_io.h.

## parameters_

CameraParameters pcl::io::LZFImageReader::parameters_

protected

Internal set of camera parameters.

Definition at line 174 of file lzf_image_io.h.

Referenced by pcl::io::LZFDepth16ImageReader::read(), and pcl::io::LZFDepth16ImageReader::readOMP().

## width_

uint32_t pcl::io::LZFImageReader::width_

protected

The image width, as read from the file.

Definition at line 165 of file lzf_image_io.h.

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

- /build/pcl-OilVEB/pcl-1.8.1+dfsg1/io/include/pcl/io/lzf_image_io.h