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()
|
inline |
Open a raster whose byte length must match its declared dimensions.
- Parameters
-
[in] path Raster file containing row-major BGRA bytes. [in] width Raster width in pixels. [in] height Raster height in pixels.
- Exceptions
-
std::runtime_error If dimensions or file length are invalid.
Definition at line 197 of file map_storage.h.
Member Function Documentation
◆ read()
|
inline |
Read a rectangle into a new BGRA matrix.
- Parameters
-
[in] rectangle Nonempty in-bounds raster region no larger than 16 MiB.
- Returns
- Owned BGRA pixels for the requested rectangle.
- Exceptions
-
std::runtime_error If the rectangle exceeds bounds or file reading fails.
Definition at line 209 of file map_storage.h.
Field Documentation
◆ height_
|
private |
Definition at line 188 of file map_storage.h.
◆ path_
|
private |
Definition at line 187 of file map_storage.h.
◆ width_
|
private |
Definition at line 188 of file map_storage.h.
The documentation for this class was generated from the following file:
- modules/pangea/map_storage.h