OutofcoreOctreeBaseNode Class internally representing nodes of an outofcore octree, with accessors to its data via the pcl::outofcore::OutofcoreOctreeDiskContainer class or pcl::outofcore::OutofcoreOctreeRamContainer class, whichever it is templated against.
More...
#include <pcl/outofcore/octree_base_node.h>
Public Types |
|
using | octree_disk = OutofcoreOctreeBase< OutofcoreOctreeDiskContainer< PointT >, PointT > |
using | octree_disk_node = OutofcoreOctreeBaseNode< OutofcoreOctreeDiskContainer< PointT >, PointT > |
using | AlignedPointTVector = std::vector< PointT, Eigen::aligned_allocator< PointT > > |
using | node_type_t = pcl::octree::node_type_t |
Public Member Functions |
|
OutofcoreOctreeBaseNode () | |
Empty constructor; sets pointers for children and for bounding boxes to 0. More... |
|
OutofcoreOctreeBaseNode (const Eigen::Vector3d &bb_min, const Eigen::Vector3d &bb_max, OutofcoreOctreeBase< ContainerT, PointT > *const tree, const boost::filesystem::path &root_name) | |
Create root node and directory. More... |
|
~OutofcoreOctreeBaseNode () | |
Will recursively delete all children calling recFreeChildrein. More... |
|
virtual void | getBoundingBox (Eigen::Vector3d &min_bb, Eigen::Vector3d &max_bb) const |
gets the minimum and maximum corner of the bounding box represented by this node More... |
|
const boost::filesystem::path & | getPCDFilename () const |
const boost::filesystem::path & | getMetadataFilename () const |
void | queryFrustum (const double planes[24], std::list< std::string > &file_names) |
void | queryFrustum (const double planes[24], std::list< std::string > &file_names, const std::uint32_t query_depth, const bool skip_vfc_check=false) |
void | queryFrustum (const double planes[24], const Eigen::Vector3d &eye, const Eigen::Matrix4d &view_projection_matrix, std::list< std::string > &file_names, const std::uint32_t query_depth, const bool skip_vfc_check=false) |
virtual void | queryBBIncludes (const Eigen::Vector3d &min_bb, const Eigen::Vector3d &max_bb, std::size_t query_depth, AlignedPointTVector &dst) |
Recursively add points that fall into the queried bounding box up to the query_depth. More... |
|
virtual void | queryBBIncludes (const Eigen::Vector3d &min_bb, const Eigen::Vector3d &max_bb, std::size_t query_depth, const pcl::PCLPointCloud2::Ptr &dst_blob) |
Recursively add points that fall into the queried bounding box up to the query_depth. More... |
|
virtual void | queryBBIncludes_subsample (const Eigen::Vector3d &min_bb, const Eigen::Vector3d &max_bb, std::uint64_t query_depth, const double percent, AlignedPointTVector &v) |
Recursively add points that fall into the queried bounding box up to the query_depth. More... |
|
virtual void | queryBBIncludes_subsample (const Eigen::Vector3d &min_bb, const Eigen::Vector3d &max_bb, std::uint64_t query_depth, const pcl::PCLPointCloud2::Ptr &dst_blob, double percent=1.0) |
virtual void | queryBBIntersects (const Eigen::Vector3d &min_bb, const Eigen::Vector3d &max_bb, const std::uint32_t query_depth, std::list< std::string > &file_names) |
Recursive acquires PCD paths to any node with which the queried bounding box intersects (at query_depth only). More... |
|
virtual void | printBoundingBox (const std::size_t query_depth) const |
Write the voxel size to stdout at query_depth . More... |
|
virtual std::uint64_t | addDataToLeaf (const AlignedPointTVector &p, const bool skip_bb_check=true) |
add point to this node if we are a leaf, or find the leaf below us that is supposed to take the point More... |
|
virtual std::uint64_t | addDataToLeaf (const std::vector< const PointT * > &p, const bool skip_bb_check=true) |
virtual std::uint64_t | addPointCloud (const pcl::PCLPointCloud2::Ptr &input_cloud, const bool skip_bb_check=false) |
Add a single PCLPointCloud2 object into the octree. More... |
|
virtual std::uint64_t | addPointCloud_and_genLOD (const pcl::PCLPointCloud2::Ptr input_cloud) |
Add a single PCLPointCloud2 into the octree and build the subsampled LOD during construction; this method of LOD construction is not multiresolution. More... |
|
virtual std::uint64_t | addDataToLeaf_and_genLOD (const AlignedPointTVector &p, const bool skip_bb_check) |
Recursively add points to the leaf and children subsampling LODs on the way down. More... |
|
void | writeVPythonVisual (std::ofstream &file) |
Write a python visual script to file. More... |
|
virtual int | read (pcl::PCLPointCloud2::Ptr &output_cloud) |
node_type_t | getNodeType () const override |
OutofcoreOctreeBaseNode * | deepCopy () const override |
virtual std::size_t | getDepth () const |
virtual std::size_t | getNumChildren () const |
Returns the total number of children on disk. More... |
|
virtual std::size_t | getNumLoadedChildren () const |
Count loaded chilren. More... |
|
virtual OutofcoreOctreeBaseNode * | getChildPtr (std::size_t index_arg) const |
Returns a pointer to the child in octant index_arg. More... |
|
virtual std::uint64_t | getDataSize () const |
Gets the number of points available in the PCD file. More... |
|
virtual void | clearData () |
Static Public Attributes |
|
const static std::string | node_index_basename = "node" |
const static std::string | node_container_basename = "node" |
const static std::string | node_index_extension = ".oct_idx" |
const static std::string | node_container_extension = ".oct_dat" |
const static double | sample_percent_ = .125 |
Protected Member Functions |
|
OutofcoreOctreeBaseNode (const boost::filesystem::path &directory_path, OutofcoreOctreeBaseNode< ContainerT, PointT > *super, bool load_all) | |
Load from disk If creating root, path is full name. More... |
|
void | init_root_node (const Eigen::Vector3d &bb_min, const Eigen::Vector3d &bb_max, OutofcoreOctreeBase< ContainerT, PointT > *const tree, const boost::filesystem::path &rootname) |
Create root node and directory. More... |
|
OutofcoreOctreeBaseNode (const OutofcoreOctreeBaseNode &rval) | |
no copy construction right now More... |
|
OutofcoreOctreeBaseNode & | operator= (const OutofcoreOctreeBaseNode &rval) |
Operator= is not implemented. More... |
|
virtual std::size_t | countNumChildren () const |
Counts the number of child directories on disk; used to update num_children_. More... |
|
virtual std::size_t | countNumLoadedChildren () const |
Counts the number of loaded chilren by testing the children_ array; used to update num_loaded_chilren_ internally. More... |
|
void | saveIdx (bool recursive) |
Save node's metadata to file. More... |
|
void | randomSample (const AlignedPointTVector &p, AlignedPointTVector &insertBuff, const bool skip_bb_check) |
Randomly sample point data. More... |
|
void | subdividePoints (const AlignedPointTVector &p, std::vector< AlignedPointTVector > &c, const bool skip_bb_check) |
Subdivide points to pass to child nodes. More... |
|
void | subdividePoint (const PointT &point, std::vector< AlignedPointTVector > &c) |
Subdivide a single point into a specific child node. More... |
|
std::uint64_t | addDataAtMaxDepth (const AlignedPointTVector &p, const bool skip_bb_check=true) |
Add data to the leaf when at max depth of tree. More... |
|
std::uint64_t | addDataAtMaxDepth (const pcl::PCLPointCloud2::Ptr input_cloud, const bool skip_bb_check=true) |
Add data to the leaf when at max depth of tree. More... |
|
bool | intersectsWithBoundingBox (const Eigen::Vector3d &min_bb, const Eigen::Vector3d &max_bb) const |
Tests whether the input bounding box intersects with the current node's bounding box. More... |
|
bool | inBoundingBox (const Eigen::Vector3d &min_bb, const Eigen::Vector3d &max_bb) const |
Tests whether the input bounding box falls inclusively within this node's bounding box. More... |
|
bool | pointInBoundingBox (const Eigen::Vector3d &min_bb, const Eigen::Vector3d &max_bb, const Eigen::Vector3d &point) |
Tests whether point falls within the input bounding box. More... |
|
bool | pointInBoundingBox (const PointT &p) const |
Tests if specified point is within bounds of current node's bounding box. More... |
|
void | createChild (const std::size_t idx) |
Creates child node idx . More... |
|
void | saveMetadataToFile (const boost::filesystem::path &path) |
Write JSON metadata for this node to file. More... |
|
void | recFreeChildren () |
Method which recursively free children of this node. More... |
|
std::uint64_t | size () const |
Number of points in the payload. More... |
|
void | flushToDiskRecursive () |
void | loadFromFile (const boost::filesystem::path &path, OutofcoreOctreeBaseNode *super) |
Loads the nodes metadata from the JSON file. More... |
|
void | convertToXYZRecursive () |
Recursively converts data files to ascii XZY files. More... |
|
OutofcoreOctreeBaseNode (const Eigen::Vector3d &bb_min, const Eigen::Vector3d &bb_max, const char *dir, OutofcoreOctreeBaseNode< ContainerT, PointT > *super) | |
Private constructor used for children. More... |
|
void | copyAllCurrentAndChildPointsRec (std::list< PointT > &v) |
Copies points from this and all children into a single point container (std::list) More... |
|
void | copyAllCurrentAndChildPointsRec_sub (std::list< PointT > &v, const double percent) |
bool | hasUnloadedChildren () const |
Returns whether or not a node has unloaded children data. More... |
|
virtual void | loadChildren (bool recursive) |
Load nodes child data creating new nodes for each. More... |
|
void | getOccupiedVoxelCentersRecursive (AlignedPointTVector &voxel_centers, const std::size_t query_depth) |
Gets a vector of occupied voxel centers. More... |
|
void | getOccupiedVoxelCentersRecursive (std::vector< Eigen::Vector3d, Eigen::aligned_allocator< Eigen::Vector3d > > &voxel_centers, const std::size_t query_depth) |
Gets a vector of occupied voxel centers. More... |
|
void | sortOctantIndices (const pcl::PCLPointCloud2::Ptr &input_cloud, std::vector< pcl::Indices > &indices, const Eigen::Vector3d &mid_xyz) |
Sorts the indices based on x,y,z fields and pushes the index into the proper octant's vector; This could be overloaded with a parallelized implementation. More... |
|
void | enlargeToCube (Eigen::Vector3d &bb_min, Eigen::Vector3d &bb_max) |
Enlarges the shortest two sidelengths of the bounding box to a cubic shape; operation is done in place. More... |
|
Static Protected Member Functions |
|
static bool | pointInBoundingBox (const Eigen::Vector3d &min_bb, const Eigen::Vector3d &max_bb, const PointT &p) |
Tests whether p falls within the input bounding box. More... |
|
static bool | pointInBoundingBox (const Eigen::Vector3d &min_bb, const Eigen::Vector3d &max_bb, const double x, const double y, const double z) |
Tests whether x , y , and z fall within the input bounding box. More... |
|
Protected Attributes |
|
OutofcoreOctreeBase< ContainerT, PointT > * | m_tree_ |
The tree we belong to. More... |
|
OutofcoreOctreeBaseNode * | root_node_ |
The root node of the tree we belong to. More... |
|
OutofcoreOctreeBaseNode * | parent_ |
super-node More... |
|
std::size_t | depth_ |
Depth in the tree, root is 0, root's children are 1, ... More... |
|
std::vector< OutofcoreOctreeBaseNode * > | children_ |
The children of this node. More... |
|
std::uint64_t | num_children_ |
Number of children on disk. More... |
|
std::uint64_t | num_loaded_children_ |
Number of loaded children this node has. More... |
|
std::shared_ptr< ContainerT > | payload_ |
what holds the points. More... |
|
OutofcoreOctreeNodeMetadata::Ptr | node_metadata_ |
Static Protected Attributes |
|
static std::mutex | rng_mutex_ |
Random number generator mutex. More... |
|
static std::mt19937 | rng_ |
Mersenne Twister: A 623-dimensionally equidistributed uniform pseudo-random number generator. More... |
|
const static std::string | pcd_extension = ".pcd" |
Extension for this class to find the pcd files on disk. More... |
|
Friends |
|
class | OutofcoreOctreeBase< ContainerT, PointT > |
OutofcoreOctreeBaseNode< ContainerT, PointT > * | makenode_norec (const boost::filesystem::path &path, OutofcoreOctreeBaseNode< ContainerT, PointT > *super) |
Non-class function which creates a single child leaf; used with queryBBIntersects_noload to avoid loading the data from disk. More... |
|
void | queryBBIntersects_noload (const boost::filesystem::path &rootnode, const Eigen::Vector3d &min, const Eigen::Vector3d &max, const std::uint32_t query_depth, std::list< std::string > &bin_name) |
Non-class method which performs a bounding box query without loading any of the point cloud data from disk. More... |
|
void | queryBBIntersects_noload (OutofcoreOctreeBaseNode< ContainerT, PointT > *current, const Eigen::Vector3d &min, const Eigen::Vector3d &max, const std::uint32_t query_depth, std::list< std::string > &bin_name) |
Non-class method overload. More... |
|
Detailed Description
OutofcoreOctreeBaseNode Class internally representing nodes of an outofcore octree, with accessors to its data via the pcl::outofcore::OutofcoreOctreeDiskContainer class or pcl::outofcore::OutofcoreOctreeRamContainer class, whichever it is templated against.
- Note
- Code was adapted from the Urban Robotics out of core octree implementation. Contact Jacob Schloss jacob with any questions. .sch loss@ urba nrobo tics .nethttp://www.urbanrobotics.net/
Definition at line 62 of file octree_base_node.h.
Member Typedef Documentation
AlignedPointTVector
using pcl::outofcore::OutofcoreOctreeBaseNode::AlignedPointTVector = std::vector<PointT, Eigen::aligned_allocator<PointT> > |
Definition at line 113 of file octree_base_node.h.
node_type_t
Definition at line 115 of file octree_base_node.h.
octree_disk
using pcl::outofcore::OutofcoreOctreeBaseNode::octree_disk = OutofcoreOctreeBase<OutofcoreOctreeDiskContainer < PointT > , PointT > |
Definition at line 110 of file octree_base_node.h.
octree_disk_node
using pcl::outofcore::OutofcoreOctreeBaseNode::octree_disk_node = OutofcoreOctreeBaseNode<OutofcoreOctreeDiskContainer < PointT > , PointT > |
Definition at line 111 of file octree_base_node.h.
Constructor & Destructor Documentation
OutofcoreOctreeBaseNode() [1/5]
pcl::outofcore::OutofcoreOctreeBaseNode::OutofcoreOctreeBaseNode | ( | ) |
Empty constructor; sets pointers for children and for bounding boxes to 0.
Definition at line 92 of file octree_base_node.hpp.
References node_metadata_.
OutofcoreOctreeBaseNode() [2/5]
pcl::outofcore::OutofcoreOctreeBaseNode::OutofcoreOctreeBaseNode | ( | const Eigen::Vector3d & | bb_min, |
const Eigen::Vector3d & | bb_max, | ||
OutofcoreOctreeBase< ContainerT, PointT > *const | tree, | ||
const boost::filesystem::path & | root_name | ||
) |
Create root node and directory.
Definition at line 183 of file octree_base_node.hpp.
References init_root_node(), and node_metadata_.
~OutofcoreOctreeBaseNode()
pcl::outofcore::OutofcoreOctreeBaseNode::~OutofcoreOctreeBaseNode | ( | ) |
Will recursively delete all children calling recFreeChildrein.
Definition at line 259 of file octree_base_node.hpp.
OutofcoreOctreeBaseNode() [3/5]
|
protected |
Load from disk If creating root, path is full name.
If creating any other node, path is dir; throws exception if directory or metadata not found
- Parameters
-
[in] directory_path pathname [in] super [in] load_all
- Exceptions
-
PCLException if directory is missing PCLException if node index is missing
Definition at line 109 of file octree_base_node.hpp.
References countNumChildren(), depth_, getDepth(), loadChildren(), loadFromFile(), node_index_extension, node_metadata_, num_children_, and root_node_.
OutofcoreOctreeBaseNode() [4/5]
|
protected |
no copy construction right now
OutofcoreOctreeBaseNode() [5/5]
|
protected |
Private constructor used for children.
Definition at line 1700 of file octree_base_node.hpp.
References depth_, pcl::outofcore::OutofcoreOctreeDiskContainer< PointT >::getRandomUUIDString(), m_tree_, node_container_basename, node_index_basename, node_index_extension, node_metadata_, num_children_, parent_, payload_, pcd_extension, root_node_, and saveIdx().
Member Function Documentation
addDataAtMaxDepth() [1/2]
|
protected |
Add data to the leaf when at max depth of tree.
If skip_bb_check is true, adds to the node regardless of the bounding box it represents; otherwise only adds points that fall within the bounding box
- Parameters
-
[in] p vector of points to attempt to add to the tree [in] skip_bb_check if true, doesn't check that points are in the proper bounding box; if false, only adds the points that fall into the bounding box to this node
- Returns
- number of points successfully added
addDataAtMaxDepth() [2/2]
|
protected |
Add data to the leaf when at max depth of tree.
If skip_bb_check
is true, adds to the node regardless of the bounding box it represents; otherwise only adds points that fall within the bounding box
- Parameters
-
[in] input_cloud PCLPointCloud2 points to attempt to add to the tree;
- Warning
- PCLPointCloud2 inserted into the tree must have x,y,z fields, and must be of same type of any other points inserted in the tree
- Parameters
-
[in] skip_bb_check (default true) if true, doesn't check that points are in the proper bounding box; if false, only adds the points that fall into the bounding box to this node
- Returns
- number of points successfully added
addDataToLeaf() [1/2]
|
virtual |
add point to this node if we are a leaf, or find the leaf below us that is supposed to take the point
- Parameters
-
[in] p vector of points to add to the leaf [in] skip_bb_check whether to check if the point's coordinates fall within the bounding box
addDataToLeaf() [2/2]
|
virtual |
addDataToLeaf_and_genLOD()
|
virtual |
Recursively add points to the leaf and children subsampling LODs on the way down.
- Note
- rng_mutex_ lock occurs
Definition at line 802 of file octree_base_node.hpp.
addPointCloud()
|
virtual |
Add a single PCLPointCloud2 object into the octree.
- Parameters
-
[in] input_cloud [in] skip_bb_check (default = false)
Definition at line 495 of file octree_base_node.hpp.
References pcl::copyPointCloud().
addPointCloud_and_genLOD()
|
virtual |
Add a single PCLPointCloud2 into the octree and build the subsampled LOD during construction; this method of LOD construction is not multiresolution.
Rather, there are no redundant data.
Definition at line 702 of file octree_base_node.hpp.
References pcl::copyPointCloud(), pcl::FilterIndices< pcl::PCLPointCloud2 >::filter(), pcl::PCLBase< pcl::PCLPointCloud2 >::setIndices(), pcl::PCLBase< pcl::PCLPointCloud2 >::setInputCloud(), pcl::FilterIndices< pcl::PCLPointCloud2 >::setNegative(), and pcl::RandomSample< pcl::PCLPointCloud2 >::setSample().
clearData()
|
inlinevirtual |
Definition at line 302 of file octree_base_node.h.
References payload_.
convertToXYZRecursive()
|
protected |
Recursively converts data files to ascii XZY files.
Definition at line 1943 of file octree_base_node.hpp.
copyAllCurrentAndChildPointsRec()
|
protected |
Copies points from this and all children into a single point container (std::list)
Definition at line 1752 of file octree_base_node.hpp.
copyAllCurrentAndChildPointsRec_sub()
|
protected |
Definition at line 1775 of file octree_base_node.hpp.
countNumChildren()
|
protectedvirtual |
Counts the number of child directories on disk; used to update num_children_.
Definition at line 268 of file octree_base_node.hpp.
Referenced by getNumChildren(), and OutofcoreOctreeBaseNode().
countNumLoadedChildren()
|
protectedvirtual |
Counts the number of loaded chilren by testing the children_
array; used to update num_loaded_chilren_ internally.
Definition at line 1909 of file octree_base_node.hpp.
Referenced by getNumLoadedChildren().
createChild()
|
protected |
Creates child node idx
.
- Parameters
-
[in] idx Index (0-7) of the child node
Definition at line 860 of file octree_base_node.hpp.
deepCopy()
|
inlineoverride |
Definition at line 264 of file octree_base_node.h.
enlargeToCube()
|
protected |
Enlarges the shortest two sidelengths of the bounding box to a cubic shape; operation is done in place.
flushToDiskRecursive()
|
protected |
Definition at line 1964 of file octree_base_node.hpp.
getBoundingBox()
|
inlinevirtual |
gets the minimum and maximum corner of the bounding box represented by this node
- Parameters
-
[out] min_bb returns the minimum corner of the bounding box indexed by 0-->X, 1-->Y, 2-->Z [out] max_bb returns the maximum corner of the bounding box indexed by 0-->X, 1-->Y, 2-->Z
Definition at line 140 of file octree_base_node.h.
References node_metadata_.
getChildPtr()
|
virtual |
Returns a pointer to the child in octant index_arg.
Definition at line 1893 of file octree_base_node.hpp.
Referenced by pcl::outofcore::OutofcoreOctreeBase< ContainerT, pcl::PointXYZRGB >::getBranchChildPtr().
getDataSize()
|
virtual |
Gets the number of points available in the PCD file.
Definition at line 1901 of file octree_base_node.hpp.
getDepth()
|
inlinevirtual |
Definition at line 272 of file octree_base_node.h.
References depth_.
Referenced by pcl::outofcore::OutofcoreOctreeBase< ContainerT, pcl::PointXYZRGB >::buildLODRecursive(), pcl::outofcore::OutofcoreBreadthFirstIterator< PointT, ContainerT >::operator++(), and OutofcoreOctreeBaseNode().
getMetadataFilename()
|
inline |
Definition at line 153 of file octree_base_node.h.
References node_metadata_.
getNodeType()
|
inlineoverride |
Definition at line 253 of file octree_base_node.h.
References pcl::octree::BRANCH_NODE, getNumChildren(), and pcl::octree::LEAF_NODE.
Referenced by pcl::outofcore::OutofcoreBreadthFirstIterator< PointT, ContainerT >::operator++().
getNumChildren()
|
inlinevirtual |
Returns the total number of children on disk.
Definition at line 279 of file octree_base_node.h.
References countNumChildren().
Referenced by getNodeType().
getNumLoadedChildren()
|
inlinevirtual |
Count loaded chilren.
Definition at line 287 of file octree_base_node.h.
References countNumLoadedChildren().
getOccupiedVoxelCentersRecursive() [1/2]
|
protected |
Gets a vector of occupied voxel centers.
- Parameters
-
[out] voxel_centers [in] query_depth
Definition at line 968 of file octree_base_node.hpp.
getOccupiedVoxelCentersRecursive() [2/2]
|
protected |
Gets a vector of occupied voxel centers.
- Parameters
-
[out] voxel_centers [in] query_depth
Definition at line 1312 of file octree_base_node.hpp.
getPCDFilename()
|
inline |
Definition at line 147 of file octree_base_node.h.
References node_metadata_.
hasUnloadedChildren()
|
protected |
Returns whether or not a node has unloaded children data.
Definition at line 301 of file octree_base_node.hpp.
inBoundingBox()
|
inlineprotected |
Tests whether the input bounding box falls inclusively within this node's bounding box.
- Parameters
-
[in] min_bb The minimum corner of the input bounding box [in] max_bb The maximum corner of the input bounding box
- Returns
- bool True if the input bounding box falls inclusively within the boundaries of this node's bounding box
Definition at line 1822 of file octree_base_node.hpp.
init_root_node()
|
protected |
Create root node and directory.
Initializes the root node and performs initial filesystem checks for the octree; throws OctreeException::OCT_BAD_PATH if root directory is an existing file
- Parameters
-
bb_min triple of x,y,z minima for bounding box bb_max triple of x,y,z maxima for bounding box tree address of the tree data structure that will hold this initial root node rootname Root directory for location of on-disk octree storage; if directory doesn't exist, it is created; if "rootname" is an existing file,
- Exceptions
-
PCLException if the specified path already exists
Definition at line 202 of file octree_base_node.hpp.
References pcl::outofcore::OutofcoreOctreeDiskContainer< PointT >::getRandomUUIDString().
Referenced by OutofcoreOctreeBaseNode().
intersectsWithBoundingBox()
|
inlineprotected |
Tests whether the input bounding box intersects with the current node's bounding box.
- Parameters
-
[in] min_bb The minimum corner of the input bounding box [in] max_bb The maximum corner of the input bounding box
- Returns
- bool True if any portion of the bounding box intersects with this node's bounding box; false otherwise
Definition at line 1800 of file octree_base_node.hpp.
loadChildren()
|
protectedvirtual |
Load nodes child data creating new nodes for each.
Definition at line 308 of file octree_base_node.hpp.
Referenced by OutofcoreOctreeBaseNode().
loadFromFile()
|
protected |
Loads the nodes metadata from the JSON file.
Definition at line 1925 of file octree_base_node.hpp.
Referenced by OutofcoreOctreeBaseNode().
operator=()
|
protected |
Operator= is not implemented.
pointInBoundingBox() [1/4]
|
staticprotected |
Tests whether x
, y
, and z
fall within the input bounding box.
- Parameters
-
[in] min_bb The minimum corner of the input bounding box [in] max_bb The maximum corner of the input bounding box x y z
pointInBoundingBox() [2/4]
|
protected |
Tests whether point
falls within the input bounding box.
- Parameters
-
[in] min_bb The minimum corner of the input bounding box [in] max_bb The maximum corner of the input bounding box [in] point The test point
pointInBoundingBox() [3/4]
|
inlinestaticprotected |
Tests whether p
falls within the input bounding box.
- Parameters
-
[in] min_bb The minimum corner of the input bounding box [in] max_bb The maximum corner of the input bounding box [in] p The point to be tested
Definition at line 1844 of file octree_base_node.hpp.
pointInBoundingBox() [4/4]
|
inlineprotected |
Tests if specified point is within bounds of current node's bounding box.
Definition at line 923 of file octree_base_node.hpp.
printBoundingBox()
|
virtual |
Write the voxel size to stdout at query_depth
.
- Parameters
-
[in] query_depth The depth at which to print the size of the voxel/bounding boxes
Definition at line 940 of file octree_base_node.hpp.
queryBBIncludes() [1/2]
|
virtual |
Recursively add points that fall into the queried bounding box up to the query_depth.
- Parameters
-
[in] min_bb the minimum corner of the bounding box, indexed by X,Y,Z coordinates [in] max_bb the maximum corner of the bounding box, indexed by X,Y,Z coordinates [in] query_depth the maximum depth to query in the octree for points within the bounding box [out] dst destion of points returned by the queries
queryBBIncludes() [2/2]
|
virtual |
Recursively add points that fall into the queried bounding box up to the query_depth.
- Parameters
-
[in] min_bb the minimum corner of the bounding box, indexed by X,Y,Z coordinates [in] max_bb the maximum corner of the bounding box, indexed by X,Y,Z coordinates [in] query_depth the maximum depth to query in the octree for points within the bounding box [out] dst_blob destion of points returned by the queries
Definition at line 1375 of file octree_base_node.hpp.
References pcl::concatenate(), pcl::copyPointCloud(), pcl::fromPCLPointCloud2(), pcl::getPointsInBox(), pcl::PointCloud< PointT >::height, pcl::utils::ignore(), and pcl::PointCloud< PointT >::width.
queryBBIncludes_subsample() [1/2]
|
virtual |
Recursively add points that fall into the queried bounding box up to the query_depth.
- Parameters
-
[in] min_bb the minimum corner of the bounding box, indexed by X,Y,Z coordinates [in] max_bb the maximum corner of the bounding box, indexed by X,Y,Z coordinates [in] query_depth percent [out] v std::list of points returned by the query
queryBBIncludes_subsample() [2/2]
|
virtual |
queryBBIntersects()
|
virtual |
Recursive acquires PCD paths to any node with which the queried bounding box intersects (at query_depth only).
Definition at line 1335 of file octree_base_node.hpp.
Referenced by pcl::outofcore::OutofcoreOctreeBase< ContainerT, pcl::PointXYZRGB >::queryBoundingBox().
queryFrustum() [1/3]
void pcl::outofcore::OutofcoreOctreeBaseNode::queryFrustum | ( | const double | planes[24], |
const Eigen::Vector3d & | eye, | ||
const Eigen::Matrix4d & | view_projection_matrix, | ||
std::list< std::string > & | file_names, | ||
const std::uint32_t | query_depth, | ||
const bool | skip_vfc_check = false |
||
) |
queryFrustum() [2/3]
void pcl::outofcore::OutofcoreOctreeBaseNode::queryFrustum | ( | const double | planes[24], |
std::list< std::string > & | file_names | ||
) |
Definition at line 1045 of file octree_base_node.hpp.
queryFrustum() [3/3]
void pcl::outofcore::OutofcoreOctreeBaseNode::queryFrustum | ( | const double | planes[24], |
std::list< std::string > & | file_names, | ||
const std::uint32_t | query_depth, | ||
const bool | skip_vfc_check = false |
||
) |
randomSample()
|
protected |
Randomly sample point data.
Definition at line 559 of file octree_base_node.hpp.
References pcl::outofcore::pointInBoundingBox().
read()
|
virtual |
Definition at line 1885 of file octree_base_node.hpp.
Referenced by pcl::outofcore::OutofcoreOctreeBase< ContainerT, pcl::PointXYZRGB >::buildLODRecursive().
recFreeChildren()
|
protected |
Method which recursively free children of this node.
Definition at line 332 of file octree_base_node.hpp.
saveIdx()
|
protected |
Save node's metadata to file.
- Parameters
-
[in] recursive if false, save only this node's metadata to file; if true, recursively save all children's metadata to files as well
Definition at line 284 of file octree_base_node.hpp.
Referenced by OutofcoreOctreeBaseNode().
saveMetadataToFile()
|
protected |
Write JSON metadata for this node to file.
size()
|
inlineprotected |
Number of points in the payload.
Definition at line 467 of file octree_base_node.h.
References payload_.
sortOctantIndices()
|
protected |
Sorts the indices based on x,y,z fields and pushes the index into the proper octant's vector; This could be overloaded with a parallelized implementation.
Definition at line 1976 of file octree_base_node.hpp.
References pcl::getFieldIndex(), and pcl::outofcore::pointInBoundingBox().
subdividePoint()
|
protected |
Subdivide a single point into a specific child node.
Definition at line 692 of file octree_base_node.hpp.
subdividePoints()
|
protected |
Subdivide points to pass to child nodes.
Definition at line 670 of file octree_base_node.hpp.
References pcl::outofcore::pointInBoundingBox().
writeVPythonVisual()
void pcl::outofcore::OutofcoreOctreeBaseNode::writeVPythonVisual | ( | std::ofstream & | file | ) |
Write a python visual script to file.
- Parameters
-
[in] file output file stream to write the python visual script
Definition at line 1864 of file octree_base_node.hpp.
Friends And Related Function Documentation
makenode_norec
|
friend |
Non-class function which creates a single child leaf; used with queryBBIntersects_noload to avoid loading the data from disk.
OutofcoreOctreeBase< ContainerT, PointT >
|
friend |
Definition at line 97 of file octree_base_node.h.
queryBBIntersects_noload [1/2]
|
friend |
Non-class method which performs a bounding box query without loading any of the point cloud data from disk.
queryBBIntersects_noload [2/2]
|
friend |
Non-class method overload.
Member Data Documentation
children_
|
protected |
The children of this node.
Definition at line 540 of file octree_base_node.h.
depth_
|
protected |
Depth in the tree, root is 0, root's children are 1, ...
Definition at line 538 of file octree_base_node.h.
Referenced by getDepth(), and OutofcoreOctreeBaseNode().
m_tree_
|
protected |
The tree we belong to.
Definition at line 532 of file octree_base_node.h.
Referenced by OutofcoreOctreeBaseNode().
node_container_basename
|
static |
Definition at line 118 of file octree_base_node.h.
Referenced by OutofcoreOctreeBaseNode().
node_container_extension
|
static |
Definition at line 120 of file octree_base_node.h.
node_index_basename
|
static |
Definition at line 117 of file octree_base_node.h.
Referenced by OutofcoreOctreeBaseNode().
node_index_extension
|
static |
Definition at line 119 of file octree_base_node.h.
Referenced by OutofcoreOctreeBaseNode().
node_metadata_
|
protected |
Definition at line 568 of file octree_base_node.h.
Referenced by getBoundingBox(), getMetadataFilename(), getPCDFilename(), and OutofcoreOctreeBaseNode().
num_children_
|
protected |
Number of children on disk.
This is only changed when a new node is created
Definition at line 543 of file octree_base_node.h.
Referenced by OutofcoreOctreeBaseNode().
num_loaded_children_
|
protected |
Number of loaded children this node has.
"Loaded" means child OctreeBaseNodes have been allocated, and their metadata files have been loaded into memory. num_loaded_children_ <= num_children_
Definition at line 551 of file octree_base_node.h.
parent_
|
protected |
super-node
Definition at line 536 of file octree_base_node.h.
Referenced by OutofcoreOctreeBaseNode().
payload_
|
protected |
what holds the points.
currently a custom class, but in theory you could use an stl container if you rewrote some of this class. I used to use deques for this...
Definition at line 556 of file octree_base_node.h.
Referenced by pcl::outofcore::OutofcoreOctreeBase< ContainerT, pcl::PointXYZRGB >::buildLODRecursive(), clearData(), OutofcoreOctreeBaseNode(), and size().
pcd_extension
|
staticprotected |
Extension for this class to find the pcd files on disk.
Definition at line 566 of file octree_base_node.h.
Referenced by OutofcoreOctreeBaseNode().
rng_
|
staticprotected |
Mersenne Twister: A 623-dimensionally equidistributed uniform pseudo-random number generator.
Definition at line 563 of file octree_base_node.h.
rng_mutex_
|
staticprotected |
Random number generator mutex.
Definition at line 559 of file octree_base_node.h.
root_node_
|
protected |
The root node of the tree we belong to.
Definition at line 534 of file octree_base_node.h.
Referenced by OutofcoreOctreeBaseNode().
sample_percent_
|
static |
Definition at line 121 of file octree_base_node.h.
The documentation for this class was generated from the following files:
- pcl/outofcore/octree_base_node.h
- pcl/outofcore/impl/octree_base_node.hpp
© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1outofcore_1_1_outofcore_octree_base_node.html