31#include <visp3/rbt/vpObjectMaskFactory.h>
32#include <visp3/rbt/vpColorHistogramMask.h>
33#include <visp3/rbt/vpDepthMask.h>
34#include <visp3/rbt/vpCombinedDepthAndColorMask.h>
44vpObjectMaskFactory::vpObjectMaskFactory()
46#ifdef VISP_HAVE_NLOHMANN_JSON
53 std::shared_ptr<vpColorHistogramMask>
p(
new vpColorHistogramMask());
54 p->loadJsonConfiguration(j);
58 std::shared_ptr<vpDepthMask>
p(
new vpDepthMask());
59 p->loadJsonConfiguration(j);
63 std::shared_ptr<vpCombinedDepthAndColorMask>
p(
new vpCombinedDepthAndColorMask());
64 p->loadJsonConfiguration(j);
Factory-type class that allows for the dynamic registration of subclasses.
void setJsonKeyFinder(const std::function< std::string(const nlohmann::json &)> &finderFn)
void registerType(const std::string &key, const std::function< std::shared_ptr< vpObjectMask >(const nlohmann::json &)> &function)