|
SOMHunter Core
|
Type representing query related to the canvas (atm text & bitmap) rectangles. More...
#include <query-types.h>
Public Member Functions | |
| void | emplace_back (const RelativeRect &rect, const std::string &text_query) |
| Emplace new subregion TEXT query. More... | |
| void | emplace_back (const RelativeRect &rect, size_t bitmap_w, size_t bitmap_h, size_t num_channels, uint8_t *bitmap_RGBA_data) |
| Emplace new subregion BITMAP query. More... | |
| size_t | size () const |
| bool | empty () const |
| const std::vector< CanvasSubquery > & | subqueries () const |
| std::vector< CanvasSubquery > & | subqueries () |
| template<class Archive > | |
| void | serialize (Archive &archive) |
| This allows portable binary serialization of Collage instances to files. More... | |
| nlohmann::json | to_JSON () const |
| CanvasSubquery & | operator[] (size_t idx) |
| const CanvasSubquery & | operator[] (size_t idx) const |
| bool | operator== (const CanvasQuery &b) const |
Static Public Member Functions | |
| static std::vector< CanvasQuery > | parse_json (const std::string &filepath) |
| Parses JSON file created by to_JSON. More... | |
| static std::vector< CanvasQuery > | parse_json_contents (const std::string &contents, const std::filesystem::path parentPath) |
| Parses JSON string created by to_JSON. More... | |
Private Attributes | |
| std::vector< CanvasSubquery > | _subqueries |
| Subregion queries. More... | |
Type representing query related to the canvas (atm text & bitmap) rectangles.
| void CanvasQuery::emplace_back | ( | const RelativeRect & | rect, |
| const std::string & | text_query | ||
| ) |
Emplace new subregion TEXT query.
| void CanvasQuery::emplace_back | ( | const RelativeRect & | rect, |
| size_t | bitmap_w, | ||
| size_t | bitmap_h, | ||
| size_t | num_channels, | ||
| uint8_t * | bitmap_RGBA_data | ||
| ) |
Emplace new subregion BITMAP query.
During this function the input integral RGBA data are converted to RGB float data.
|
inline |

|
inline |

|
inline |
|
inline |
|
static |
Parses JSON file created by to_JSON.
|
static |
Parses JSON string created by to_JSON.
|
inline |
This allows portable binary serialization of Collage instances to files.
by Cereal header-only lib https://uscilab.github.io/cereal/quickstart.html https://uscilab.github.io/cereal/stl_support.html
|
inline |
|
inline |
|
inline |
| nlohmann::json CanvasQuery::to_JSON | ( | ) | const |
|
private |
Subregion queries.