pcl::outofcore::OutofcoreOctreeNodeMetadata Class Reference
Module outofcore

Encapsulated class to read JSON metadata into memory, and write the JSON metadata for each node. More...

`#include <pcl/outofcore/outofcore_node_data.h>`

## Public Types

typedef boost::shared_ptr< OutofcoreOctreeNodeMetadata > | Ptr
typedef boost::shared_ptr< const OutofcoreOctreeNodeMetadata > | ConstPtr

## Public Member Functions

| OutofcoreOctreeNodeMetadata ()
| Empty constructor. More...
| ~OutofcoreOctreeNodeMetadata ()
| OutofcoreOctreeNodeMetadata (const OutofcoreOctreeNodeMetadata &orig)
| Copy constructor. More...
const Eigen::Vector3d & | getBoundingBoxMin () const
| Get the lower bounding box corner. More...
void | setBoundingBoxMin (const Eigen::Vector3d &min_bb)
| Set the lower bounding box corner. More...
const Eigen::Vector3d & | getBoundingBoxMax () const
| Get the upper bounding box corner. More...
void | setBoundingBoxMax (const Eigen::Vector3d &max_bb)
| Set the upper bounding box corner. More...
void | getBoundingBox (Eigen::Vector3d &min_bb, Eigen::Vector3d &max_bb) const
| Get the lower and upper corners of the bounding box enclosing this node. More...
void | setBoundingBox (const Eigen::Vector3d &min_bb, const Eigen::Vector3d &max_bb)
| Set the lower and upper corners of the bounding box. More...
const boost::filesystem::path & | getDirectoryPathname () const
| Get the directory path name; this is the parent_path of. More...
void | setDirectoryPathname (const boost::filesystem::path &directory_pathname)
| Set the directory path name. More...
const boost::filesystem::path & | getPCDFilename () const
| Get the path to the PCD file. More...
void | setPCDFilename (const boost::filesystem::path &point_filename)
| Set the point filename; extension .pcd. More...
int | getOutofcoreVersion () const
| et the outofcore version read from the "version" field of the JSON object More...
void | setOutofcoreVersion (const int version)
| Set the outofcore version stored in the "version" field of the JSON object. More...
const boost::filesystem::path & | getMetadataFilename () const
| Sets the name of the JSON file. More...
void | setMetadataFilename (const boost::filesystem::path &path_to_metadata)
| Gets the name of the JSON file. More...
const Eigen::Vector3d & | getVoxelCenter () const
| Get the midpoint of this node's bounding box. More...
void | serializeMetadataToDisk ()
| Writes the data to a JSON file located at metadata_filename_. More...
int | loadMetadataFromDisk ()
| Loads the data from a JSON file located at metadata_filename_. More...
int | loadMetadataFromDisk (const boost::filesystem::path &path_to_metadata)
| Loads the data from a JSON file located at metadata_filename_. More...

## Protected Member Functions

void | updateVoxelCenter ()
| Computes the midpoint; used when bounding box is changed. More...

## Protected Attributes

Eigen::Vector3d | min_bb_
| The X,Y,Z axes-aligned minimum corner for the bounding box. More...
Eigen::Vector3d | max_bb_
| The X,Y,Z axes-aligned maximum corner for the bounding box. More...
boost::filesystem::path | binary_point_filename_
| Path to PCD file (i.e. More...
Eigen::Vector3d | midpoint_xyz_
| Voxel center; not stored on disk. More...
boost::filesystem::path | directory_
| Directory this metadata belongs in. More...
boost::filesystem::path | metadata_filename_
| Metadata (JSON) file pathname (oct_idx extension JSON file) More...
int | outofcore_version_
| Outofcore library version identifier. More...

## Friends

std::ostream & | operator<< (std::ostream &os, const OutofcoreOctreeNodeMetadata &metadata_arg)

## Detailed Description

Encapsulated class to read JSON metadata into memory, and write the JSON metadata for each node.

This class encapsulates the outofcore node metadata serialization/deserialization. At the time it was written, this depended on cJSON to write JSON objects to disk. This class can be extended to have arbitrary ascii metadata fields saved to the metadata object file on disk.

The JSON file is formatted in the following way:

    {
      "version": 3,
      "bb_min":  [xxx,yyy,zzz],
      "bb_max":  [xxx,yyy,zzz],
      "bin":     "path_to_data.pcd"
    }

Any properties not stored in the metadata file are computed when the file is loaded (e.g. midpoint_xyz_). By convention, the JSON files are stored on disk with .oct_idx extension.

Author
  Stephen Fox (foxst.nosp@m.ephe.nosp@m.nd@gm.nosp@m.ail..nosp@m.com)

Definition at line 83 of file outofcore_node_data.h.

## Member Typedef Documentation

typedef boost::shared_ptr<const OutofcoreOctreeNodeMetadata> pcl::outofcore::OutofcoreOctreeNodeMetadata::ConstPtr

Definition at line 89 of file outofcore_node_data.h.

typedef boost::shared_ptr<OutofcoreOctreeNodeMetadata> pcl::outofcore::OutofcoreOctreeNodeMetadata::Ptr

Definition at line 88 of file outofcore_node_data.h.

## Constructor & Destructor Documentation

pcl::outofcore::OutofcoreOctreeNodeMetadata::OutofcoreOctreeNodeMetadata | ( |  | ) |

Empty constructor.

pcl::outofcore::OutofcoreOctreeNodeMetadata::~OutofcoreOctreeNodeMetadata | ( |  | ) |

pcl::outofcore::OutofcoreOctreeNodeMetadata::OutofcoreOctreeNodeMetadata | ( | const OutofcoreOctreeNodeMetadata & | orig | ) |

Copy constructor.

## Member Function Documentation

void pcl::outofcore::OutofcoreOctreeNodeMetadata::getBoundingBox | ( | Eigen::Vector3d & | min_bb,
|  | Eigen::Vector3d & | max_bb
| ) |  | const

Get the lower and upper corners of the bounding box enclosing this node.

const Eigen::Vector3d& pcl::outofcore::OutofcoreOctreeNodeMetadata::getBoundingBoxMax | ( |  | ) | const

Get the upper bounding box corner.

const Eigen::Vector3d& pcl::outofcore::OutofcoreOctreeNodeMetadata::getBoundingBoxMin | ( |  | ) | const

Get the lower bounding box corner.

const boost::filesystem::path& pcl::outofcore::OutofcoreOctreeNodeMetadata::getDirectoryPathname | ( |  | ) | const

Get the directory path name; this is the parent_path of.

const boost::filesystem::path& pcl::outofcore::OutofcoreOctreeNodeMetadata::getMetadataFilename | ( |  | ) | const

Sets the name of the JSON file.

int pcl::outofcore::OutofcoreOctreeNodeMetadata::getOutofcoreVersion | ( |  | ) | const

et the outofcore version read from the "version" field of the JSON object

const boost::filesystem::path& pcl::outofcore::OutofcoreOctreeNodeMetadata::getPCDFilename | ( |  | ) | const

Get the path to the PCD file.

const Eigen::Vector3d& pcl::outofcore::OutofcoreOctreeNodeMetadata::getVoxelCenter | ( |  | ) | const

Get the midpoint of this node's bounding box.

int pcl::outofcore::OutofcoreOctreeNodeMetadata::loadMetadataFromDisk | ( |  | ) |

Loads the data from a JSON file located at metadata_filename_.

int pcl::outofcore::OutofcoreOctreeNodeMetadata::loadMetadataFromDisk | ( | const boost::filesystem::path & | path_to_metadata | ) |

Loads the data from a JSON file located at metadata_filename_.

void pcl::outofcore::OutofcoreOctreeNodeMetadata::serializeMetadataToDisk | ( |  | ) |

Writes the data to a JSON file located at metadata_filename_.

void pcl::outofcore::OutofcoreOctreeNodeMetadata::setBoundingBox | ( | const Eigen::Vector3d & | min_bb,
|  | const Eigen::Vector3d & | max_bb
| ) |  |

Set the lower and upper corners of the bounding box.

void pcl::outofcore::OutofcoreOctreeNodeMetadata::setBoundingBoxMax | ( | const Eigen::Vector3d & | max_bb | ) |

Set the upper bounding box corner.

void pcl::outofcore::OutofcoreOctreeNodeMetadata::setBoundingBoxMin | ( | const Eigen::Vector3d & | min_bb | ) |

Set the lower bounding box corner.

void pcl::outofcore::OutofcoreOctreeNodeMetadata::setDirectoryPathname | ( | const boost::filesystem::path & | directory_pathname | ) |

Set the directory path name.

void pcl::outofcore::OutofcoreOctreeNodeMetadata::setMetadataFilename | ( | const boost::filesystem::path & | path_to_metadata | ) |

Gets the name of the JSON file.

void pcl::outofcore::OutofcoreOctreeNodeMetadata::setOutofcoreVersion | ( | const int | version | ) |

Set the outofcore version stored in the "version" field of the JSON object.

void pcl::outofcore::OutofcoreOctreeNodeMetadata::setPCDFilename | ( | const boost::filesystem::path & | point_filename | ) |

Set the point filename; extension .pcd.

void pcl::outofcore::OutofcoreOctreeNodeMetadata::updateVoxelCenter | ( |  | ) |

inline protected

Computes the midpoint; used when bounding box is changed.

Definition at line 182 of file outofcore_node_data.h.

## Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
|  | const OutofcoreOctreeNodeMetadata & | metadata_arg
| ) |  |

friend

## Member Data Documentation

boost::filesystem::path pcl::outofcore::OutofcoreOctreeNodeMetadata::binary_point_filename_

protected

Path to PCD file (i.e.

"bin"ary point data)

Definition at line 170 of file outofcore_node_data.h.

boost::filesystem::path pcl::outofcore::OutofcoreOctreeNodeMetadata::directory_

protected

Directory this metadata belongs in.

Definition at line 174 of file outofcore_node_data.h.

Eigen::Vector3d pcl::outofcore::OutofcoreOctreeNodeMetadata::max_bb_

protected

The X,Y,Z axes-aligned maximum corner for the bounding box.

Definition at line 168 of file outofcore_node_data.h.

boost::filesystem::path pcl::outofcore::OutofcoreOctreeNodeMetadata::metadata_filename_

protected

Metadata (JSON) file pathname (oct_idx extension JSON file)

Definition at line 176 of file outofcore_node_data.h.

Eigen::Vector3d pcl::outofcore::OutofcoreOctreeNodeMetadata::midpoint_xyz_

protected

Voxel center; not stored on disk.

Definition at line 172 of file outofcore_node_data.h.

Eigen::Vector3d pcl::outofcore::OutofcoreOctreeNodeMetadata::min_bb_

protected

The X,Y,Z axes-aligned minimum corner for the bounding box.

Definition at line 166 of file outofcore_node_data.h.

int pcl::outofcore::OutofcoreOctreeNodeMetadata::outofcore_version_

protected

Outofcore library version identifier.

Definition at line 178 of file outofcore_node_data.h.

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

- /build/pcl-6_P28C/pcl-1.7.2/outofcore/include/pcl/outofcore/outofcore_node_data.h