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

◆ to_region()

Kakshya::Region MayaFlux::IO::FileRegion::to_region ( ) const

Convert this FileRegion to a Region for use in processing.

Returns
Region with equivalent coordinates and attributes.

Definition at line 17 of file SoundFileReader.cpp.

18{
19 if (start_coordinates.size() == 1 && end_coordinates.size() == 1) {
22 }
24 }
25
26 Kakshya::Region region(start_coordinates, end_coordinates);
27 region.set_attribute("label", name);
28 region.set_attribute("type", type);
29
30 for (const auto& [key, value] : attributes) {
31 region.set_attribute(key, value);
32 }
33 return region;
34}
std::vector< uint64_t > start_coordinates
N-dimensional start position (e.g., frame, x, y)
std::string name
Human-readable name for the region.
std::string type
Region type identifier (e.g., "cue", "scene", "block")
std::unordered_map< std::string, std::any > attributes
Region-specific metadata.
std::vector< uint64_t > end_coordinates
N-dimensional end position (inclusive)
static Region time_span(uint64_t start_frame, uint64_t end_frame, const std::string &label="", const std::any &extra_data={})
Create a Region representing a time span (e.g., a segment of frames).
Definition Region.hpp:135
static Region time_point(uint64_t frame, const std::string &label="", const std::any &extra_data={})
Create a Region representing a single time point (e.g., a frame or sample).
Definition Region.hpp:114

References attributes, end_coordinates, name, MayaFlux::Kakshya::Region::set_attribute(), start_coordinates, MayaFlux::Kakshya::Region::time_point(), MayaFlux::Kakshya::Region::time_span(), and type.

+ Here is the call graph for this function: