qCC_io  version 2.5.4 (Qt) - 19 Apr 2014
 All Classes Functions Variables Typedefs
Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
PCDFilter Class Reference

PCD point cloud I/O filter. More...

#include <PCDFilter.h>

Inheritance diagram for PCDFilter:
Inheritance graph
[legend]
Collaboration diagram for PCDFilter:
Collaboration graph
[legend]

Classes

struct  PCDHeader
 (Binary) PCD file header More...
 

Public Member Functions

virtual CC_FILE_ERROR loadFile (const char *filename, ccHObject &container, bool alwaysDisplayLoadDialog=true, bool *coordinatesShiftEnabled=0, CCVector3d *coordinatesShift=0)
 Loads one or more entities from a file. More...
 
virtual CC_FILE_ERROR saveToFile (ccHObject *entity, const char *filename)
 Saves an entity (or a group of) to a file. More...
 

Protected Member Functions

CC_FILE_ERROR loadFileBinaryMemMap (const char *filename, ccHObject &container, const PCDHeader &header)
 
CC_FILE_ERROR readFileHeader (const char *filename, PCDHeader &header)
 

Static Protected Member Functions

static int ReadScalarFieldMemMap (const QString &fieldname, const InputMemoryFile &mem_file, const PCDHeader &header, ccScalarField &field, size_t count=0)
 
static int ReadRGBMemMap (const InputMemoryFile &mem_file, const PCDHeader &header, ccPointCloud &cloud)
 
static int ReadNormalsMemMap (const InputMemoryFile &mem_file, const PCDHeader &header, ccPointCloud &cloud)
 
static int GetIDOfField (const QString &fieldName, const PCDFilter::PCDHeader &header)
 
static size_t GetSizeOfField (int fieldID, const PCDFilter::PCDHeader &header)
 
static size_t GetOffsetOfField (int fieldID, const PCDFilter::PCDHeader &header)
 

Additional Inherited Members

- Static Public Member Functions inherited from FileIOFilter
static ccHObject * LoadFromFile (const QString &filename, CC_FILE_TYPES fType=UNKNOWN_FILE, bool alwaysDisplayLoadDialog=true, bool *coordinatesShiftEnabled=0, CCVector3d *coordinatesShift=0)
 Loads one or more entities from a file with known type. More...
 
static CC_FILE_ERROR SaveToFile (ccHObject *entities, const char *filename, CC_FILE_TYPES fType)
 Saves an entity (or a group of) to a specific file (with name and type)
 
static void DisplayErrorMessage (CC_FILE_ERROR err, const QString &action, const QString &filename)
 Displays (to console) the message corresponding to a given error code. More...
 
static CC_FILE_TYPES GuessFileFormatFromExtension (const char *ext)
 Detecs file type from file extension.
 
static FileIOFilterCreateFilter (CC_FILE_TYPES fType)
 Factory: returns a filter given it's type.
 

Detailed Description

PCD point cloud I/O filter.

Member Function Documentation

CC_FILE_ERROR PCDFilter::loadFile ( const char *  filename,
ccHObject &  container,
bool  alwaysDisplayLoadDialog = true,
bool *  coordinatesShiftEnabled = 0,
CCVector3d *  coordinatesShift = 0 
)
virtual

Loads one or more entities from a file.

This method must be implemented by children classes.

Parameters
filenamefile to load
containercontainer to store loaded entities
alwaysDisplayLoadDialogalways display (eventual) display dialog, even if automatic guess is possible
coordinatesShiftEnabledwhether shift on load has already been defined or not (may be modified by this method)
coordinatesShiftalready applied (input) or newly applied (output) shift on load (3D translation)
Returns
error

Implements FileIOFilter.

CC_FILE_ERROR PCDFilter::saveToFile ( ccHObject *  entity,
const char *  filename 
)
virtual

Saves an entity (or a group of) to a file.

This method must be implemented by children classes.

Parameters
entityentity (or group of) to save
filenamefilename
Returns
error

Implements FileIOFilter.


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