Point Cloud Library (PCL)
1.14.1-dev
|
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 | |
using | Ptr = shared_ptr< OutofcoreOctreeNodeMetadata > |
using | ConstPtr = shared_ptr< const OutofcoreOctreeNodeMetadata > |
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_ {0} |
Outofcore library version identifier. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const OutofcoreOctreeNodeMetadata &metadata_arg) |
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.
Definition at line 89 of file outofcore_node_data.h.
using pcl::outofcore::OutofcoreOctreeNodeMetadata::ConstPtr = shared_ptr<const OutofcoreOctreeNodeMetadata> |
Definition at line 95 of file outofcore_node_data.h.
using pcl::outofcore::OutofcoreOctreeNodeMetadata::Ptr = shared_ptr<OutofcoreOctreeNodeMetadata> |
Definition at line 94 of file outofcore_node_data.h.
pcl::outofcore::OutofcoreOctreeNodeMetadata::OutofcoreOctreeNodeMetadata | ( | ) |
Empty constructor.
pcl::outofcore::OutofcoreOctreeNodeMetadata::~OutofcoreOctreeNodeMetadata | ( | ) |
pcl::outofcore::OutofcoreOctreeNodeMetadata::OutofcoreOctreeNodeMetadata | ( | const OutofcoreOctreeNodeMetadata & | orig | ) |
Copy constructor.
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.
|
inlineprotected |
Computes the midpoint; used when bounding box is changed.
Definition at line 188 of file outofcore_node_data.h.
|
friend |
|
protected |
|
protected |
Directory this metadata belongs in.
Definition at line 180 of file outofcore_node_data.h.
|
protected |
The X,Y,Z axes-aligned maximum corner for the bounding box.
Definition at line 174 of file outofcore_node_data.h.
|
protected |
Metadata (JSON) file pathname (oct_idx extension JSON file)
Definition at line 182 of file outofcore_node_data.h.
|
protected |
Voxel center; not stored on disk.
Definition at line 178 of file outofcore_node_data.h.
|
protected |
The X,Y,Z axes-aligned minimum corner for the bounding box.
Definition at line 172 of file outofcore_node_data.h.
|
protected |
Outofcore library version identifier.
Definition at line 184 of file outofcore_node_data.h.