MayaFlux 0.4.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 18 of file SoundFileReader.cpp.

19{
20 if (start_coordinates.size() == 1 && end_coordinates.size() == 1) {
23 }
25 }
26
27 Kakshya::Region region(start_coordinates, end_coordinates);
28 region.set_attribute("label", name);
29 region.set_attribute("type", type);
30
31 for (const auto& [key, value] : attributes) {
32 region.set_attribute(key, value);
33 }
34 return region;
35}
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: