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

A storage component to store a persistent set of keyframes, based on a std::set. More...

#include <SolARKeyframesManager.h>

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

Public Member Functions

 SolARKeyframesManager ()
 SolARKeyframesManager default constructor.
 
 ~SolARKeyframesManager ()=default
 SolARKeyframesManager default destructor.
 
FrameworkReturnCode addKeyframe (const SRef< SolAR::datastructure::Keyframe > keyframe) override
 This method allow to add a frame to the keyframe manager component. More...
 
FrameworkReturnCode addKeyframe (const SolAR::datastructure::Keyframe &keyframe) override
 This method allow to add a frame to the key frame manager component. More...
 
FrameworkReturnCode getKeyframe (const uint32_t id, SRef< SolAR::datastructure::Keyframe > &keyframe) const override
 This method allows to get a keyframe by its id. More...
 
FrameworkReturnCode getKeyframes (const std::vector< uint32_t > &ids, std::vector< SRef< SolAR::datastructure::Keyframe > > &keyframes) const override
 This method allows to get a set of keyframes by their ids. More...
 
FrameworkReturnCode getAllKeyframes (std::vector< SRef< SolAR::datastructure::Keyframe > > &keyframes) const override
 This method allows to get all keyframes. More...
 
FrameworkReturnCode suppressKeyframe (const uint32_t id) override
 This method allow to suppress a keyframe by its id. More...
 
SolAR::datastructure::DescriptorType getDescriptorType () const override
 This method allows to get the descriptor type used to extract descriptor for each keyframe. More...
 
FrameworkReturnCode setDescriptorType (const SolAR::datastructure::DescriptorType &type) override
 This method allows to set the descriptor type used to extract descriptor for each keyframe. More...
 
bool isExistKeyframe (const uint32_t id) const override
 This method allows to know if a keyframe is already stored in the component. More...
 
int getNbKeyframes () const override
 This method allows to get the number of keyframes stored in the point cloud. More...
 
FrameworkReturnCode saveToFile (const std::string &file) const override
 This method allows to save the keyframes to the external file. More...
 
FrameworkReturnCode loadFromFile (const std::string &file) override
 This method allows to load the keyframes from the external file. More...
 
const SRef< datastructure::KeyframeCollection > & getConstKeyframeCollection () const override
 This method returns the keyframe collection. More...
 
std::unique_lock< std::mutex > getKeyframeCollection (SRef< datastructure::KeyframeCollection > &keyframeCollection) override
 This method returns the keyframe collection. More...
 
void setKeyframeCollection (const SRef< datastructure::KeyframeCollection > keyframeCollection) override
 This method is to set the keyframe collection. More...
 
void unloadComponent () override final
 

Detailed Description

A storage component to store a persistent set of keyframes, based on a std::set.

Member Function Documentation

◆ addKeyframe() [1/2]

FrameworkReturnCode SolAR::MODULES::TOOLS::SolARKeyframesManager::addKeyframe ( const SolAR::datastructure::Keyframe &  keyframe)
override

This method allow to add a frame to the key frame manager component.

Parameters
[in]framethe frame to add to the set of persistent keyframes
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ addKeyframe() [2/2]

FrameworkReturnCode SolAR::MODULES::TOOLS::SolARKeyframesManager::addKeyframe ( const SRef< SolAR::datastructure::Keyframe >  keyframe)
override

This method allow to add a frame to the keyframe manager component.

Parameters
[in]framethe frame to add to the set of persistent keyframes
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ getAllKeyframes()

FrameworkReturnCode SolAR::MODULES::TOOLS::SolARKeyframesManager::getAllKeyframes ( std::vector< SRef< SolAR::datastructure::Keyframe > > &  keyframes) const
override

This method allows to get all keyframes.

Parameters
[out]theset of keyframes
Returns
FrameworkReturnCode::SUCCESS if succeed, else FrameworkReturnCode::_ERROR.

◆ getConstKeyframeCollection()

const SRef< datastructure::KeyframeCollection > & SolAR::MODULES::TOOLS::SolARKeyframesManager::getConstKeyframeCollection ( ) const
override

This method returns the keyframe collection.

Returns
the keyframe collection

◆ getDescriptorType()

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

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

Returns
Descriptor type

◆ getKeyframe()

FrameworkReturnCode SolAR::MODULES::TOOLS::SolARKeyframesManager::getKeyframe ( const uint32_t  id,
SRef< SolAR::datastructure::Keyframe > &  keyframe 
) const
override

This method allows to get a keyframe by its id.

Parameters
[in]idof the keyframe to get
[out]akeyframe stored in the keyframes manager
Returns
FrameworkReturnCode::SUCCESS if succeed, else FrameworkReturnCode::_ERROR.

◆ getKeyframeCollection()

std::unique_lock< std::mutex > SolAR::MODULES::TOOLS::SolARKeyframesManager::getKeyframeCollection ( SRef< datastructure::KeyframeCollection > &  keyframeCollection)
override

This method returns the keyframe collection.

Parameters
[out]keyframeCollectionthe keyframe collection of map
Returns
the keyframe collection

◆ getKeyframes()

FrameworkReturnCode SolAR::MODULES::TOOLS::SolARKeyframesManager::getKeyframes ( const std::vector< uint32_t > &  ids,
std::vector< SRef< SolAR::datastructure::Keyframe > > &  keyframes 
) const
override

This method allows to get a set of keyframes by their ids.

Parameters
[in]avector of ids of the keyframes to get
[out]avector of keyframes stored in the keyframe manager
Returns
FrameworkReturnCode::SUCCESS if succeed, else FrameworkReturnCode::_ERROR.

◆ getNbKeyframes()

int SolAR::MODULES::TOOLS::SolARKeyframesManager::getNbKeyframes ( ) const
override

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

Returns
The number of keyframes

◆ isExistKeyframe()

bool SolAR::MODULES::TOOLS::SolARKeyframesManager::isExistKeyframe ( const uint32_t  id) const
override

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

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

◆ loadFromFile()

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

This method allows to load the keyframes from the external file.

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

◆ saveToFile()

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

This method allows to save the keyframes to the external file.

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

◆ setDescriptorType()

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

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

Parameters
[in]typethe descriptor type
Returns
FrameworkReturnCode::SUCCESS if succeed, else FrameworkReturnCode::_ERROR.

◆ setKeyframeCollection()

void SolAR::MODULES::TOOLS::SolARKeyframesManager::setKeyframeCollection ( const SRef< datastructure::KeyframeCollection >  keyframeCollection)
override

This method is to set the keyframe collection.

Parameters
[in]keyframeCollectionthe keyframe collection of map

◆ suppressKeyframe()

FrameworkReturnCode SolAR::MODULES::TOOLS::SolARKeyframesManager::suppressKeyframe ( const uint32_t  id)
override

This method allow to suppress a keyframe by its id.

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

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