ReUseX  0.0.1
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
ReUseX::io Namespace Reference

Classes

class  RTABMapDatabase
 Core database class that wraps RTABMap's database functionality. More...

Functions

auto getPlanes (CloudLConstPtr planes, CloudNConstPtr normals, CloudLocConstPtr locations) -> std::tuple< EigenVectorContainer< double, 4 >, EigenVectorContainer< double, 3 >, std::vector< IndicesPtr > >
 Extract plane data from labeled point clouds.
bool save (std::filesystem::path const &output_path, std::vector< pcl::ModelCoefficients > const &model_coefficients, std::vector< Eigen::Vector4f, Eigen::aligned_allocator< Eigen::Vector4f > > const &centroids, std::vector< std::shared_ptr< pcl::Indices > > const &inlier_indices)
 Save plane data to file.
bool read (std::filesystem::path const &input_path, std::vector< pcl::ModelCoefficients > &model_coefficients, std::vector< Eigen::Vector4f, Eigen::aligned_allocator< Eigen::Vector4f > > &centroids, std::vector< std::shared_ptr< pcl::Indices > > &inlier_indices)
 Read plane data from file.
auto configure_rhino_model () -> std::unique_ptr< ONX_Model >
auto create_rhino_layers (ONX_Model &model, const std::set< std::string > &layer_names, std::optional< std::vector< ON_Color > > layer_colors={}, const ON_Layer *base_layer=nullptr) -> std::vector< int >
auto make_rhino_pointcloud (CloudConstPtr cloud) -> std::unique_ptr< ON_PointCloud >
auto save_rhino_pointcloud (CloudConstPtr pcl_cloud, CloudLConstPtr pcl_labels) -> std::unique_ptr< ONX_Model >
auto import_rtabmap_database (const std::filesystem::path &database_path, float resolution, float min_distance, float max_distance, float sampling_factor) -> std::tuple< CloudPtr, CloudNPtr, CloudLPtr >
bool checkRTABMapDatabase (std::filesystem::path const &dbPath)
bool initRTABMapDatabase (std::filesystem::path const &dbPath)
bool writeLabelsToRTABMapDatabase (std::filesystem::path const &dbPath, cv::Mat const &labels, std::optional< size_t > id=std::nullopt)
cv::Mat readLabelsFromRTABMapDatabase (std::filesystem::path const &dbPath, size_t id)

Function Documentation

◆ checkRTABMapDatabase()

bool ReUseX::io::checkRTABMapDatabase ( std::filesystem::path const & dbPath)

◆ configure_rhino_model()

auto ReUseX::io::configure_rhino_model ( ) -> std::unique_ptr< ONX_Model >

◆ create_rhino_layers()

auto ReUseX::io::create_rhino_layers ( ONX_Model & model,
const std::set< std::string > & layer_names,
std::optional< std::vector< ON_Color > > layer_colors = {},
const ON_Layer * base_layer = nullptr ) -> std::vector< int >

◆ getPlanes()

auto ReUseX::io::getPlanes ( CloudLConstPtr planes,
CloudNConstPtr normals,
CloudLocConstPtr locations ) -> std::tuple< EigenVectorContainer< double, 4 >, EigenVectorContainer< double, 3 >, std::vector< IndicesPtr > >

Extract plane data from labeled point clouds.

Parameters
planesLabeled point cloud where labels indicate plane IDs.
normalsPoint cloud containing plane normals.
locationsPoint cloud containing plane centroid locations.
Returns
Tuple of (plane coefficients, centroids, inlier indices).

◆ import_rtabmap_database()

auto ReUseX::io::import_rtabmap_database ( const std::filesystem::path & database_path,
float resolution,
float min_distance,
float max_distance,
float sampling_factor ) -> std::tuple< CloudPtr, CloudNPtr, CloudLPtr >

◆ initRTABMapDatabase()

bool ReUseX::io::initRTABMapDatabase ( std::filesystem::path const & dbPath)

◆ make_rhino_pointcloud()

auto ReUseX::io::make_rhino_pointcloud ( CloudConstPtr cloud) -> std::unique_ptr< ON_PointCloud >

◆ read()

bool ReUseX::io::read ( std::filesystem::path const & input_path,
std::vector< pcl::ModelCoefficients > & model_coefficients,
std::vector< Eigen::Vector4f, Eigen::aligned_allocator< Eigen::Vector4f > > & centroids,
std::vector< std::shared_ptr< pcl::Indices > > & inlier_indices )
nodiscard

Read plane data from file.

Parameters
input_pathPath to input file.
model_coefficientsOutput plane model coefficients.
centroidsOutput plane centroids.
inlier_indicesOutput indices of points belonging to each plane.
Returns
True if read was successful, false otherwise.

◆ readLabelsFromRTABMapDatabase()

cv::Mat ReUseX::io::readLabelsFromRTABMapDatabase ( std::filesystem::path const & dbPath,
size_t id )

◆ save()

bool ReUseX::io::save ( std::filesystem::path const & output_path,
std::vector< pcl::ModelCoefficients > const & model_coefficients,
std::vector< Eigen::Vector4f, Eigen::aligned_allocator< Eigen::Vector4f > > const & centroids,
std::vector< std::shared_ptr< pcl::Indices > > const & inlier_indices )
nodiscard

Save plane data to file.

Parameters
output_pathPath to output file.
model_coefficientsPlane model coefficients.
centroidsPlane centroids.
inlier_indicesIndices of points belonging to each plane.
Returns
True if save was successful, false otherwise.

◆ save_rhino_pointcloud()

auto ReUseX::io::save_rhino_pointcloud ( CloudConstPtr pcl_cloud,
CloudLConstPtr pcl_labels ) -> std::unique_ptr< ONX_Model >
nodiscard

◆ writeLabelsToRTABMapDatabase()

bool ReUseX::io::writeLabelsToRTABMapDatabase ( std::filesystem::path const & dbPath,
cv::Mat const & labels,
std::optional< size_t > id = std::nullopt )