MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ organize_container_data()

void MayaFlux::Kakshya::RegionOrganizationProcessor::organize_container_data ( std::shared_ptr< SignalSourceContainer container)
overridevirtual

Organize the container's data into regions and segments.

Must be implemented to define region logic for the container.

Parameters
containerThe signal container to organize.

Implements MayaFlux::Kakshya::RegionProcessorBase.

Definition at line 22 of file RegionProcessors.cpp.

23{
24 m_organized_regions.clear();
25
26 auto region_groups = container->get_all_region_groups();
27
28 std::ranges::for_each(region_groups | std::views::values,
29 [this, &container](const auto& group) {
30 organize_group(container, group);
31 });
32
33 std::ranges::sort(m_organized_regions, [](const OrganizedRegion& a, const OrganizedRegion& b) {
34 if (a.segments.empty() || b.segments.empty())
35 return false;
36 if (a.segments[0].source_region.start_coordinates.empty() || b.segments[0].source_region.start_coordinates.empty())
37 return false;
38 return a.segments[0].source_region.start_coordinates[0] < b.segments[0].source_region.start_coordinates[0];
39 });
40}
void organize_group(const std::shared_ptr< SignalSourceContainer > &container, const RegionGroup &group)
Organize a group of regions within the container.
std::vector< OrganizedRegion > m_organized_regions

References MayaFlux::Kakshya::RegionProcessorBase::m_organized_regions, organize_group(), and MayaFlux::Kakshya::OrganizedRegion::segments.

Referenced by refresh_organized_data().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: