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

◆ organize_container_data()

void MayaFlux::Kakshya::RegionOrganizationProcessor::organize_container_data ( const 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 25 of file RegionProcessors.cpp.

26{
27 m_organized_regions.clear();
28
29 auto region_groups = container->get_all_region_groups();
30
31 std::ranges::for_each(region_groups | std::views::values,
32 [this, &container](const auto& group) {
33 organize_group(container, group);
34 });
35
36 std::ranges::sort(m_organized_regions, [](const OrganizedRegion& a, const OrganizedRegion& b) {
37 if (a.segments.empty() || b.segments.empty())
38 return false;
39 if (a.segments[0].source_region.start_coordinates.empty() || b.segments[0].source_region.start_coordinates.empty())
40 return false;
41 return a.segments[0].source_region.start_coordinates[0] < b.segments[0].source_region.start_coordinates[0];
42 });
43}
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: