|
ReUseX
0.0.5
3D Point Cloud Processing for Building Reuse
|
#include <ProjectDB.hpp>
Classes | |
| struct | PanoramicImage |
| struct | CloudPage |
| A contiguous window of one cloud's stored records, still in storage layout — no PCL type has been inflated. More... | |
| struct | InstanceRecord |
| One row of the instances table: a spatially-distinct object within an instance-label cloud, carrying a stable GUID that survives regeneration. More... | |
| struct | MeshMetadata |
| struct | MeshTextureInfo |
| struct | MeshTextureMetadata |
| struct | GaussianSplatMetadata |
| One row of the gaussian_splats table, minus the payload. More... | |
| struct | PipelineLogEntry |
| struct | ProjectSummary |
| struct | ProjectMetadata |
Public Member Functions | |
| ProjectDB (std::filesystem::path dbPath, bool readOnly=false) | |
| Opens a ReUseX project database and validates its schema. | |
| ~ProjectDB () | |
| Destructor closes database connection. | |
| ProjectDB (const ProjectDB &)=delete | |
| ProjectDB & | operator= (const ProjectDB &)=delete |
| ProjectDB (ProjectDB &&) noexcept | |
| ProjectDB & | operator= (ProjectDB &&) noexcept |
| bool | is_open () const noexcept |
| const std::filesystem::path & | path () const noexcept |
| int | schema_version () const |
| void | validate_schema () const |
| void | save_sensor_frame (int nodeId, const cv::Mat &colorImage) |
| void | save_sensor_frame (int nodeId, const cv::Mat &color, const cv::Mat &depth, const cv::Mat &confidence, const std::array< double, 16 > &worldPose, const core::SensorIntrinsics &intrinsics, double timestamp=-1.0) |
| void | update_sensor_frame_pose (int nodeId, const std::array< double, 16 > &worldPose) |
| Update only the stored world pose (transform) of an existing sensor frame. | |
| std::vector< int > | sensor_frame_ids () const |
| cv::Mat | sensor_frame_image (int nodeId) const |
| cv::Mat | sensor_frame_depth (int nodeId) const |
| cv::Mat | sensor_frame_confidence (int nodeId) const |
| std::array< double, 16 > | sensor_frame_pose (int nodeId) const |
| The stored world pose, verbatim — row-major 4x4, identity when the row is missing, the transform is NULL, or the blob is the wrong size. | |
| bool | has_sensor_frame_pose (int nodeId) const |
| True when this frame carries a usable stored world pose. | |
| core::SensorIntrinsics | sensor_frame_intrinsics (int nodeId) const |
| bool | has_sensor_frame (int nodeId) const |
| double | sensor_frame_timestamp (int nodeId) const |
| Get the timestamp (epoch seconds) of a sensor frame. | |
| int | nearest_sensor_frame_by_timestamp (double timestamp) const |
| Find the sensor frame with the closest timestamp to the given value. | |
| void | save_panoramic_image (const std::string &filename, const std::vector< uint8_t > &jpeg_data, double timestamp=-1.0, int nodeId=-1) |
| cv::Mat | panoramic_image (int id) const |
| cv::Mat | panoramic_image (std::string_view filename) const |
| bool | has_panoramic_image (std::string_view filename) const |
| void | delete_panoramic_image (int id) |
| void | delete_panoramic_image (std::string_view filename) |
| std::vector< PanoramicImage > | list_panoramic_images () const |
| int | panoramic_image_count () const |
| void | save_panorama_pose (int id, const std::array< double, 16 > &pose, int inliers, double rms) |
| Store a content-aligned pose (row-major 4x4 world) for a panorama. | |
| bool | has_panorama_segmentation (int panoId) const |
| cv::Mat | panorama_segmentation (int panoId) const |
| void | save_panorama_segmentation (int panoId, const cv::Mat &labels) |
| bool | has_segmentation_image (int nodeId) const |
| cv::Mat | segmentation_image (int nodeId) const |
| std::vector< int > | segmentation_image_ids () const |
| void | save_segmentation_image (int nodeId, const cv::Mat &labels) |
| void | save_segmentation_images (const std::vector< int > &nodeIds, const std::vector< cv::Mat > &labels) |
| void | save_point_cloud (std::string_view name, const Cloud &cloud, std::string_view stage="", std::string_view paramsJson="") |
| void | save_point_cloud (std::string_view name, const CloudN &cloud, std::string_view stage="", std::string_view paramsJson="") |
| void | save_point_cloud (std::string_view name, const CloudL &cloud, std::string_view stage="", std::string_view paramsJson="") |
| void | save_point_cloud (std::string_view name, const pcl::PointCloud< pcl::PointXYZ > &cloud, std::string_view stage="", std::string_view paramsJson="") |
| CloudPtr | point_cloud_xyzrgb (std::string_view name) const |
| CloudNPtr | point_cloud_normal (std::string_view name) const |
| CloudLPtr | point_cloud_label (std::string_view name) const |
| pcl::PointCloud< pcl::PointXYZ >::Ptr | point_cloud_xyz (std::string_view name) const |
| bool | has_point_cloud (std::string_view name) const |
| void | delete_point_cloud (std::string_view name) |
| std::vector< std::string > | list_point_clouds () const |
| std::string | point_cloud_type (std::string_view name) const |
| CloudPage | point_cloud_page (std::string_view name, uint64_t offset, uint64_t limit) const |
| Read one page of a point cloud without materializing the cloud. | |
| void | save_label_definitions (std::string_view cloudName, const std::map< int, std::string > &labelMap) |
| std::map< int, std::string > | label_definitions (std::string_view cloudName) const |
| void | save_instances (const std::string &cloud_name, const std::vector< InstanceRecord > &records) |
| Replace the full set of instance rows for a cloud (transactional). | |
| std::vector< InstanceRecord > | instances (const std::string &cloud_name) const |
| All instance rows for a cloud, ordered by instance_id. | |
| std::string | instance_guid (const std::string &cloud_name, uint32_t instance_id) const |
| Stable GUID of a single instance. | |
| void | set_instance_material (std::string_view cloudName, int instanceId, std::string_view materialGuid) |
| Link an instance (a row in the instances table) to a material passport by its document guid. | |
| std::optional< std::string > | instance_material_guid (std::string_view cloudName, int instanceId) const |
| Material passport guid linked to an instance, or nullopt if unlinked. | |
| std::map< int, std::string > | instance_materials (std::string_view cloudName) const |
| All instance_id → material_guid links for a cloud. | |
| void | save_mesh (std::string_view name, const pcl::PolygonMesh &mesh, std::string_view stage="", std::string_view paramsJson="") |
| void | save_mesh (std::string_view name, const pcl::TextureMesh &mesh, std::string_view stage="", std::string_view paramsJson="") |
| std::shared_ptr< pcl::PolygonMesh > | mesh (std::string_view name) const |
| std::shared_ptr< pcl::TextureMesh > | texture_mesh (std::string_view name) const |
| bool | has_mesh (std::string_view name) const |
| std::vector< std::string > | list_meshes () const |
| std::string | mesh_format (std::string_view name) const |
| MeshMetadata | mesh_metadata (std::string_view name) const |
| std::vector< uint8_t > | mesh_data_blob (std::string_view name) const |
| std::vector< MeshTextureInfo > | mesh_texture_blobs (std::string_view name) const |
| std::vector< MeshTextureMetadata > | mesh_texture_metadata (std::string_view name) const |
| void | save_gaussian_splat (std::string_view name, const std::vector< uint8_t > &ply, std::string_view stage="", std::string_view parameters="") |
Store an INRIA-format 3DGS .ply under name, replacing any splat already stored under it (chunks of the previous payload are dropped, so a re-save never leaves orphaned rows behind). | |
| bool | has_gaussian_splat (std::string_view name) const |
| False — not an error — on a project whose schema predates the splat tables, which is what a read-only open of an old project looks like (read-only opens never migrate). | |
| std::vector< std::string > | list_gaussian_splats () const |
| Empty on a pre-v12 schema, for the same reason as has_gaussian_splat(). | |
| GaussianSplatMetadata | gaussian_splat_metadata (std::string_view name) const |
| std::vector< uint8_t > | gaussian_splat_blob (std::string_view name) const |
| The stored bytes, reassembled from their chunks — byte-for-byte what save_gaussian_splat() was given. | |
| bool | delete_gaussian_splat (std::string_view name) |
| Deleting the metadata row cascades to its data chunks. | |
| void | save_component_record (const core::ComponentRecord &record) |
| Insert or replace the component row identified by record.name. | |
| void | update_component_record_by_guid (const core::ComponentRecord &record) |
| Update an existing component's mutable fields (name, type, parent_id, confidence, metadata, notes), matched by its immutable guid. | |
| core::ComponentRecord | component_record (std::string_view name) const |
| Load the component row with the given name. Throws if absent. | |
| bool | has_building_component (std::string_view name) const |
| void | delete_building_component (std::string_view name) |
| std::vector< std::string > | list_building_components () const |
| std::vector< std::string > | list_building_components (std::string_view type) const |
| Names of the components whose stored type discriminator equals type. | |
| int | building_component_count () const |
| int | log_pipeline_start (std::string_view stage, std::string_view paramsJson="") |
| void | log_pipeline_end (int logId, bool success, std::string_view errorMsg="") |
| std::vector< PipelineLogEntry > | pipeline_log (int limit=0) const |
| ProjectSummary | project_summary () const |
| core::MaterialPassport | material_passport (std::string_view documentGuid) const |
| std::vector< core::MaterialPassport > | all_material_passports () const |
| void | add_material_passport (const core::MaterialPassport &passport, std::string_view projectId) |
| void | add_material_passport (const core::MaterialPassport &passport, std::string_view projectId, std::string_view id) |
| Add a material passport with a custom row ID. | |
| void | delete_material_passport (std::string_view documentGuid) |
| Delete a material passport by GUID. | |
| std::vector< std::string > | list_passport_guids () const |
| List document GUIDs ordered by created_at. | |
| std::map< std::string, std::string > | passport_stored_properties (std::string_view documentGuid) const |
| Get stored property field_name→string pairs for a passport. | |
| std::string | passport_property_value (std::string_view documentGuid, std::string_view fieldName) const |
| Get a single passport property value by field name. | |
| std::optional< int > | passport_linked_node_id (std::string_view documentGuid) const |
| Return the sensor frame node_id this passport was linked to. | |
| core::MaterialPassportMetadata | passport_metadata (std::string_view documentGuid) const |
| Get passport metadata without loading all properties. | |
| void | set_passport_metadata_field (std::string_view documentGuid, std::string_view column, std::string_view value) |
| Set a metadata column on a material passport. | |
| void | set_passport_property (std::string_view documentGuid, std::string_view fieldName, std::string_view value) |
| Set a single property value by field name (upsert). | |
| void | delete_passport_property (std::string_view documentGuid, std::string_view fieldName) |
| Delete a single property value by field name. | |
| ProjectMetadata | get_project_metadata (std::string_view projectId) const |
| Get project metadata by project ID. | |
| void | update_project_metadata (const ProjectMetadata &metadata) |
| Update project metadata. | |
| std::vector< std::string > | list_project_ids () const |
| List all project IDs in the database. | |
Definition at line 43 of file ProjectDB.hpp.
|
explicit |
Opens a ReUseX project database and validates its schema.
Creates the following tables if they don't exist (write mode only):
| dbPath | Path to the database file |
| readOnly | If true, opens database in read-only mode |
| std::runtime_error | if database cannot be opened or schema is invalid |
Referenced by operator=(), operator=(), ProjectDB(), and ProjectDB().
| reusex::ProjectDB::~ProjectDB | ( | ) |
Destructor closes database connection.
|
delete |
References ProjectDB().
|
noexcept |
References ProjectDB().
| void reusex::ProjectDB::add_material_passport | ( | const core::MaterialPassport & | passport, |
| std::string_view | projectId ) |
| void reusex::ProjectDB::add_material_passport | ( | const core::MaterialPassport & | passport, |
| std::string_view | projectId, | ||
| std::string_view | id ) |
Add a material passport with a custom row ID.
The id parameter overrides the material_passports.id column value (normally set to document_guid). Use this to link a passport to a sensor frame by setting id to the frame's node_id.
| passport | Material passport data |
| projectId | Project identifier (may be empty) |
| id | Custom row ID for the material_passports.id column |
| std::vector< core::MaterialPassport > reusex::ProjectDB::all_material_passports | ( | ) | const |
| int reusex::ProjectDB::building_component_count | ( | ) | const |
| core::ComponentRecord reusex::ProjectDB::component_record | ( | std::string_view | name | ) | const |
Load the component row with the given name. Throws if absent.
Referenced by reusex::geometry::building_component().
| void reusex::ProjectDB::delete_building_component | ( | std::string_view | name | ) |
| bool reusex::ProjectDB::delete_gaussian_splat | ( | std::string_view | name | ) |
Deleting the metadata row cascades to its data chunks.
| void reusex::ProjectDB::delete_material_passport | ( | std::string_view | documentGuid | ) |
Delete a material passport by GUID.
| documentGuid | Document GUID to delete |
| std::runtime_error | if passport does not exist |
| void reusex::ProjectDB::delete_panoramic_image | ( | int | id | ) |
| void reusex::ProjectDB::delete_panoramic_image | ( | std::string_view | filename | ) |
| void reusex::ProjectDB::delete_passport_property | ( | std::string_view | documentGuid, |
| std::string_view | fieldName ) |
Delete a single property value by field name.
| documentGuid | Document GUID |
| fieldName | Property field name (name_en) |
| std::runtime_error | if passport or property not found |
| void reusex::ProjectDB::delete_point_cloud | ( | std::string_view | name | ) |
| std::vector< uint8_t > reusex::ProjectDB::gaussian_splat_blob | ( | std::string_view | name | ) | const |
The stored bytes, reassembled from their chunks — byte-for-byte what save_gaussian_splat() was given.
| std::runtime_error | when there is no splat named name. |
| GaussianSplatMetadata reusex::ProjectDB::gaussian_splat_metadata | ( | std::string_view | name | ) | const |
| std::runtime_error | when there is no splat named name. |
| ProjectMetadata reusex::ProjectDB::get_project_metadata | ( | std::string_view | projectId | ) | const |
Get project metadata by project ID.
| projectId | Project identifier |
| std::runtime_error | if project does not exist |
| bool reusex::ProjectDB::has_building_component | ( | std::string_view | name | ) | const |
| bool reusex::ProjectDB::has_gaussian_splat | ( | std::string_view | name | ) | const |
False — not an error — on a project whose schema predates the splat tables, which is what a read-only open of an old project looks like (read-only opens never migrate).
| bool reusex::ProjectDB::has_mesh | ( | std::string_view | name | ) | const |
| bool reusex::ProjectDB::has_panorama_segmentation | ( | int | panoId | ) | const |
| bool reusex::ProjectDB::has_panoramic_image | ( | std::string_view | filename | ) | const |
| bool reusex::ProjectDB::has_point_cloud | ( | std::string_view | name | ) | const |
| bool reusex::ProjectDB::has_segmentation_image | ( | int | nodeId | ) | const |
| bool reusex::ProjectDB::has_sensor_frame | ( | int | nodeId | ) | const |
References has_sensor_frame().
Referenced by has_sensor_frame().
| bool reusex::ProjectDB::has_sensor_frame_pose | ( | int | nodeId | ) | const |
True when this frame carries a usable stored world pose.
sensor_frame_pose() cannot answer this: it returns identity for a frame with no row, a NULL transform, or a wrong-sized blob, so a poseless frame is indistinguishable from one legitimately at the origin (#330) — and it returns an all-zero or NaN transform verbatim (#336).
Checks: the row exists, the blob is exactly 16 doubles, all finite, the bottom row is [0,0,0,1], and |det(R)| is above epsilon. A genuinely stored identity pose IS valid — a scan may put its first frame at the origin.
References has_sensor_frame_pose().
Referenced by has_sensor_frame_pose().
| std::string reusex::ProjectDB::instance_guid | ( | const std::string & | cloud_name, |
| uint32_t | instance_id ) const |
Stable GUID of a single instance.
| std::runtime_error | if the cloud or instance does not exist. |
| std::optional< std::string > reusex::ProjectDB::instance_material_guid | ( | std::string_view | cloudName, |
| int | instanceId ) const |
Material passport guid linked to an instance, or nullopt if unlinked.
| std::map< int, std::string > reusex::ProjectDB::instance_materials | ( | std::string_view | cloudName | ) | const |
All instance_id → material_guid links for a cloud.
| std::vector< InstanceRecord > reusex::ProjectDB::instances | ( | const std::string & | cloud_name | ) | const |
All instance rows for a cloud, ordered by instance_id.
| std::map< int, std::string > reusex::ProjectDB::label_definitions | ( | std::string_view | cloudName | ) | const |
| std::vector< std::string > reusex::ProjectDB::list_building_components | ( | ) | const |
Referenced by reusex::geometry::list_building_components().
| std::vector< std::string > reusex::ProjectDB::list_building_components | ( | std::string_view | type | ) | const |
Names of the components whose stored type discriminator equals type.
| std::vector< std::string > reusex::ProjectDB::list_gaussian_splats | ( | ) | const |
Empty on a pre-v12 schema, for the same reason as has_gaussian_splat().
| std::vector< std::string > reusex::ProjectDB::list_meshes | ( | ) | const |
| std::vector< PanoramicImage > reusex::ProjectDB::list_panoramic_images | ( | ) | const |
| std::vector< std::string > reusex::ProjectDB::list_passport_guids | ( | ) | const |
List document GUIDs ordered by created_at.
| std::vector< std::string > reusex::ProjectDB::list_point_clouds | ( | ) | const |
| std::vector< std::string > reusex::ProjectDB::list_project_ids | ( | ) | const |
List all project IDs in the database.
| void reusex::ProjectDB::log_pipeline_end | ( | int | logId, |
| bool | success, | ||
| std::string_view | errorMsg = "" ) |
| int reusex::ProjectDB::log_pipeline_start | ( | std::string_view | stage, |
| std::string_view | paramsJson = "" ) |
| core::MaterialPassport reusex::ProjectDB::material_passport | ( | std::string_view | documentGuid | ) | const |
| std::shared_ptr< pcl::PolygonMesh > reusex::ProjectDB::mesh | ( | std::string_view | name | ) | const |
Referenced by save_mesh(), and save_mesh().
| std::vector< uint8_t > reusex::ProjectDB::mesh_data_blob | ( | std::string_view | name | ) | const |
| std::string reusex::ProjectDB::mesh_format | ( | std::string_view | name | ) | const |
| MeshMetadata reusex::ProjectDB::mesh_metadata | ( | std::string_view | name | ) | const |
| std::vector< MeshTextureInfo > reusex::ProjectDB::mesh_texture_blobs | ( | std::string_view | name | ) | const |
| std::vector< MeshTextureMetadata > reusex::ProjectDB::mesh_texture_metadata | ( | std::string_view | name | ) | const |
| int reusex::ProjectDB::nearest_sensor_frame_by_timestamp | ( | double | timestamp | ) | const |
Find the sensor frame with the closest timestamp to the given value.
Returns -1 if no sensor frames have timestamps.
References nearest_sensor_frame_by_timestamp().
Referenced by nearest_sensor_frame_by_timestamp().
References ProjectDB().
References ProjectDB().
| cv::Mat reusex::ProjectDB::panorama_segmentation | ( | int | panoId | ) | const |
| cv::Mat reusex::ProjectDB::panoramic_image | ( | int | id | ) | const |
| cv::Mat reusex::ProjectDB::panoramic_image | ( | std::string_view | filename | ) | const |
| int reusex::ProjectDB::panoramic_image_count | ( | ) | const |
| std::optional< int > reusex::ProjectDB::passport_linked_node_id | ( | std::string_view | documentGuid | ) | const |
Return the sensor frame node_id this passport was linked to.
When a passport is imported via "rux import photos" and matched to a sensor frame, material_passports.id is set to the frame's node_id (as decimal text). This helper returns that id parsed as an integer, or std::nullopt when the passport was stored without a link (id falls back to the document_guid).
| documentGuid | Document GUID |
| std::runtime_error | if passport not found |
| core::MaterialPassportMetadata reusex::ProjectDB::passport_metadata | ( | std::string_view | documentGuid | ) | const |
Get passport metadata without loading all properties.
| documentGuid | Document GUID |
| std::runtime_error | if passport not found |
| std::string reusex::ProjectDB::passport_property_value | ( | std::string_view | documentGuid, |
| std::string_view | fieldName ) const |
Get a single passport property value by field name.
| documentGuid | Document GUID |
| fieldName | Property field name (name_en in property_definitions) |
| std::runtime_error | if passport or property not found |
| std::map< std::string, std::string > reusex::ProjectDB::passport_stored_properties | ( | std::string_view | documentGuid | ) | const |
Get stored property field_name→string pairs for a passport.
Only includes properties that actually have rows in passport_property_values. Values are returned as human-readable strings (BLOB decoded via as_string()).
| documentGuid | Document GUID |
| std::runtime_error | if passport does not exist |
|
noexcept |
| std::vector< PipelineLogEntry > reusex::ProjectDB::pipeline_log | ( | int | limit = 0 | ) | const |
| CloudLPtr reusex::ProjectDB::point_cloud_label | ( | std::string_view | name | ) | const |
| CloudNPtr reusex::ProjectDB::point_cloud_normal | ( | std::string_view | name | ) | const |
| CloudPage reusex::ProjectDB::point_cloud_page | ( | std::string_view | name, |
| uint64_t | offset, | ||
| uint64_t | limit ) const |
Read one page of a point cloud without materializing the cloud.
Peak memory is O(page), not O(cloud). The chunk map is built from length(data) (which does not load a blob), and only the chunks the requested byte range [offset*step, (offset+count)*step) overlaps are touched, via SQLite incremental blob I/O. A 100k-point page of a 10M-point PointXYZRGB cloud therefore costs ~1.6 MB, not the ~160 MB the blob occupies (nor the ~320 MB it would occupy once inflated into pcl::PointXYZRGB, which is 32 bytes wide because of SSE padding).
A record may straddle a chunk boundary, so the read works in raw byte ranges rather than whole records per chunk.
| offset | First point index. Past the end yields count == 0 with total still populated — not an error. |
| limit | Maximum points to return. 0 yields an empty page. |
| std::runtime_error | when name is not a stored cloud, or when the stored point_step contradicts the stored point_type. |
| std::string reusex::ProjectDB::point_cloud_type | ( | std::string_view | name | ) | const |
| pcl::PointCloud< pcl::PointXYZ >::Ptr reusex::ProjectDB::point_cloud_xyz | ( | std::string_view | name | ) | const |
| CloudPtr reusex::ProjectDB::point_cloud_xyzrgb | ( | std::string_view | name | ) | const |
| ProjectSummary reusex::ProjectDB::project_summary | ( | ) | const |
| void reusex::ProjectDB::save_component_record | ( | const core::ComponentRecord & | record | ) |
Insert or replace the component row identified by record.name.
A guid is generated when record.guid is empty; an existing row's guid is never overwritten.
Referenced by reusex::geometry::save_building_component().
| void reusex::ProjectDB::save_gaussian_splat | ( | std::string_view | name, |
| const std::vector< uint8_t > & | ply, | ||
| std::string_view | stage = "", | ||
| std::string_view | parameters = "" ) |
Store an INRIA-format 3DGS .ply under name, replacing any splat already stored under it (chunks of the previous payload are dropped, so a re-save never leaves orphaned rows behind).
The header is parsed for two reasons, not one: it yields the metadata (gaussian_count, sh_degree) without a second source of truth, and it rejects a file that is not a Gaussian splat before several hundred MB are committed to the project.
| std::runtime_error | if ply is not an INRIA 3DGS PLY. |
| void reusex::ProjectDB::save_instances | ( | const std::string & | cloud_name, |
| const std::vector< InstanceRecord > & | records ) |
Replace the full set of instance rows for a cloud (transactional).
Existing rows for the cloud are deleted first; each record's GUID must be non-empty and unique across the DB. Throws on empty/duplicate GUID.
| void reusex::ProjectDB::save_label_definitions | ( | std::string_view | cloudName, |
| const std::map< int, std::string > & | labelMap ) |
| void reusex::ProjectDB::save_mesh | ( | std::string_view | name, |
| const pcl::PolygonMesh & | mesh, | ||
| std::string_view | stage = "", | ||
| std::string_view | paramsJson = "" ) |
References mesh().
| void reusex::ProjectDB::save_mesh | ( | std::string_view | name, |
| const pcl::TextureMesh & | mesh, | ||
| std::string_view | stage = "", | ||
| std::string_view | paramsJson = "" ) |
References mesh().
| void reusex::ProjectDB::save_panorama_pose | ( | int | id, |
| const std::array< double, 16 > & | pose, | ||
| int | inliers, | ||
| double | rms ) |
Store a content-aligned pose (row-major 4x4 world) for a panorama.
| void reusex::ProjectDB::save_panorama_segmentation | ( | int | panoId, |
| const cv::Mat & | labels ) |
| void reusex::ProjectDB::save_panoramic_image | ( | const std::string & | filename, |
| const std::vector< uint8_t > & | jpeg_data, | ||
| double | timestamp = -1.0, | ||
| int | nodeId = -1 ) |
| void reusex::ProjectDB::save_point_cloud | ( | std::string_view | name, |
| const Cloud & | cloud, | ||
| std::string_view | stage = "", | ||
| std::string_view | paramsJson = "" ) |
| void reusex::ProjectDB::save_point_cloud | ( | std::string_view | name, |
| const CloudL & | cloud, | ||
| std::string_view | stage = "", | ||
| std::string_view | paramsJson = "" ) |
| void reusex::ProjectDB::save_point_cloud | ( | std::string_view | name, |
| const CloudN & | cloud, | ||
| std::string_view | stage = "", | ||
| std::string_view | paramsJson = "" ) |
| void reusex::ProjectDB::save_point_cloud | ( | std::string_view | name, |
| const pcl::PointCloud< pcl::PointXYZ > & | cloud, | ||
| std::string_view | stage = "", | ||
| std::string_view | paramsJson = "" ) |
| void reusex::ProjectDB::save_segmentation_image | ( | int | nodeId, |
| const cv::Mat & | labels ) |
| void reusex::ProjectDB::save_segmentation_images | ( | const std::vector< int > & | nodeIds, |
| const std::vector< cv::Mat > & | labels ) |
| void reusex::ProjectDB::save_sensor_frame | ( | int | nodeId, |
| const cv::Mat & | color, | ||
| const cv::Mat & | depth, | ||
| const cv::Mat & | confidence, | ||
| const std::array< double, 16 > & | worldPose, | ||
| const core::SensorIntrinsics & | intrinsics, | ||
| double | timestamp = -1.0 ) |
References save_sensor_frame().
| void reusex::ProjectDB::save_sensor_frame | ( | int | nodeId, |
| const cv::Mat & | colorImage ) |
References save_sensor_frame().
Referenced by save_sensor_frame(), and save_sensor_frame().
| int reusex::ProjectDB::schema_version | ( | ) | const |
References schema_version().
Referenced by schema_version().
| cv::Mat reusex::ProjectDB::segmentation_image | ( | int | nodeId | ) | const |
| std::vector< int > reusex::ProjectDB::segmentation_image_ids | ( | ) | const |
| cv::Mat reusex::ProjectDB::sensor_frame_confidence | ( | int | nodeId | ) | const |
References sensor_frame_confidence().
Referenced by sensor_frame_confidence().
| cv::Mat reusex::ProjectDB::sensor_frame_depth | ( | int | nodeId | ) | const |
References sensor_frame_depth().
Referenced by sensor_frame_depth().
| std::vector< int > reusex::ProjectDB::sensor_frame_ids | ( | ) | const |
References sensor_frame_ids().
Referenced by sensor_frame_ids().
| cv::Mat reusex::ProjectDB::sensor_frame_image | ( | int | nodeId | ) | const |
References sensor_frame_image().
Referenced by sensor_frame_image().
| core::SensorIntrinsics reusex::ProjectDB::sensor_frame_intrinsics | ( | int | nodeId | ) | const |
References sensor_frame_intrinsics().
Referenced by sensor_frame_intrinsics().
| std::array< double, 16 > reusex::ProjectDB::sensor_frame_pose | ( | int | nodeId | ) | const |
The stored world pose, verbatim — row-major 4x4, identity when the row is missing, the transform is NULL, or the blob is the wrong size.
This accessor does NOT validate. A well-sized all-zero or NaN transform is handed back exactly as stored, and the identity fallback is indistinguishable from a frame legitimately placed at the origin.
If a wrong pose would corrupt your output, gate on has_sensor_frame_pose() first — every pipeline stage does (#336). Raw use is for read-out surfaces (rux get, the GUI API, the Python bindings) that exist to show what the project actually contains, including when it is broken.
Deliberately non-throwing (#336): making it reject degenerate transforms would break exactly the diagnostic paths you need on a bad project, and the validity question has a dedicated accessor below.
References sensor_frame_pose().
Referenced by sensor_frame_pose().
| double reusex::ProjectDB::sensor_frame_timestamp | ( | int | nodeId | ) | const |
Get the timestamp (epoch seconds) of a sensor frame.
Returns -1.0 if not set.
References sensor_frame_timestamp().
Referenced by sensor_frame_timestamp().
| void reusex::ProjectDB::set_instance_material | ( | std::string_view | cloudName, |
| int | instanceId, | ||
| std::string_view | materialGuid ) |
Link an instance (a row in the instances table) to a material passport by its document guid.
Upserts on (cloud, instance_id).
Validates referential integrity: the instance must exist in the target cloud's instances rows and the passport GUID must exist in material_passports. Throws std::runtime_error otherwise (STANDARDS §5).
| void reusex::ProjectDB::set_passport_metadata_field | ( | std::string_view | documentGuid, |
| std::string_view | column, | ||
| std::string_view | value ) |
Set a metadata column on a material passport.
Supported columns: created_at, revised_at, version_number, version_date. document_guid cannot be changed (it is the primary key).
| documentGuid | Document GUID (must exist) |
| column | Metadata column name |
| value | New value |
| std::runtime_error | if passport not found or column not allowed |
| void reusex::ProjectDB::set_passport_property | ( | std::string_view | documentGuid, |
| std::string_view | fieldName, | ||
| std::string_view | value ) |
Set a single property value by field name (upsert).
Looks up the property_definitions entry by name_en, then upserts into passport_property_values. Creates property_definitions entry if needed.
| documentGuid | Document GUID (must exist) |
| fieldName | Property field name (name_en) |
| value | String value to store |
| std::runtime_error | if passport does not exist |
| std::shared_ptr< pcl::TextureMesh > reusex::ProjectDB::texture_mesh | ( | std::string_view | name | ) | const |
| void reusex::ProjectDB::update_component_record_by_guid | ( | const core::ComponentRecord & | record | ) |
Update an existing component's mutable fields (name, type, parent_id, confidence, metadata, notes), matched by its immutable guid.
Geometry is left untouched. Throws if no component has the given guid.
Referenced by reusex::geometry::update_building_component_by_guid().
| void reusex::ProjectDB::update_project_metadata | ( | const ProjectMetadata & | metadata | ) |
Update project metadata.
| metadata | Project metadata to update Creates project if it doesn't exist |
| void reusex::ProjectDB::update_sensor_frame_pose | ( | int | nodeId, |
| const std::array< double, 16 > & | worldPose ) |
Update only the stored world pose (transform) of an existing sensor frame.
Leaves color/depth/confidence/intrinsics blobs untouched. Throws if no sensor frame with the given node_id exists.
| worldPose | Row-major 4x4 SE(3) world pose (16 doubles). |
References update_sensor_frame_pose().
Referenced by update_sensor_frame_pose().
| void reusex::ProjectDB::validate_schema | ( | ) | const |
References validate_schema().
Referenced by validate_schema().