|
MayaFlux 0.3.0
Digital-First Multimedia Processing Framework
|
| std::vector< T > MayaFlux::Kakshya::extract_nd_region | ( | std::span< const T > | src, |
| const Region & | region, | ||
| const std::vector< DataDimension > & | dims | ||
| ) |
Extract the data described by region from src using the container's dimension descriptors.
Delegates to the existing role-aware extract_region_data machinery so that the region coordinates are interpreted correctly regardless of axis order or modality. The caller decides what the region bounds mean — this function imposes no shape assumption (rectangular, cubic, or otherwise).
For interleaved image data (IMAGE_COLOR / ROW_MAJOR) the channel dimension is included in the walk if the region carries a coordinate for it; if the region has fewer coordinates than dimensions, trailing axes are included in full.
| T | Element type of the source buffer (e.g. uint8_t). |
| src | Flat source buffer in the layout described by dims. |
| region | N-dimensional bounds; start/end coordinate count may be less than dims.size() — missing trailing axes default to full extent. |
| dims | Dimension descriptors from the container structure, ordered consistently with the flat buffer layout. |
dims. | std::invalid_argument | if dims is empty or src is smaller than the total element count implied by dims. |
| std::out_of_range | if any coordinate in region exceeds the corresponding dimension size. |
Definition at line 698 of file RegionUtils.hpp.
References MayaFlux::Kakshya::Region::end_coordinates, MayaFlux::Journal::Kakshya, MayaFlux::Journal::Runtime, and MayaFlux::Kakshya::Region::start_coordinates.