esp::metadata::attributes::MarkerSets class

This class provides an alias for the nested Configuration tree used to hold multiple TaskSets.

Base classes

class esp::core::config::Configuration
This class holds Configuration data in a map of ConfigValues, and also supports nested Configurations via a map of smart pointers to this type.

Constructors, destructors, conversion operators

MarkerSets()

Public functions

auto getNumTaskSets() const -> int
Returns the number of existing TaskSets in this collection.
auto getNumTaskLinkSets() const -> int
Returns the number of existing LinkSets in this collection.
auto getNumTaskLinkMarkerSets() const -> int
Returns the number of existing MarkerSets in this collection.
auto hasTaskSet(const std::string& taskSetName) const -> bool
whether the given taskSetName exists as a TaskSet in this collection.
auto hasTaskLinkSet(const std::string& taskSetName, const std::string& linkSetName) const -> bool
Whether the given linkSetName and taskSetName exist in this collection.
auto hasTaskLinkMarkerSet(const std::string& taskSetName, const std::string& linkSetName, const std::string& markerSetName) const -> bool
Whether the given hierarchy of markerSetName, linkSetName and taskSetName all exist in this collection.
auto getAllTaskSetNames() const -> std::vector<std::string>
Retrieve a listing of all the TaskSet handles in this collection.
auto getTaskSetCopy(const std::string& taskSetName) -> TaskSet::ptr
Retrivess a copy of the named TaskSet, if it exists, and nullptr if it does not.
auto getTaskSetView(const std::string& taskSetName) const -> TaskSet::cptr
Retrieve a view of the named TaskSet, if it exists, and nullptr if it does not.
auto editTaskSet(const std::string& taskSetName) -> TaskSet::ptr
Retrieves a reference to a (potentially newly created) TaskSet with the given taskSetName , which can be modified and the modifications will be retained.
void removeTaskSet(const std::string& taskSetName)
Removes named TaskSet. Does nothing if DNE.
void initTaskLinkMarkerSet(const std::string& taskSetName, const std::string& linkSetName, const std::string& markerSetName)
Initialize a task/link/markerset hierarchy with the passed names.
void setTaskLinkMarkerSetPoints(const std::string& taskSetName, const std::string& linkSetName, const std::string& markerSetName, const std::vector<Mn::Vector3>& markerList)
Set the specified TaskSet's specified LinkSet's specified MarkerSet's marker points.
void setTaskLinkSetPoints(const std::string& taskSetName, const std::string& linkSetName, const std::unordered_map<std::string, std::vector<Mn::Vector3>>& markerMap)
Sets all the MarkerSet points in the specified TaskSet's specified LinkSet to the given marker values specified in the map.
void setTaskSetPoints(const std::string& taskSetName, const std::unordered_map<std::string, std::unordered_map<std::string, std::vector<Mn::Vector3>>>& markerMap)
Sets all the LinkSet's MarkerSets' points in the specified TaskSet to the given marker values specified in the map.
void setAllMarkerPoints(const std::unordered_map<std::string, std::unordered_map<std::string, std::unordered_map<std::string, std::vector<Mn::Vector3>>>>& markerMap)
Set all the marker points across every TaskSet using the values in the passed map.
auto getTaskLinkMarkerSetPoints(const std::string& taskSetName, const std::string& linkSetName, const std::string& markerSetName) const -> std::vector<Mn::Vector3>
Retrieve a single TaskSet's LinkSet's MarkerSet as a vector of 3d points.
auto getTaskLinkSetPoints(const std::string& taskSetName, const std::string& linkSetName) const -> std::unordered_map<std::string, std::vector<Mn::Vector3>>
Retrieve all of the MarkerSets for a particular LinkSet within the specified TaskSet, as an unordered map keyed by MarkerSet name of Markers as a vector of 3d points.
auto getTaskSetPoints(const std::string& taskSetName) const -> std::unordered_map<std::string, std::unordered_map<std::string, std::vector<Mn::Vector3>>>
Retrieve all the marker points for the named TaskSet, as an unordered map keyed by LinkSet name of unordered maps, each keyed by MarkerSet name of Markers as a vector of 3d points.
auto getAllMarkerPoints() const -> std::unordered_map<std::string, std::unordered_map<std::string, std::unordered_map<std::string, std::vector<Mn::Vector3>>>>
Retrieve all the MarkerSet points across all the TaskSets.
auto rekeyAllMarkers() -> int
Rekeys all marker collections to have vector IDXs as string keys.

Function documentation

bool esp::metadata::attributes::MarkerSets::hasTaskSet(const std::string& taskSetName) const

whether the given taskSetName exists as a TaskSet in this collection.

Parameters
taskSetName The desired TaskSet's name.
Returns whether the name is found as a TaskSet subConfiguration.

bool esp::metadata::attributes::MarkerSets::hasTaskLinkSet(const std::string& taskSetName, const std::string& linkSetName) const

Whether the given linkSetName and taskSetName exist in this collection.

Parameters
taskSetName The desired TaskSet's name.
linkSetName The desired LinkSet's name, to be found in the given TaskSet.
Returns wwhether the names are found as expected.

bool esp::metadata::attributes::MarkerSets::hasTaskLinkMarkerSet(const std::string& taskSetName, const std::string& linkSetName, const std::string& markerSetName) const

Whether the given hierarchy of markerSetName, linkSetName and taskSetName all exist in this collection.

Parameters
taskSetName The desired TaskSet's name.
linkSetName The desired LinkSet's name, to be found in the given TaskSet.
markerSetName The desired MarkerSet's name, to be found in the given LinkSet.
Returns wwhether the names are found as expected.

TaskSet::ptr esp::metadata::attributes::MarkerSets::editTaskSet(const std::string& taskSetName)

Retrieves a reference to a (potentially newly created) TaskSet with the given taskSetName , which can be modified and the modifications will be retained.

Parameters
taskSetName The desired TaskSet's name.
Returns a reference to the TaskSet.

void esp::metadata::attributes::MarkerSets::initTaskLinkMarkerSet(const std::string& taskSetName, const std::string& linkSetName, const std::string& markerSetName)

Initialize a task/link/markerset hierarchy with the passed names.

Parameters
taskSetName the name of the TaskSet
linkSetName the name of the LinkSet within taskSetName
markerSetName the name of the MarkerSet within linkSetName

void esp::metadata::attributes::MarkerSets::setTaskLinkMarkerSetPoints(const std::string& taskSetName, const std::string& linkSetName, const std::string& markerSetName, const std::vector<Mn::Vector3>& markerList)

Set the specified TaskSet's specified LinkSet's specified MarkerSet's marker points.

Parameters
taskSetName the name of the TaskSet
linkSetName the name of the LinkSet within taskSetName
markerSetName the name of the MarkerSet within linkSetName
markerList the list of the specified MarkerSet' points.

void esp::metadata::attributes::MarkerSets::setTaskLinkSetPoints(const std::string& taskSetName, const std::string& linkSetName, const std::unordered_map<std::string, std::vector<Mn::Vector3>>& markerMap)

Sets all the MarkerSet points in the specified TaskSet's specified LinkSet to the given marker values specified in the map.

Parameters
taskSetName the name of the TaskSet
linkSetName the name of the LinkSet within taskSetName
markerMap a map holding all the MarkerSet points within the specified LinkSet, with MarkerSet name as the key, referncing a vector of 3d points,

void esp::metadata::attributes::MarkerSets::setTaskSetPoints(const std::string& taskSetName, const std::unordered_map<std::string, std::unordered_map<std::string, std::vector<Mn::Vector3>>>& markerMap)

Sets all the LinkSet's MarkerSets' points in the specified TaskSet to the given marker values specified in the map.

Parameters
taskSetName the name of the TaskSet
markerMap an unordered map keyed by LinkSet name of unordered maps, each keyed by MarkerSet name of Markers as a vector of 3d points.

void esp::metadata::attributes::MarkerSets::setAllMarkerPoints(const std::unordered_map<std::string, std::unordered_map<std::string, std::unordered_map<std::string, std::vector<Mn::Vector3>>>>& markerMap)

Set all the marker points across every TaskSet using the values in the passed map.

Parameters
markerMap an unordered map keyed by TaskSet name, of unordered maps, each keyed by LinkSet name, of unordered maps, each keyed by MarkerSet name of Markers as a vector of 3d points.

std::vector<Mn::Vector3> esp::metadata::attributes::MarkerSets::getTaskLinkMarkerSetPoints(const std::string& taskSetName, const std::string& linkSetName, const std::string& markerSetName) const

Retrieve a single TaskSet's LinkSet's MarkerSet as a vector of 3d points.

Parameters
taskSetName the name of the TaskSet
linkSetName the name of the LinkSet within taskSetName
markerSetName the name of the MarkerSet within linkSetName
Returns a vector of 3d points

std::unordered_map<std::string, std::vector<Mn::Vector3>> esp::metadata::attributes::MarkerSets::getTaskLinkSetPoints(const std::string& taskSetName, const std::string& linkSetName) const

Retrieve all of the MarkerSets for a particular LinkSet within the specified TaskSet, as an unordered map keyed by MarkerSet name of Markers as a vector of 3d points.

Parameters
taskSetName the name of the TaskSet
linkSetName the name of the LinkSet within taskSetName
Returns a map holding all the MarkerSet points within the specified LinkSet, with MarkerSet name as the key, referncing a vector of 3d points,

std::unordered_map<std::string, std::unordered_map<std::string, std::vector<Mn::Vector3>>> esp::metadata::attributes::MarkerSets::getTaskSetPoints(const std::string& taskSetName) const

Retrieve all the marker points for the named TaskSet, as an unordered map keyed by LinkSet name of unordered maps, each keyed by MarkerSet name of Markers as a vector of 3d points.

Parameters
taskSetName the name of the TaskSet
Returns an unordered map keyed by LinkSet name of unordered maps, each keyed by MarkerSet name of Markers as a vector of 3d points.

std::unordered_map<std::string, std::unordered_map<std::string, std::unordered_map<std::string, std::vector<Mn::Vector3>>>> esp::metadata::attributes::MarkerSets::getAllMarkerPoints() const

Retrieve all the MarkerSet points across all the TaskSets.

Returns an unordered map keyed by TaskSet name, of unordered maps, each keyed by LinkSet name, of unordered maps, each keyed by MarkerSet name of Markers as a vector of 3d points.

int esp::metadata::attributes::MarkerSets::rekeyAllMarkers()

Rekeys all marker collections to have vector IDXs as string keys.

Returns returns how many marker points have been processed with new keys.