MayaFlux 0.1.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 45 of file SoundFileReader.cpp.

46{
47 if (start_coordinates.size() == 1 && end_coordinates.size() == 1) {
50 }
52 }
53
54 Kakshya::Region region(start_coordinates, end_coordinates);
55 region.set_attribute("label", name);
56 region.set_attribute("type", type);
57
58 for (const auto& [key, value] : attributes) {
59 region.set_attribute(key, value);
60 }
61 return region;
62}
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: