Load a fixed-session source set and render its projected tiles/windows. More...
#include <ortho_map.h>
Data Structures | |
| struct | Impl |
Public Member Functions | |
| Orthorectifier (const MapConfig &config, const std::filesystem::path &csv) | |
| Validate source CSV rows and derive the requested output grid. | |
| ~Orthorectifier () | |
| Release the render state and its caches. | |
| Orthorectifier (const Orthorectifier &)=delete | |
| Disallow copying the owned render state. | |
| Orthorectifier & | operator= (const Orthorectifier &)=delete |
| Disallow copy assignment of the owned render state. | |
| std::size_t | columns () const |
| Return output tile columns. | |
| std::size_t | rows () const |
| Return output tile rows. | |
| std::size_t | size () const |
| Return total requested map tiles. | |
| std::optional< UtcDateTime > | captureUtc () const |
| Return the validated common capture UTC target, when present. | |
| std::size_t | sourceCount () const |
| Return the validated source count without decoding pixels. | |
| std::string | sourceFingerprint (const std::function< bool()> &stopped) const |
| Hash canonical source paths and current JPEG contents in source order. | |
| void | prepareSources (const std::function< bool()> &stopped) |
| Prepare shared source rasters/mosaic state before repeated rendering. | |
| OrthoImage | render (std::size_t index, const std::function< bool()> &stopped, const std::function< void(double)> &progress={}) |
| Render one configured output tile. | |
| OrthoImage | renderWindow (std::size_t originX, std::size_t originY, int width, int height, const std::function< bool()> &stopped, const std::function< void(double)> &progress={}) |
| Render an arbitrary bounded window of the configured map grid. | |
Static Public Member Functions | |
| static void | selfTest () |
| Run synthetic orthorectification regression cases. | |
| static std::filesystem::path | normalizeSources (const std::filesystem::path &csv, const std::filesystem::path &directory, const std::function< bool()> &stopped, unsigned workers=1, unsigned memoryMiB=128) |
| Rectify JPEG sources into working JPEGs and write a new CSV. | |
Private Attributes | |
| std::unique_ptr< Impl > | impl_ |
Detailed Description
Load a fixed-session source set and render its projected tiles/windows.
The implementation owns bounded decoded-photo and rendered-block caches. Returned images own their pixel/provenance vectors; cancellation is cooperative and throws before an incomplete render can be treated as complete.
Definition at line 98 of file ortho_map.h.
Constructor & Destructor Documentation
◆ Orthorectifier() [1/2]
| pangea_survey::Orthorectifier::Orthorectifier | ( | const MapConfig & | config, |
| const std::filesystem::path & | csv ) |
Validate source CSV rows and derive the requested output grid.
- Parameters
-
[in] config Validated mapping configuration. [in] csv Source manifest with one consistent fixed-session camera setup.
- Exceptions
-
std::runtime_error If any source, calibration, pose, or session contract fails.
Definition at line 463 of file ortho_map.cpp.
◆ ~Orthorectifier()
|
default |
Release the render state and its caches.
Defined out of line where the private implementation is complete.
◆ Orthorectifier() [2/2]
|
delete |
Disallow copying the owned render state.
Member Function Documentation
◆ captureUtc()
| std::optional< UtcDateTime > pangea_survey::Orthorectifier::captureUtc | ( | ) | const |
Return the validated common capture UTC target, when present.
Definition at line 469 of file ortho_map.cpp.
◆ columns()
| std::size_t pangea_survey::Orthorectifier::columns | ( | ) | const |
Return output tile columns.
Definition at line 466 of file ortho_map.cpp.
◆ normalizeSources()
|
static |
Rectify JPEG sources into working JPEGs and write a new CSV.
- Parameters
-
[in] csv Original source CSV. [in] directory New directory for normalized JPEGs and CSV. [in] stopped Cooperative cancellation predicate. [in] workers Upper bound on independent source-preparation workers. [in] memoryMiB Working-memory budget used to reduce the worker count.
- Returns
- Path to the normalized source CSV.
- Exceptions
-
std::runtime_error If source decoding, rectification, or publication fails.
Definition at line 1120 of file ortho_map.cpp.
◆ operator=()
|
delete |
Disallow copy assignment of the owned render state.
◆ prepareSources()
| void pangea_survey::Orthorectifier::prepareSources | ( | const std::function< bool()> & | stopped | ) |
Prepare shared source rasters/mosaic state before repeated rendering.
- Parameters
-
[in] stopped Cooperative cancellation predicate.
Definition at line 640 of file ortho_map.cpp.
◆ render()
| OrthoImage pangea_survey::Orthorectifier::render | ( | std::size_t | index, |
| const std::function< bool()> & | stopped, | ||
| const std::function< void(double)> & | progress = {} ) |
Render one configured output tile.
- Parameters
-
[in] index Row-major tile index in [0, size()). [in] stopped Cooperative cancellation predicate. [in] progress Optional render fraction callback in [0, 1].
- Returns
- Owned image pixels, confidence classes, and source provenance.
- Exceptions
-
std::runtime_error If index is invalid, rendering fails, or canceled.
Definition at line 1293 of file ortho_map.cpp.
◆ renderWindow()
| OrthoImage pangea_survey::Orthorectifier::renderWindow | ( | std::size_t | originX, |
| std::size_t | originY, | ||
| int | width, | ||
| int | height, | ||
| const std::function< bool()> & | stopped, | ||
| const std::function< void(double)> & | progress = {} ) |
Render an arbitrary bounded window of the configured map grid.
- Parameters
-
[in] originX Leftmost map-grid pixel. [in] originY Topmost map-grid pixel. [in] width Window width in pixels. [in] height Window height in pixels. [in] stopped Cooperative cancellation predicate. [in] progress Optional render fraction callback in [0, 1].
- Returns
- Owned image and coverage metadata for the requested window.
- Exceptions
-
std::runtime_error If bounds exceed the configured area or rendering fails.
Definition at line 1301 of file ortho_map.cpp.
◆ rows()
| std::size_t pangea_survey::Orthorectifier::rows | ( | ) | const |
Return output tile rows.
Definition at line 467 of file ortho_map.cpp.
◆ selfTest()
|
static |
Run synthetic orthorectification regression cases.
Use controlled source geometry and imagery to check render behavior independently of simulator or camera availability.
- Exceptions
-
std::runtime_error If a fixture invariant fails.
Definition at line 1422 of file ortho_map.cpp.
◆ size()
| std::size_t pangea_survey::Orthorectifier::size | ( | ) | const |
Return total requested map tiles.
Definition at line 468 of file ortho_map.cpp.
◆ sourceCount()
| std::size_t pangea_survey::Orthorectifier::sourceCount | ( | ) | const |
Return the validated source count without decoding pixels.
Definition at line 470 of file ortho_map.cpp.
◆ sourceFingerprint()
| std::string pangea_survey::Orthorectifier::sourceFingerprint | ( | const std::function< bool()> & | stopped | ) | const |
Hash canonical source paths and current JPEG contents in source order.
- Parameters
-
[in] stopped Cooperative cancellation predicate.
- Returns
- Content fingerprint used to detect changes to admitted photographs.
Definition at line 471 of file ortho_map.cpp.
Field Documentation
◆ impl_
|
private |
Definition at line 100 of file ortho_map.h.
The documentation for this class was generated from the following files:
- modules/pangea/ortho_map.h
- modules/pangea/ortho_map.cpp