Visual Servoing Platform  version 3.6.1 under development (2025-01-11)

#include <visp3/rbt/vpObjectMaskFactory.h>

+ Inheritance diagram for vpObjectMaskFactory:

Public Member Functions

void registerType (const std::string &key, const std::function< std::shared_ptr< vpObjectMask >(const nlohmann::json &)> &function)
 
void registerTypeRaw (const std::string &key, const std::function< std::shared_ptr< vpObjectMask >(const std::string &)> function)
 
std::shared_ptr< vpObjectMaskbuildFromJson (const nlohmann::json &j)
 
void setJsonKeyFinder (const std::function< std::string(const nlohmann::json &)> &finderFn)
 

Static Public Member Functions

static vpObjectMaskFactorygetFactory ()
 

Protected Attributes

std::map< std::string, std::function< std::shared_ptr< vpObjectMask >const nlohmann::json &)> > m_jsonBuilders
 
std::map< std::string, std::function< std::shared_ptr< vpObjectMask >const std::string &)> > m_jsonRawBuilders
 
std::function< std::string(const nlohmann::json &)> m_keyFinder
 

Detailed Description

A factory that can be used to create Object segmentation algorithms from JSON data.

Definition at line 48 of file vpObjectMaskFactory.h.

Member Function Documentation

◆ buildFromJson()

std::shared_ptr<vpObjectMask > vpDynamicFactory< vpObjectMask >::buildFromJson ( const nlohmann::json &  j)
inlineinherited

Definition at line 73 of file vpDynamicFactory.h.

◆ getFactory()

static vpObjectMaskFactory& vpObjectMaskFactory::getFactory ( )
inlinestatic

Definition at line 54 of file vpObjectMaskFactory.h.

Referenced by vpRBTracker::loadConfiguration().

◆ registerType()

void vpDynamicFactory< vpObjectMask >::registerType ( const std::string &  key,
const std::function< std::shared_ptr< vpObjectMask >(const nlohmann::json &)> &  function 
)
inlineinherited

Definition at line 54 of file vpDynamicFactory.h.

◆ registerTypeRaw()

void vpDynamicFactory< vpObjectMask >::registerTypeRaw ( const std::string &  key,
const std::function< std::shared_ptr< vpObjectMask >(const std::string &)>  function 
)
inlineinherited

Definition at line 62 of file vpDynamicFactory.h.

◆ setJsonKeyFinder()

void vpDynamicFactory< vpObjectMask >::setJsonKeyFinder ( const std::function< std::string(const nlohmann::json &)> &  finderFn)
inlineinherited

Definition at line 90 of file vpDynamicFactory.h.

Member Data Documentation

◆ m_jsonBuilders

std::map<std::string, std::function<std::shared_ptr<vpObjectMask >const nlohmann::json &)> > vpDynamicFactory< vpObjectMask >::m_jsonBuilders
protectedinherited

Definition at line 102 of file vpDynamicFactory.h.

◆ m_jsonRawBuilders

std::map<std::string, std::function<std::shared_ptr<vpObjectMask >const std::string &)> > vpDynamicFactory< vpObjectMask >::m_jsonRawBuilders
protectedinherited

Definition at line 103 of file vpDynamicFactory.h.

◆ m_keyFinder

std::function<std::string(const nlohmann::json &)> vpDynamicFactory< vpObjectMask >::m_keyFinder
protectedinherited

Definition at line 105 of file vpDynamicFactory.h.