|
MorphologicalAttributeFilters
Public API documentation
|
Layout object for buffers that store several (attribute, delta) combinations per node.
More...
#include <AttributeNames.hpp>
Public Member Functions | |
| AttributeNamesWithDelta (std::unordered_map< AttributeKey, int > &&map) | |
| Constructs a layout from an already validated offset map. | |
| int | getIndex (Attribute attr, int delta) const |
Returns the per-node offset associated with (attr, delta). | |
| int | getIndex (AttributeKey attrKey) const |
| Returns the per-node offset associated with a composite delta key. | |
| int | linearIndex (int nodeIndex, Attribute attr, int delta) const |
| Returns the linear index in the flat buffer for a given node and delta-augmented attribute. | |
| int | linearIndex (int nodeIndex, AttributeKey attrKey) const |
Convenience overload taking an AttributeKey. | |
Static Public Member Functions | |
| static AttributeNamesWithDelta | create (int delta, const std::vector< Attribute > &attributes) |
Builds the canonical dense layout for all deltas in [-delta, delta]. | |
| static std::string | toString (AttributeKey attrKey) |
| Returns a human-readable label for a composite key. | |
| static std::string | toString (Attribute attr, int delta) |
| Returns a human-readable label for an attribute at a given delta. | |
Public Attributes | |
| std::unordered_map< AttributeKey, int > | indexMap |
Maps each (attribute, delta) key to its per-node offset. | |
| const int | NUM_ATTRIBUTES |
| Number of delta-augmented entries stored for each node. | |
Layout object for buffers that store several (attribute, delta) combinations per node.
The layout is node-major: for a given node, all requested delta variants are stored contiguously. NUM_ATTRIBUTES therefore counts the number of (attribute, delta) entries associated with each node, not the number of live nodes.
The class is primarily used by delta-based APIs such as MSER-like stability descriptors, where each node needs access to values sampled at ancestor and descendant offsets around the current position.
Definition at line 39 of file AttributeNames.hpp.
|
inline |
Constructs a layout from an already validated offset map.
The constructor takes ownership of map and derives the per-node stride from its final size.
Definition at line 53 of file AttributeNames.hpp.
|
inlinestatic |
Builds the canonical dense layout for all deltas in [-delta, delta].
Definition at line 59 of file AttributeNames.hpp.
Returns the per-node offset associated with (attr, delta).
Definition at line 79 of file AttributeNames.hpp.
|
inline |
Returns the per-node offset associated with a composite delta key.
Definition at line 86 of file AttributeNames.hpp.
|
inline |
Returns the linear index in the flat buffer for a given node and delta-augmented attribute.
Definition at line 94 of file AttributeNames.hpp.
|
inline |
Convenience overload taking an AttributeKey.
Definition at line 101 of file AttributeNames.hpp.
|
inlinestatic |
Returns a human-readable label for an attribute at a given delta.
Definition at line 115 of file AttributeNames.hpp.
|
inlinestatic |
Returns a human-readable label for a composite key.
Definition at line 108 of file AttributeNames.hpp.
| std::unordered_map<AttributeKey, int> mmcfilters::AttributeNamesWithDelta::indexMap |
Maps each (attribute, delta) key to its per-node offset.
Definition at line 42 of file AttributeNames.hpp.
Number of delta-augmented entries stored for each node.
Definition at line 45 of file AttributeNames.hpp.