MayaFlux 0.4.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 24 of file RegionProcessors.cpp.

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

Referenced by refresh_organized_data().

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