Solar
Public Member Functions | List of all members
SolAR::MODULES::TOOLS::SolARPointCloudManager Class Reference

A storage component to store a persistent cloud of 3D points, based on a std::set. More...

#include <SolARPointCloudManager.h>

Inheritance diagram for SolAR::MODULES::TOOLS::SolARPointCloudManager:
Inheritance graph
[legend]
Collaboration diagram for SolAR::MODULES::TOOLS::SolARPointCloudManager:
Collaboration graph
[legend]

Public Member Functions

FrameworkReturnCode addPoint (const SRef< SolAR::datastructure::CloudPoint > point) override
 This method allow to add a 3D point to the point cloud. More...
 
FrameworkReturnCode addPoints (const std::vector< SRef< SolAR::datastructure::CloudPoint > > &points) override
 This method allow to add a vector of 3D points to the point cloud. More...
 
FrameworkReturnCode addPoint (const SolAR::datastructure::CloudPoint &point) override
 This method allow to add a 3D point to the point cloud. More...
 
FrameworkReturnCode addPoints (const std::vector< SolAR::datastructure::CloudPoint > &points) override
 This method allow to add a vector of 3D points to the point cloud. More...
 
FrameworkReturnCode getPoint (const uint32_t id, SRef< SolAR::datastructure::CloudPoint > &point) const override
 This method allows to get a 3D point stored in the point cloud by its id. More...
 
FrameworkReturnCode getPoints (const std::vector< uint32_t > &ids, std::vector< SRef< SolAR::datastructure::CloudPoint > > &points) const override
 This method allows to get a set of 3D points stored in the point cloud by their ids. More...
 
FrameworkReturnCode getAllPoints (std::vector< SRef< SolAR::datastructure::CloudPoint > > &points) const override
 This method allows to get all 3D points stored in the point cloud. More...
 
FrameworkReturnCode suppressPoint (const uint32_t id) override
 This method allow to suppress a point stored in the point cloud by its id. More...
 
FrameworkReturnCode suppressPoints (const std::vector< uint32_t > &ids) override
 This method allow to suppress a vector of points stored in the point cloud by their ids. More...
 
SolAR::datastructure::DescriptorType getDescriptorType () const override
 This method allows to get the descriptor type used to extract descriptor for each cloud point. More...
 
FrameworkReturnCode setDescriptorType (const SolAR::datastructure::DescriptorType &type) override
 This method allows to set the descriptor type used to extract descriptor for each cloud point. More...
 
bool isExistPoint (const uint32_t id) const override
 This method allows to know if a point is already stored in the component. More...
 
int getNbPoints () const override
 This method allows to get the number of points stored in the point cloud. More...
 
FrameworkReturnCode saveToFile (const std::string &file) const override
 This method allows to save the point cloud to the external file. More...
 
FrameworkReturnCode loadFromFile (const std::string &file) override
 This method allows to load the point cloud from the external file. More...
 
const SRef< datastructure::PointCloud > & getConstPointCloud () const override
 This method returns the point cloud. More...
 
std::unique_lock< std::mutex > getPointCloud (SRef< datastructure::PointCloud > &pointCloud) override
 This method returns the point cloud. More...
 
void setPointCloud (const SRef< datastructure::PointCloud > pointCloud) override
 This method is to set the point cloud. More...
 
void unloadComponent () override final
 

Detailed Description

A storage component to store a persistent cloud of 3D points, based on a std::set.

Member Function Documentation

◆ addPoint() [1/2]

FrameworkReturnCode SolAR::MODULES::TOOLS::SolARPointCloudManager::addPoint ( const SolAR::datastructure::CloudPoint &  point)
override

This method allow to add a 3D point to the point cloud.

Parameters
[in]pointthe 3D point to add to the persistent point cloud
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ addPoint() [2/2]

FrameworkReturnCode SolAR::MODULES::TOOLS::SolARPointCloudManager::addPoint ( const SRef< SolAR::datastructure::CloudPoint >  point)
override

This method allow to add a 3D point to the point cloud.

Parameters
[in]pointthe 3D point to add to the persistent point cloud
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ addPoints() [1/2]

FrameworkReturnCode SolAR::MODULES::TOOLS::SolARPointCloudManager::addPoints ( const std::vector< SolAR::datastructure::CloudPoint > &  points)
override

This method allow to add a vector of 3D points to the point cloud.

Parameters
[in]avector of the 3D points to add to the persistent point cloud
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ addPoints() [2/2]

FrameworkReturnCode SolAR::MODULES::TOOLS::SolARPointCloudManager::addPoints ( const std::vector< SRef< SolAR::datastructure::CloudPoint > > &  points)
override

This method allow to add a vector of 3D points to the point cloud.

Parameters
[in]avector of the 3D points to add to the persistent point cloud
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ getAllPoints()

FrameworkReturnCode SolAR::MODULES::TOOLS::SolARPointCloudManager::getAllPoints ( std::vector< SRef< SolAR::datastructure::CloudPoint > > &  points) const
override

This method allows to get all 3D points stored in the point cloud.

Parameters
[out]theset of 3D point stored in the point cloud
Returns
FrameworkReturnCode::SUCCESS if succeed, else FrameworkReturnCode::_ERROR.

◆ getConstPointCloud()

const SRef< datastructure::PointCloud > & SolAR::MODULES::TOOLS::SolARPointCloudManager::getConstPointCloud ( ) const
override

This method returns the point cloud.

Returns
the point cloud

◆ getDescriptorType()

SolAR::datastructure::DescriptorType SolAR::MODULES::TOOLS::SolARPointCloudManager::getDescriptorType ( ) const
override

This method allows to get the descriptor type used to extract descriptor for each cloud point.

Returns
Descriptor type

◆ getNbPoints()

int SolAR::MODULES::TOOLS::SolARPointCloudManager::getNbPoints ( ) const
override

This method allows to get the number of points stored in the point cloud.

Returns
The number of points

◆ getPoint()

FrameworkReturnCode SolAR::MODULES::TOOLS::SolARPointCloudManager::getPoint ( const uint32_t  id,
SRef< SolAR::datastructure::CloudPoint > &  point 
) const
override

This method allows to get a 3D point stored in the point cloud by its id.

Parameters
[in]idof the point to get
[out]a3D point stored in the point cloud
Returns
FrameworkReturnCode::SUCCESS if succeed, else FrameworkReturnCode::_ERROR.

◆ getPointCloud()

std::unique_lock< std::mutex > SolAR::MODULES::TOOLS::SolARPointCloudManager::getPointCloud ( SRef< datastructure::PointCloud > &  pointCloud)
override

This method returns the point cloud.

Parameters
[out]pointCloudthe point cloud
Returns
the point cloud

◆ getPoints()

FrameworkReturnCode SolAR::MODULES::TOOLS::SolARPointCloudManager::getPoints ( const std::vector< uint32_t > &  ids,
std::vector< SRef< SolAR::datastructure::CloudPoint > > &  points 
) const
override

This method allows to get a set of 3D points stored in the point cloud by their ids.

Parameters
[in]avector of ids of the points to get
[out]avector of 3D points stored in the point cloud
Returns
FrameworkReturnCode::SUCCESS if succeed, else FrameworkReturnCode::_ERROR.

◆ isExistPoint()

bool SolAR::MODULES::TOOLS::SolARPointCloudManager::isExistPoint ( const uint32_t  id) const
override

This method allows to know if a point is already stored in the component.

Parameters
[in]Idof this point
Returns
true if exist, else false

◆ loadFromFile()

FrameworkReturnCode SolAR::MODULES::TOOLS::SolARPointCloudManager::loadFromFile ( const std::string &  file)
override

This method allows to load the point cloud from the external file.

Parameters
[in]filethe file name
Returns
FrameworkReturnCode::SUCCESS if the suppression succeed, else FrameworkReturnCode::_ERROR.

◆ saveToFile()

FrameworkReturnCode SolAR::MODULES::TOOLS::SolARPointCloudManager::saveToFile ( const std::string &  file) const
override

This method allows to save the point cloud to the external file.

Parameters
[in]filethe file name
Returns
FrameworkReturnCode::SUCCESS if the suppression succeed, else FrameworkReturnCode::_ERROR.

◆ setDescriptorType()

FrameworkReturnCode SolAR::MODULES::TOOLS::SolARPointCloudManager::setDescriptorType ( const SolAR::datastructure::DescriptorType &  type)
override

This method allows to set the descriptor type used to extract descriptor for each cloud point.

Returns
Descriptor type

◆ setPointCloud()

void SolAR::MODULES::TOOLS::SolARPointCloudManager::setPointCloud ( const SRef< datastructure::PointCloud >  pointCloud)
override

This method is to set the point cloud.

Parameters
[in]pointCloudthe point cloud

◆ suppressPoint()

FrameworkReturnCode SolAR::MODULES::TOOLS::SolARPointCloudManager::suppressPoint ( const uint32_t  id)
override

This method allow to suppress a point stored in the point cloud by its id.

Parameters
[in]idof the point to suppress
Returns
FrameworkReturnCode::SUCCESS if the suppression succeed, else FrameworkReturnCode::_ERROR.

◆ suppressPoints()

FrameworkReturnCode SolAR::MODULES::TOOLS::SolARPointCloudManager::suppressPoints ( const std::vector< uint32_t > &  ids)
override

This method allow to suppress a vector of points stored in the point cloud by their ids.

Parameters
[in]idsthe vector of ids of the point to suppress
Returns
FrameworkReturnCode::SUCCESS if the suppression succeed, else FrameworkReturnCode::_ERROR.

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