|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
Organizes related signal regions into a categorized collection. More...
#include <RegionGroup.hpp>
Collaboration diagram for MayaFlux::Kakshya::RegionGroup:Public Member Functions | |
| RegionGroup ()=default | |
| RegionGroup (std::string group_name, std::vector< Region > regions={}, std::unordered_map< std::string, std::any > attrs={}) | |
| Construct a region group. | |
| void | add_region (const Region ®ion) |
| void | insert_region (size_t index, const Region ®ion) |
| Insert a region at a specific index. | |
| void | remove_region (size_t index) |
| Remove a region by index. | |
| void | clear_regions () |
| Remove all regions from the group. | |
| void | sort_by_dimension (size_t dimension_index) |
| Sort region by a specific dimension. | |
| void | sort_by_attribute (const std::string &attr_name) |
| Sort regions by a specific attribute (numeric). | |
| std::vector< Region > | find_regions_with_label (const std::string &label) const |
| Find all regions with a given label. | |
| Region | get_bounding_region () const |
| Get the bounding region that contains all regions in the group. | |
| std::vector< Region > | find_regions_with_attribute (const std::string &key, const std::any &value) const |
| Find all regions with a specific attribute value. | |
| std::vector< Region > | find_regions_containing_coordinates (const std::vector< uint64_t > &coordinates) const |
| Find all regions containing the given coordinates. | |
| template<typename T > | |
| void | set_attribute (const std::string &key, T value) |
| Set a group-level attribute. | |
| template<typename T > | |
| std::optional< T > | get_attribute (const std::string &key) const |
| Get a group-level attribute. | |
Public Attributes | |
| std::string | name |
| Descriptive name of the group. | |
| std::vector< Region > | regions |
| Collection of regions belonging to this group. | |
| std::unordered_map< std::string, std::any > | attributes |
| Flexible key-value store for group-specific attributes. | |
| RegionState | state = RegionState::IDLE |
| RegionTransition | transition_type = RegionTransition::IMMEDIATE |
| RegionSelectionPattern | region_selection_pattern = RegionSelectionPattern::SEQUENTIAL |
| double | transition_duration_ms = 0.0 |
| size_t | current_region_index = 0 |
| std::vector< size_t > | active_indices |
| std::function< void(const Region &)> | on_region_start |
| std::function< void(const Region &)> | on_region_end |
| std::function< void(const Region &, const Region &)> | on_transition |
Organizes related signal regions into a categorized collection.
RegionGroups provide a way to categorize and organize related regions within signal data based on algorithmic or analytical criteria. Each group has a name and can contain multiple Regions, as well as group-level attributes that apply to the entire collection.
Common DSP-specific applications include:
This data-driven approach enables sophisticated signal processing workflows where algorithms can operate on categorized signal segments without requiring predefined musical or content-specific structures.
Definition at line 27 of file RegionGroup.hpp.