Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
pangea_survey::DiskRaster Class Reference

Read bounded rectangular regions from a lossless BGRA disk raster. More...

#include <map_storage.h>

Public Member Functions

 DiskRaster (std::filesystem::path path, int width, int height)
 Open a raster whose byte length must match its declared dimensions.
cv::Mat read (const cv::Rect &rectangle) const
 Read a rectangle into a new BGRA matrix.

Private Attributes

std::filesystem::path path_
int width_
int height_

Detailed Description

Read bounded rectangular regions from a lossless BGRA disk raster.

Disk-backed source pixels trade I/O for a small resident working set; each read is capped so callers cannot accidentally materialize an unbounded source image through this interface.

Definition at line 186 of file map_storage.h.

Constructor & Destructor Documentation

◆ DiskRaster()

pangea_survey::DiskRaster::DiskRaster ( std::filesystem::path path,
int width,
int height )
inline

Open a raster whose byte length must match its declared dimensions.

Parameters
[in]pathRaster file containing row-major BGRA bytes.
[in]widthRaster width in pixels.
[in]heightRaster height in pixels.
Exceptions
std::runtime_errorIf dimensions or file length are invalid.

Definition at line 197 of file map_storage.h.

Member Function Documentation

◆ read()

cv::Mat pangea_survey::DiskRaster::read ( const cv::Rect & rectangle) const
inline

Read a rectangle into a new BGRA matrix.

Parameters
[in]rectangleNonempty in-bounds raster region no larger than 16 MiB.
Returns
Owned BGRA pixels for the requested rectangle.
Exceptions
std::runtime_errorIf the rectangle exceeds bounds or file reading fails.

Definition at line 209 of file map_storage.h.

Field Documentation

◆ height_

int pangea_survey::DiskRaster::height_
private

Definition at line 188 of file map_storage.h.

◆ path_

std::filesystem::path pangea_survey::DiskRaster::path_
private

Definition at line 187 of file map_storage.h.

◆ width_

int pangea_survey::DiskRaster::width_
private

Definition at line 188 of file map_storage.h.


The documentation for this class was generated from the following file: