|
ReUseX
0.0.5
3D Point Cloud Processing for Building Reuse
|
Wire form of one stored report PDF version — the ReportPdfVersion schema in ruxd's API contract (docs/gui/openapi.yaml, in the ruxd repo). More...
Namespaces | |
| namespace | json_export |
| namespace | json_import |
| namespace | serialization |
| namespace | traits |
Classes | |
| class | AndNode |
| AND combinator: expr1 && expr2. More... | |
| struct | Artifact |
| One named cloud / table / mesh the pipeline traffics in. More... | |
| struct | BlockingType |
| struct | Certifications |
| Certifications, approvals and declarations for the item. More... | |
| class | CloudMisalignedError |
| Mean position of one instance's points. More... | |
| class | CloudReferenceNode |
| Cloud reference: a label cloud loaded from ProjectDB by name. More... | |
| struct | ColumnPatch |
| Sparse update of a user column definition. More... | |
| class | CompareNode |
| Comparison operators: <cloud> >= value, etc. More... | |
| struct | ComponentRecord |
| Core-owned persistence contract for a row of the building_components table (#227). More... | |
| struct | Condition |
| Condition assessment of the construction item. More... | |
| struct | ConstructionItemDescription |
| Description of the reused construction item. More... | |
| struct | CsvOptions |
| A template's CSV export options (templates.csv). More... | |
| struct | DangerousSubstance |
| Dangerous substance analysis record. More... | |
| struct | Dimensions |
| Physical dimensions and geometry of the construction item. More... | |
| struct | Emission |
| Emission measurement record. More... | |
| struct | EnvironmentalPotential |
| Environmental and resource potential for sustainable utilization. More... | |
| class | EqualNode |
| Equality: <cloud> == value. More... | |
| struct | FilterExpression |
| Parsed filter expression with resolved label cloud references. More... | |
| class | FilterNode |
| Base AST node for filter expressions. More... | |
| struct | FireProperties |
| Fire-related properties of the construction item. More... | |
| struct | Fraction |
| struct | FractionReport |
| struct | FrameVisibility |
| One frame in which a queried world point is visible, with the geometry of its projection. More... | |
| struct | GaussianSplatHeader |
| What the PLY header of an INRIA 3D Gaussian Splatting file says. More... | |
| struct | History |
| Historical usage information for the construction item. More... | |
| class | InNode |
| In-set: <cloud> in [v1, v2, v3]. More... | |
| struct | InstanceCentroid |
| struct | InstanceEvidence |
| Everything the photo evidence knows about one instance: where it is and the frames that see it, best first (visible_frames_occluded). More... | |
| struct | InstanceProbe |
| An instance's centroid plus evenly spread samples of its points. More... | |
| class | IObserver |
| class | IProgressObserver |
| class | IVisualObserver |
| class | KeyValueError |
| A write the catalogue refuses: unknown key, read-only key, or a value the key's type does not accept. More... | |
| struct | LeksikonField |
| One top-level leksikon property, in leksikon (MaterialEPAS section) order. More... | |
| struct | MaskProjectionOptions |
| Tunables for project_frame_mask() (STANDARDS §4). More... | |
| class | MaskSelectionError |
| A frame cannot be projected (no usable pose, no depth image, no base cloud, degenerate intrinsics) or a selection is unusable (no points). More... | |
| struct | MaskSelectionOptions |
| Tunables for apply_mask_selection(). More... | |
| struct | MaskSelectionResult |
| What apply_mask_selection() created. More... | |
| struct | MaterialPassport |
| A complete material passport for a reused building material. More... | |
| struct | MaterialPassportMetadata |
| Document-level metadata for the material passport. More... | |
| class | NameConflictError |
| A name that must be unique (template, user column, stored field) is already taken. More... | |
| class | NotEqualNode |
| Not equal: <cloud> != value. More... | |
| struct | OcclusionQuery |
| Tunables for visible_frames_occluded(). More... | |
| class | OperationCancelled |
| Thrown by visible_frames_occluded() when its cancel flag is raised. More... | |
| class | OrNode |
| OR combinator: expr1 || expr2. More... | |
| struct | Owner |
| Owner contact information for the material passport. More... | |
| struct | PanoramaQuery |
| Tunables for panoramas_for_point(). More... | |
| struct | PanoramaSighting |
| One panorama near a world point. More... | |
| struct | PartPhotos |
| The photo evidence of one survey part. More... | |
| struct | PhotoQuery |
| Tunables for the photo evidence of an instance. More... | |
| struct | Pollution |
| Pollution, content and emission information. More... | |
| struct | ProductInformation |
| Original product information. More... | |
| class | ProgressObserver |
| One stage's progress report, RAII: started on construction, finished on destruction, update() in between. More... | |
| struct | ReportSurveyRow |
| One survey type as the PDF report's Kortlægning section lists it. More... | |
| struct | ResolvedTemplate |
| struct | Resource |
| struct | ResourceKey |
| struct | ResourcePatchResult |
| struct | ResourceReportSection |
| struct | ResourceTable |
| struct | ResourceValue |
| struct | ResourceWrite |
| class | SamplePendingError |
| struct | SampleState |
| class | ScopedProgressObserver |
Route progress started on this thread to observer for the lifetime of the scope, without touching the process-global observer. More... | |
| struct | SeedTemplate |
| struct | SensorIntrinsics |
| Lightweight camera intrinsics replacing rtabmap::CameraModel in downstream code. More... | |
| struct | StageContract |
| The full input/output contract of one pipeline stage. More... | |
| struct | StageInput |
| One prerequisite of a stage. More... | |
| class | stopwatch |
| struct | SurveySyncOptions |
| Options for sync_survey — the cloud names it reads from. More... | |
| struct | SurveySyncReport |
| Counts of what sync_survey changed. More... | |
| struct | SurveyTypeDeletion |
| Delete a survey type and every part in it, with delete_resource's rules for each part (tombstones, passports), in one transaction. More... | |
| struct | TemplateInput |
| A create or sparse edit; absent fields are left alone. More... | |
| struct | TemplateMember |
| struct | TemplateView |
| One template as the API shows it: its row, parsed members and CSV options, and its resolution against the live key catalogue. More... | |
| struct | TransactionLogEntry |
| A single entry in the material passport transaction log. More... | |
| struct | TypeTotals |
| struct | ValidationIssue |
| One problem discovered by a validation check. More... | |
| struct | ValidationReport |
| Aggregate result of running all validation checks over a project. More... | |
| struct | VisibilityProbe |
| What visible_frames_occluded() tests for one object: an anchor that decides the frustum test and the ranking (usually the centroid), plus surface samples. More... | |
| struct | VisibilityQuery |
| Tunables for visible_frames(). More... | |
Typedefs | |
| using | LogHandler |
| using | ArtifactOverrides = std::map<std::string, std::string, std::less<>> |
| Runtime substitutions for artifact names, for the flags that let a stage be pointed at a differently-named cloud (rux create instances
--semantic-cloud foo). | |
Functions | |
| int32_t | cloud_label_at (const std::vector< CloudReferenceNode > &clouds, size_t cloud_idx, size_t point_idx) |
| Helper for leaf nodes: read the label for point_idx from cloud cloud_idx, returning -1 if the index is out of range. | |
| auto | parse_filter_expression (const std::string &expression, ProjectDB &db) -> std::unique_ptr< FilterExpression > |
| Parse filter expression and resolve label cloud references from ProjectDB. | |
| auto | evaluate_filter (const FilterExpression &expr, size_t cloud_size) -> IndicesPtr |
| Evaluate filter expression against all points, generate Indices. | |
| auto | evaluate_filter_expression (const std::string &filter_expr, ProjectDB &db, size_t expected_size) -> IndicesPtr |
| Parse and evaluate a filter expression against a project in one step. | |
| std::vector< FrameVisibility > | visible_frames (const ProjectDB &db, const Eigen::Vector3d &world_point, const VisibilityQuery &query={}) |
| Rank the posed sensor frames by how centrally a world point projects. | |
| std::vector< std::vector< FrameVisibility > > | visible_frames_batch (const ProjectDB &db, const std::vector< Eigen::Vector3d > &world_points, const VisibilityQuery &query={}) |
| visible_frames() for many points at once. | |
| std::vector< std::vector< FrameVisibility > > | visible_frames_occluded (const ProjectDB &db, const std::vector< VisibilityProbe > &probes, const OcclusionQuery &query={}, const std::atomic< bool > *cancel=nullptr) |
| Occlusion-aware visible_frames_batch(): frames that actually see each probe, not merely frames whose frustum contains it. | |
| GaussianSplatHeader | parse_gaussian_splat_ply_header (std::string_view head) |
Parse the PLY header in head and verify it is an INRIA splat file. | |
| std::string | generate_guid () |
| Generate a fresh UUID-v4-like identifier (36-char, hyphenated hex). | |
| std::map< std::uint32_t, InstanceCentroid > | instance_centroids (const ProjectDB &db, std::string_view label_cloud, std::string_view positions_cloud="cloud") |
| Centroid of every instance id in an instance-label cloud. | |
| std::map< std::uint32_t, InstanceProbe > | instance_probes (const ProjectDB &db, std::string_view label_cloud, std::string_view positions_cloud="cloud", std::size_t samples=PhotoQuery{}.samples_per_instance) |
instance_centroids() plus up to samples points per instance, taken at evenly spaced positions in the instance's (finite) point list — spatially spread, since the clouds are stored in Morton order (#394). | |
| std::map< std::uint32_t, InstanceEvidence > | instance_evidence (const ProjectDB &db, std::string_view label_cloud, const PhotoQuery &query={}, std::string_view positions_cloud="cloud", const std::atomic< bool > *cancel=nullptr) |
The ranked, occlusion-aware frames of every instance of label_cloud that has points: visible_frames_occluded over all its probes in one pass over the frames (each depth image decoded at most once). | |
| std::map< std::uint32_t, PartPhotos > | instance_photos (const ProjectDB &db, std::string_view label_cloud, const PhotoQuery &query={}, std::string_view positions_cloud="cloud") |
| instance_evidence() reduced to count + best frame per instance. | |
| Eigen::Vector2d | equirect_uv (const Eigen::Vector3d &bearing) |
| Normalised equirect coordinates of a bearing in the panorama frame. | |
| std::vector< PanoramaSighting > | panoramas_for_point (const ProjectDB &db, const Eigen::Vector3d &world_point, const PanoramaQuery &query={}) |
Panoramas that can be placed in the world, nearest first, with where world_point appears in each. | |
| constexpr bool | is_valid_label (uint32_t label) noexcept |
| constexpr bool | is_out_of_contract_label (uint32_t label) noexcept |
| size_t | label_to_index (uint32_t label) |
| Convert a point label to a zero-based vector index, replacing the error-prone bare label - 1 idiom used to index parallel arrays such as plane_normals. | |
| uint32_t | api_to_point_label (int api_label) |
| API (CV_32S, -1 = background) → point label (uint32_t, 0 = unlabeled). | |
| int | point_label_to_api (uint32_t point_label) |
| Point label (uint32_t, 0 = unlabeled) → API (CV_32S, -1 = background). | |
| uint16_t | api_to_storage (int api_label) |
| API label (CV_32S, -1 = background) → storage value (CV_16U, 0 = bg, label + 1). | |
| int | storage_to_api (uint16_t storage_value) |
| Storage value (CV_16U, 0 = bg, label + 1) → API label (CV_32S, -1 = background). | |
| cv::Mat | storage_mat_to_api (const cv::Mat &storage) |
| Convert a storage label image (CV_16U, 0 = bg) to an API label image (CV_32S, -1 = background) by subtracting the +1 offset. | |
| cv::Mat | api_mat_to_storage (const cv::Mat &api) |
| Convert an API label image (CV_32S, -1 = background) to a storage label image (CV_16U, 0 = bg) by adding the +1 offset. | |
| void | set_log_handler (LogHandler handler) |
| void | reset_log_handler () |
| void | set_log_level (LogLevel level) |
| auto | get_log_level () -> LogLevel |
| auto | should_log (LogLevel level) -> bool |
| void | log_message (LogLevel level, std::string_view message) |
| template<typename... Args> | |
| void | log (LogLevel level, fmt::format_string< Args... > format, Args &&...args) |
| void | log (LogLevel level, std::string_view message) |
| template<typename... Args> | |
| void | trace (fmt::format_string< Args... > format, Args &&...args) |
| void | trace (std::string_view message) |
| template<typename... Args> | |
| void | debug (fmt::format_string< Args... > format, Args &&...args) |
| void | debug (std::string_view message) |
| template<typename... Args> | |
| void | info (fmt::format_string< Args... > format, Args &&...args) |
| void | info (std::string_view message) |
| template<typename... Args> | |
| void | warn (fmt::format_string< Args... > format, Args &&...args) |
| void | warn (std::string_view message) |
| template<typename... Args> | |
| void | error (fmt::format_string< Args... > format, Args &&...args) |
| void | error (std::string_view message) |
| template<typename... Args> | |
| void | critical (fmt::format_string< Args... > format, Args &&...args) |
| void | critical (std::string_view message) |
| std::vector< std::size_t > | project_frame_mask (const ProjectDB &db, int frame_id, const cv::Mat &mask, const MaskProjectionOptions &opts={}) |
| Indices of the base-cloud points that the mask covers in one frame. | |
| MaskSelectionResult | apply_mask_selection (ProjectDB &db, const std::vector< std::size_t > &indices, const std::string &class_name, const MaskSelectionOptions &opts={}) |
| Label the selected points as class_name, make them one new instance, and file a survey part for it — in one transaction. | |
| auto | to_string (Material value) -> std::string_view |
| Convert Material enum to its string identifier. | |
| auto | material_from_string (std::string_view str) -> std::optional< Material > |
| Parse a Material from its string identifier. | |
| auto | material_names () -> std::vector< std::string_view > |
| Every Material string identifier, in enum order. | |
| auto | to_string (TriState value) -> std::string_view |
| Convert TriState enum to its string identifier. | |
| auto | tri_state_from_string (std::string_view str) -> std::optional< TriState > |
| Parse a TriState from its string identifier. | |
| auto | to_string (EmissionQuantityType value) -> std::string_view |
| Convert EmissionQuantityType enum to its string identifier. | |
| auto | emission_quantity_type_from_string (std::string_view str) -> std::optional< EmissionQuantityType > |
| Parse an EmissionQuantityType from its string identifier. | |
| auto | to_string (SubstanceContentMethod value) -> std::string_view |
| Convert SubstanceContentMethod enum to its string identifier. | |
| auto | substance_content_method_from_string (std::string_view str) -> std::optional< SubstanceContentMethod > |
| Parse a SubstanceContentMethod from its string identifier. | |
| auto | to_string (TransactionType value) -> std::string_view |
| Convert TransactionType enum to its string identifier. | |
| auto | transaction_type_from_string (std::string_view str) -> std::optional< TransactionType > |
| Parse a TransactionType from its string identifier. | |
| void | set_visual_observer (IVisualObserver *observer) |
| void | set_progress_observer (IProgressObserver *observer) |
| void | reset_visual_observer () |
| void | reset_progress_observer () |
| auto | get_visual_observer () -> IVisualObserver * |
| auto | get_progress_observer () -> IProgressObserver * |
| auto | current_progress_observer () -> IProgressObserver * |
| The observer progress reported from THIS thread goes to: the innermost ScopedProgressObserver installed on it, else the global one (which may be null). | |
| nlohmann::json | report_version_json (const ProjectDB::ReportPdfRecord &r) |
| {id, created_at, label, size_bytes, version, blocking_types}; blocking_types is null for a version generated before schema v23. | |
| std::string | display_value (const ResourceKey &key, const std::optional< std::string > &value) |
| A value as a reader sees it: treatment and miljøstatus as their Danish labels, booleans as Ja/Nej, unset as "". | |
| std::string | csv_cell (std::string_view value, std::string_view delimiter) |
| One CSV cell: a cell starting with = + - @ TAB or CR gets a leading ' (formula injection), then RFC 4180 quoting when it holds the delimiter, a quote, CR or LF. | |
| std::vector< std::string > | csv_labels (const std::vector< ResourceKey > &columns) |
The CSV header labels of columns: each key's label, with " (<category>)" appended to every label that occurs more than once (counting the "Kode" column), so no two headers read the same. | |
| std::string | build_resource_csv (const std::vector< ResourceKey > &columns, const std::vector< Resource > &rows, const CsvOptions &options) |
| Header + one CRLF-terminated row per resource, led by the resource code. | |
| std::string | export_resources_csv (const ProjectDB &db, int64_t template_id) |
| The CSV for one template: its resolved keys, every resource by code, its CSV options. | |
| std::vector< ResourceTable > | resource_tables (const std::vector< ResourceKey > &columns, const std::vector< Resource > &rows, std::size_t max_columns=kResourceTableMaxColumns) |
Wrap columns into tables of at most max_columns, each led by a "Betegnelse" column whose cell is "<sys:name> · <code>" (sys:name is not repeated among the others). | |
| ResourceReportSection | resource_report_section (const ProjectDB &db, int64_t template_id) |
| The PDF's Ressourcetabel for one template: every resource whose type is not rejected, by code. | |
| std::string_view | to_string (KeyScope) |
| std::vector< LeksikonField > | leksikon_fields () |
| Nested object-array fields (dangerous substances, emissions) are skipped: they are rows, not one value. | |
| std::vector< std::string > | leksikon_categories () |
| Distinct categories of leksikon_fields(), in order. | |
| std::vector< ResourceKey > | builtin_keys () |
| the 11 sys: keys, spec order | |
| std::vector< ResourceKey > | leksikon_keys () |
| ResourceKey | column_key (const ProjectDB::PropertyDefinition &def) |
| std::vector< ResourceKey > | key_catalogue (const std::vector< ProjectDB::PropertyDefinition > &columns) |
| Built-in, then leksikon, then user columns (in the given order) — the "catalogue order" template categories expand in. | |
| std::vector< ResourceKey > | key_catalogue (const ProjectDB &db) |
| const ResourceKey * | find_key (const std::vector< ResourceKey > &catalogue, std::string_view id) |
nullptr when id is not in catalogue. | |
| std::optional< double > | parse_number (std::string_view text) |
| Finite number with '. | |
| std::string | format_number (double v) |
| Shortest round-trip text: 290.0 -> "290", 0.1 -> "0.1". | |
| std::optional< std::string > | normalise_value (const ResourceKey &key, const std::optional< std::string > &value) |
Validate value for key and return it normalised for storage (numbers with '. | |
| std::vector< TemplateMember > | parse_members (const nlohmann::json &members) |
| Parse [{"category": name} | {"key": id}, …]. | |
| std::vector< TemplateMember > | read_members (std::string_view stored, std::string_view template_name) |
| Stored members, tolerantly: unreadable JSON logs warn and reads as none. | |
| nlohmann::json | members_json (const std::vector< TemplateMember > &members) |
| ResolvedTemplate | resolve_template (const std::vector< TemplateMember > &members, const std::vector< ResourceKey > &catalogue) |
| Spec §5.2: a category member expands to every catalogue key in that category (catalogue order), a key member adds that key, duplicates keep their first position, and members that resolve to nothing go to missing. | |
| std::vector< SeedTemplate > | seed_templates () |
| "Materialepas (fuld)" (one category member per leksikon category) and "Hurtig genbrugsscreening" (the 11 sys: keys), in that order. | |
| CsvOptions | parse_csv_options (const nlohmann::json &csv) |
| CsvOptions | read_csv_options (std::string_view stored, std::string_view template_name) |
| Stored options, tolerantly: a bad field logs warn and uses its default. | |
| nlohmann::json | csv_options_json (const CsvOptions &options) |
| TemplateMember | legacy_column_member (std::string_view column, const std::vector< ResourceKey > &catalogue) |
| std::string | unique_name (std::string_view base, std::string_view tag, const std::vector< std::string > &taken) |
First of "<base> (<tag>)", "<base> (<tag> 2)", "<base> (<tag> 3)", … that is not in taken. | |
| std::vector< TemplateView > | template_views (const ProjectDB &db) |
| Every template by id. Logs warn once per template with missing members. | |
| TemplateView | template_view (const ProjectDB &db, int64_t id) |
| TemplateView | create_template (ProjectDB &db, const TemplateInput &input) |
| TemplateView | update_template (ProjectDB &db, int64_t id, const TemplateInput &input) |
| void | delete_template (ProjectDB &db, int64_t id) |
| TemplateView | duplicate_template (ProjectDB &db, int64_t id) |
| Copy as "<name> (kopi)", "<name> (kopi 2)", … (never a seed). | |
| std::vector< TemplateView > | restore_seed_templates (ProjectDB &db) |
| Insert every seed whose tag no template carries ("Gendan
standardskabeloner"); a seed whose name is taken gets " (standard)". | |
| std::optional< std::string > | value_of (const Resource &r, std::string_view key) |
The value stored under key in r, or nullopt (absent or unset). | |
| std::vector< Resource > | list_resources (const ProjectDB &db, const std::optional< std::vector< std::string > > &keys=std::nullopt) |
| One per survey part, by code. | |
| Resource | resource (const ProjectDB &db, std::string_view code, const std::optional< std::vector< std::string > > &keys=std::nullopt) |
| ResourcePatchResult | patch_resource (ProjectDB &db, std::string_view code, const std::vector< ResourceWrite > &writes, const std::optional< std::vector< std::string > > &keys=std::nullopt) |
| Validate every write (normalise_value), then apply them in one transaction: type-scoped keys to the survey type, part-scoped built-ins to the part, leksikon/column keys to the part's passport (created on the first non-null write). | |
| Resource | create_resource (ProjectDB &db, int64_t type_id, const std::optional< std::string > &name=std::nullopt) |
A manual part with the next RX code; name becomes its designation. | |
| void | delete_resource (ProjectDB &db, std::string_view code) |
| Delete a part — manual or instance-backed — in one transaction. | |
| SurveyTypeDeletion | delete_survey_type (ProjectDB &db, int64_t type_id) |
| ProjectDB::PropertyDefinition | create_column (ProjectDB &db, ProjectDB::PropertyDefinition def) |
| Add a user column (def.id is ignored and returned filled in). | |
| void | delete_column (ProjectDB &db, const std::string &id) |
| Delete a user column and, in the same transaction, every value stored under its name (logged at warn with the count), so the name can be used again. | |
| ProjectDB::PropertyDefinition | update_column (ProjectDB &db, const std::string &id, const ColumnPatch &patch) |
| A rename moves the stored values in the same transaction. | |
| const std::vector< StageContract > & | stage_contracts () |
| Every stage contract, in pipeline order. | |
| const StageContract & | stage_contract (PipelineStage stage) |
| The contract of one stage. | |
| const std::vector< Artifact > & | pipeline_artifacts () |
| Every artifact the contracts refer to. | |
| const Artifact * | find_artifact (std::string_view name) |
| Look up an artifact by name, or nullptr when it is not a pipeline artifact. | |
| std::optional< PipelineStage > | producing_stage (std::string_view artifact) |
The earliest stage that writes artifact, or nullopt when nothing does (an externally sourced artifact). | |
| std::optional< PipelineStage > | parse_pipeline_stage (std::string_view name) |
| Parse a stage name (e.g. | |
| std::string_view | to_string (PipelineStage stage) |
| Canonical lower-case name of a stage (the primary CLI token). | |
| std::vector< std::string > | pipeline_stage_names () |
| All stage names accepted by parse_pipeline_stage(), for help text. | |
| std::string_view | to_string (Stage stage) |
| std::string_view | to_string (Treatment) |
| std::string_view | to_string (ReviewStatus) |
| std::string_view | to_string (SampleStage) |
| std::string_view | to_string (SampleResult) |
| std::string_view | to_string (EnvironmentStatus) |
| std::string_view | treatment_label_da (Treatment) |
| Danish user-facing labels (the PDF report). | |
| std::string_view | environment_label_da (EnvironmentStatus) |
| std::optional< Treatment > | treatment_from_string (std::string_view) |
| std::optional< ReviewStatus > | review_status_from_string (std::string_view) |
| std::optional< SampleStage > | sample_stage_from_string (std::string_view) |
| std::optional< SampleResult > | sample_result_from_string (std::string_view) |
| void | validate_sample_state (const SampleState &) |
| EnvironmentStatus | environment_status (const std::vector< SampleState > &linked) |
| std::array< double, kTreatmentCount > | circularity_breakdown (const std::vector< TypeTotals > &) |
| std::string_view | to_string (BlockingReason) |
| bool | reportable (ReviewStatus status, EnvironmentStatus environment) |
| True when a type's tonnes may be reported: it is approved and not awaiting a sample (an afventer answer can still make it contaminated). | |
| FractionReport | fractions_by_eak (const std::vector< TypeTotals > &) |
| Approved tonnes per (EAK code, treatment, contaminated), for the bygningsaffald.dk report (GUI Phase 5, R3). | |
| std::string_view | eak_fraction_name (std::string_view code) |
| std::map< std::uint32_t, std::uint32_t > | majority_room (const std::vector< std::uint32_t > &instance_labels, const std::vector< std::uint32_t > &room_labels) |
| std::vector< double > | redistribute_quantity (const std::vector< double > ¤t, double total) |
| std::string | part_code (int number) |
| std::string | sample_code (int number) |
| std::map< int64_t, EnvironmentStatus > | environment_statuses (const ProjectDB &db) |
| EnvironmentStatus | environment_status_of (const ProjectDB &db, int64_t type_id) |
| ProjectDB::SurveyTypeRecord | set_review_status (ProjectDB &db, int64_t type_id, ReviewStatus status) |
| Approving a type whose miljøstatus is afventer throws SamplePendingError. | |
| std::vector< ProjectDB::SurveyPartRecord > | set_type_quantity (ProjectDB &db, int64_t type_id, double total) |
| Scales the type's parts to sum to total (redistribute_quantity). | |
| std::vector< TypeTotals > | type_totals (const ProjectDB &db) |
| ProjectDB::SampleRecord | update_sample_checked (ProjectDB &db, int64_t id, const ProjectDB::SamplePatch &patch) |
| Sample edit with the stage/result rule enforced (validate_sample_state on the merged state). | |
| std::vector< ReportSurveyRow > | report_survey_rows (const ProjectDB &db) |
| One row per reportable survey type, in id order, for the PDF report's survey section ("kun godkendte mængder indgår"). | |
| SurveySyncReport | sync_survey (ProjectDB &db, const SurveySyncOptions &opts={}) |
| Fill survey_types / survey_parts from the instances table: one type per semantic class, one bygningsdel (survey part) per instance, placed in the room most of its points fall in. | |
| void | check_orphaned_passports (const ProjectDB &db, std::vector< ValidationIssue > &out) |
| Material passports not referenced by any instance_materials link. | |
| void | check_dangling_instance_materials (const ProjectDB &db, std::vector< ValidationIssue > &out) |
| instance_materials rows whose instance row or passport is missing. | |
| void | check_instances_without_label_defs (const ProjectDB &db, std::vector< ValidationIssue > &out) |
| instances rows with no corresponding label_definitions entry. | |
| void | check_sibling_cloud_sizes (const ProjectDB &db, std::vector< ValidationIssue > &out) |
| Parallel/sibling clouds (cloud, labels, normals, planes, rooms, instances) whose point counts disagree — they are supposed to be index-aligned. | |
| ValidationReport | validate_project (const ProjectDB &db) |
| Run every check and aggregate the findings. | |
| void | check_stage_inputs (const ProjectDB &db, PipelineStage stage, std::vector< ValidationIssue > &out, const ArtifactOverrides &overrides={}) |
Assert that stage's input clouds/tables exist in db and are index-aligned, per the contract in core/stage_contract.hpp. | |
| ValidationReport | validate_stage (const ProjectDB &db, PipelineStage stage, const ArtifactOverrides &overrides={}) |
| Run check_stage_inputs for a single stage and aggregate the findings. | |
Variables | |
| constexpr std::size_t | kGaussianSplatHeaderProbeBytes = 64 * 1024 |
| How many bytes from the head of a file are enough to find end_header. | |
| constexpr uint32_t | kUnlabeled = 0 |
| Point-cloud convention: 0 means "unlabeled" in every CloudL (labels, planes, rooms, instances). | |
| constexpr int | kBackgroundApi = -1 |
| ProjectDB segmentation API convention: -1 marks background/unlabeled in the CV_32S label images returned by ProjectDB. | |
| constexpr uint16_t | kMaxStorableLabel = 65534 |
| Largest label that can be stored in the CV_16U PNG layer. | |
| constexpr std::string_view | kCsvCodeLabel = "Kode" |
| The leading resource-code column of the CSV: its header in label mode and in key mode. | |
| constexpr std::string_view | kCsvCodeKey = "code" |
| constexpr std::size_t | kResourceTableMaxColumns = 8 |
| constexpr std::string_view | kBuiltinCategory = "Kortlægning" |
| constexpr std::string_view | kColumnCategory = "Egne felter" |
| constexpr std::string_view | kSeedMaterialepas = "materialepas" |
| constexpr std::string_view | kSeedScreening = "screening" |
| constexpr std::string_view | kLegacyKeyPrefix = "legacy:" |
| Export-template columns (schema v21 config.columns) as members. | |
| constexpr std::string_view | kDesignationField = "designation" |
| The leksikon field a hand-added resource's name is stored under. | |
| constexpr std::size_t | kTreatmentCount = 5 |
| constexpr int | kManualSemanticClass = -2 |
| semantic_class of a survey type created by hand, never matched by sync_survey. | |
| constexpr std::string_view | kDefaultInstanceCloud = "instances" |
| Default name of the instance-label cloud sync_survey reads from, and the default SurveySyncOptions::instances_cloud. | |
Wire form of one stored report PDF version — the ReportPdfVersion schema in ruxd's API contract (docs/gui/openapi.yaml, in the ruxd repo).
Survey operations that need a project.
Survey (Ressourcekortlægning) rules that need no database: the wire vocabulary shared by ProjectDB, the REST API and the frontend, and the derivations the GUI shows — miljøstatus from linked samples, tonnes per affaldshierarki step, approved tonnes per EAK code.
Resources (docs/superpowers/specs/2026-10-02-resources-templates-ia-design.md §4): a resource is one survey part; its values are addressed by key id (core/resource_keys.hpp) and routed by scope — the type, the part, or the part's own passport, created on the first passport write.
Templates (docs/superpowers/specs/2026-10-02-resources-templates-ia-design.md §5): an ordered list of category and key members that resolves, against the live key catalogue, to an ordered list of key ids.
The resource key catalogue (docs/superpowers/specs/ 2026-10-02-resources-templates-ia-design.md §4.3): every key a resource (survey part) can carry, and the ONE mapping from a key id to where its value is stored.
Resources out through a template (docs/superpowers/specs/ 2026-10-02-resources-templates-ia-design.md §6.3): the backend CSV (GET /resources/export.csv) and the PDF report's Ressourcetabel.
The servers that answer it (ruxd) serialise through this one function so their responses cannot drift.
The API and the frontend only see key ids; the storage field names (leksikon name_en, column display name) stay in here.
The pure half is here first; the ProjectDB-backed service follows below.
Everything here is pure so it is testable without a project, and so rux, ruxd and a future Qt client all compute the same numbers.
Thin over ProjectDB storage and the pure rules in survey.hpp — the gate and redistribution live here, not in ProjectDB, which stays storage-only.
| using reusex::core::ArtifactOverrides = std::map<std::string, std::string, std::less<>> |
Runtime substitutions for artifact names, for the flags that let a stage be pointed at a differently-named cloud (rux create instances --semantic-cloud foo).
Maps the contract's declared name to the name to actually look for; when any member of an any_of input is overridden, the input collapses to the override so the check is exact rather than lenient.
Definition at line 98 of file validate.hpp.
| using reusex::core::LogHandler |
Definition at line 27 of file logging.hpp.
|
strong |
Which index-alignment class an artifact belongs to.
This is a property of the ARTIFACT, not of the stage that consumes it, so no stage can accidentally declare the per-plane plane_centroids to be index-aligned with the per-point cloud (STANDARDS §3.2).
| Enumerator | |
|---|---|
| none | not index-aligned with anything (tables, meshes) |
| per_point | one entry per point of cloud |
| per_plane | one entry per detected plane |
Definition at line 73 of file stage_contract.hpp.
|
strong |
What kind of thing a named artifact is inside a .rux project.
| Enumerator | |
|---|---|
| point_cloud | a named ProjectDB point cloud |
| mesh | a row in the meshes table |
| gaussian_splat | a row in the gaussian_splats table |
| table | a relational table (sensor_frames, …) |
Definition at line 61 of file stage_contract.hpp.
|
strong |
Why a type blocks the waste report; a type gets one reason, by precedence sample > review > mass.
| Enumerator | |
|---|---|
| review | |
| sample | |
| mass | |
Definition at line 105 of file survey.hpp.
|
strong |
Emission quantity type.
Definition at line 171 of file materialepas_enums.hpp.
|
strong |
| Enumerator | |
|---|---|
| ren_screening | |
| afventer | |
| forurenet | |
| ren_proevesvar | |
Definition at line 43 of file survey.hpp.
|
strong |
| Enumerator | |
|---|---|
| process | |
| progress | |
| visualization | |
Definition at line 24 of file processing_observer.hpp.
|
strong |
What a write changes: the survey type (all its parts) or the one part.
| Enumerator | |
|---|---|
| type | |
| part | |
Definition at line 28 of file resource_keys.hpp.
|
strong |
Where a key's value lives.
| Enumerator | |
|---|---|
| builtin | |
| leksikon | |
| column | |
Definition at line 26 of file resource_keys.hpp.
|
strong |
| Enumerator | |
|---|---|
| trace | |
| debug | |
| info | |
| warn | |
| error | |
| critical | |
| off | |
Definition at line 17 of file logging.hpp.
|
strong |
Material types from the Danish material passport standard (v1.0).
Closed value list with 43 entries. Each value corresponds to a building material category defined in the "Materialepas for genbrugte byggevarer" specification.
Definition at line 19 of file materialepas_enums.hpp.
|
strong |
| Enumerator | |
|---|---|
| category | |
| key | |
Definition at line 25 of file resource_templates.hpp.
|
strong |
Where a panorama's orientation comes from (mirrors the frontend's PanoramaHeading in viewport/panorama.ts).
| Enumerator | |
|---|---|
| resected | rux align 360 pose: position and heading measured. |
| levelled | Matched frame's position, heading unknown (LEVELLED basis). |
Definition at line 149 of file instance_evidence.hpp.
|
strong |
Pipeline stages that have an input contract.
Declared in pipeline order: a stage's inputs may only be produced by a strictly earlier stage, which is asserted by tests/unit/core/test_stage_contract.cpp.
Definition at line 37 of file stage_contract.hpp.
|
strong |
| Enumerator | |
|---|---|
| queue | |
| approved | |
| rejected | |
Definition at line 40 of file survey.hpp.
|
strong |
| Enumerator | |
|---|---|
| none | |
| ren | |
| forurenet | |
Definition at line 42 of file survey.hpp.
|
strong |
| Enumerator | |
|---|---|
| planlagt | |
| udtaget | |
| sendt | |
| svar | |
Definition at line 41 of file survey.hpp.
|
strong |
Definition at line 11 of file stages.hpp.
|
strong |
Method used to determine substance content.
Definition at line 189 of file materialepas_enums.hpp.
|
strong |
Transaction log entry type.
| Enumerator | |
|---|---|
| document | Change to the document itself (metadata).
|
| property | Change to a property value.
|
Definition at line 204 of file materialepas_enums.hpp.
|
strong |
| Enumerator | |
|---|---|
| bevaring | |
| genbrug | |
| genanvendelse | |
| nyttiggoerelse | |
| bortskaffelse | |
Definition at line 26 of file survey.hpp.
|
strong |
Tri-state value for Yes/No/Unknown fields.
Used where the standard defines three possible states, as distinct from std::optional<bool> which represents present-or-absent.
| Enumerator | |
|---|---|
| yes | Yes / true.
|
| no | No / false.
|
| unknown | Unknown / not determined.
|
Definition at line 156 of file materialepas_enums.hpp.
|
strong |
Severity of a single validation finding.
| Enumerator | |
|---|---|
| warning | |
| error | |
Definition at line 21 of file validate.hpp.
|
inline |
Convert an API label image (CV_32S, -1 = background) to a storage label image (CV_16U, 0 = bg) by adding the +1 offset.
| std::invalid_argument | if api is not CV_32S. |
| std::out_of_range | if any label is < -1 or > kMaxStorableLabel (would wrap the CV_16U storage layer). |
Definition at line 148 of file label_semantics.hpp.
References api_mat_to_storage(), kBackgroundApi, and kMaxStorableLabel.
Referenced by api_mat_to_storage().
|
inline |
API (CV_32S, -1 = background) → point label (uint32_t, 0 = unlabeled).
Background (kBackgroundApi) maps to kUnlabeled. Valid class ids pass through unchanged (the semantic-class layer keeps its own numbering; only the background sentinel is translated).
| std::out_of_range | if api_label is negative but not the background sentinel. |
Definition at line 81 of file label_semantics.hpp.
References api_to_point_label(), kBackgroundApi, and kUnlabeled.
Referenced by api_to_point_label().
|
inline |
API label (CV_32S, -1 = background) → storage value (CV_16U, 0 = bg, label + 1).
| std::out_of_range | if api_label < -1, or if api_label exceeds kMaxStorableLabel (would wrap the 16-bit storage layer). |
Definition at line 104 of file label_semantics.hpp.
References api_to_storage(), kBackgroundApi, and kMaxStorableLabel.
Referenced by api_to_storage().
| MaskSelectionResult reusex::core::apply_mask_selection | ( | ProjectDB & | db, |
| const std::vector< std::size_t > & | indices, | ||
| const std::string & | class_name, | ||
| const MaskSelectionOptions & | opts = {} ) |
Label the selected points as class_name, make them one new instance, and file a survey part for it — in one transaction.
Existing instance rows are never deleted and re-inserted, so material links (instance_materials cascades on that delete) survive. Rewritten clouds keep the stage/parameters they were produced with; a cloud created here is saved with stage segment_resource. All reads happen inside the write transaction (BEGIN IMMEDIATE), so a concurrent writer cannot be overwritten from stale copies.
| std::invalid_argument | for an empty/blank class_name or an index out of range. |
| MaskSelectionError | for an empty selection, a missing base cloud, or a label cloud whose size differs from the base cloud's. |
| MaskSelectionError | when opts.type_id names a rejected type. |
| std::out_of_range | when opts.type_id names no survey type. |
References apply_mask_selection().
Referenced by apply_mask_selection().
| std::string reusex::core::build_resource_csv | ( | const std::vector< ResourceKey > & | columns, |
| const std::vector< Resource > & | rows, | ||
| const CsvOptions & | options ) |
Header + one CRLF-terminated row per resource, led by the resource code.
header "label" writes csv_labels() and display values; "key" writes key ids and raw values. A "utf-8-bom" encoding prefixes the UTF-8 byte-order mark.
References build_resource_csv().
Referenced by build_resource_csv().
| std::vector< ResourceKey > reusex::core::builtin_keys | ( | ) |
| void reusex::core::check_dangling_instance_materials | ( | const ProjectDB & | db, |
| std::vector< ValidationIssue > & | out ) |
instance_materials rows whose instance row or passport is missing.
References check_dangling_instance_materials().
Referenced by check_dangling_instance_materials().
| void reusex::core::check_instances_without_label_defs | ( | const ProjectDB & | db, |
| std::vector< ValidationIssue > & | out ) |
instances rows with no corresponding label_definitions entry.
References check_instances_without_label_defs().
Referenced by check_instances_without_label_defs().
| void reusex::core::check_orphaned_passports | ( | const ProjectDB & | db, |
| std::vector< ValidationIssue > & | out ) |
Material passports not referenced by any instance_materials link.
Reported as warnings (an unused passport is not necessarily a bug).
References check_orphaned_passports().
Referenced by check_orphaned_passports().
| void reusex::core::check_sibling_cloud_sizes | ( | const ProjectDB & | db, |
| std::vector< ValidationIssue > & | out ) |
Parallel/sibling clouds (cloud, labels, normals, planes, rooms, instances) whose point counts disagree — they are supposed to be index-aligned.
References check_sibling_cloud_sizes().
Referenced by check_sibling_cloud_sizes().
| void reusex::core::check_stage_inputs | ( | const ProjectDB & | db, |
| PipelineStage | stage, | ||
| std::vector< ValidationIssue > & | out, | ||
| const ArtifactOverrides & | overrides = {} ) |
Assert that stage's input clouds/tables exist in db and are index-aligned, per the contract in core/stage_contract.hpp.
Appends an issue per missing input or size mismatch, each carrying a derived resolution hint.
References check_stage_inputs().
Referenced by check_stage_inputs().
| std::array< double, kTreatmentCount > reusex::core::circularity_breakdown | ( | const std::vector< TypeTotals > & | ) |
References circularity_breakdown().
Referenced by circularity_breakdown().
|
inline |
Helper for leaf nodes: read the label for point_idx from cloud cloud_idx, returning -1 if the index is out of range.
Definition at line 53 of file filter_expression.hpp.
References cloud_label_at(), and clouds.
Referenced by cloud_label_at(), reusex::core::CompareNode::evaluate(), reusex::core::EqualNode::evaluate(), reusex::core::InNode::evaluate(), and reusex::core::NotEqualNode::evaluate().
| ResourceKey reusex::core::column_key | ( | const ProjectDB::PropertyDefinition & | def | ) |
References column_key().
Referenced by column_key().
| ProjectDB::PropertyDefinition reusex::core::create_column | ( | ProjectDB & | db, |
| ProjectDB::PropertyDefinition | def ) |
Add a user column (def.id is ignored and returned filled in).
| NameConflictError | when a user column or a leksikon field already has that name, or any passport already stores values under it (left by a deleted column — never inherited silently), std::invalid_argument for an empty name. |
References create_column().
Referenced by create_column().
| Resource reusex::core::create_resource | ( | ProjectDB & | db, |
| int64_t | type_id, | ||
| const std::optional< std::string > & | name = std::nullopt ) |
A manual part with the next RX code; name becomes its designation.
| std::out_of_range | (no type), std::invalid_argument (empty name). |
References create_resource().
Referenced by create_resource().
| TemplateView reusex::core::create_template | ( | ProjectDB & | db, |
| const TemplateInput & | input ) |
| std::invalid_argument | (no/empty name, bad members or csv), NameConflictError (name taken). |
References create_template().
Referenced by create_template().
|
inline |
Definition at line 107 of file logging.hpp.
References critical(), critical, and log().
Referenced by critical(), and critical().
|
inline |
Definition at line 111 of file logging.hpp.
References critical(), critical, and log().
| std::string reusex::core::csv_cell | ( | std::string_view | value, |
| std::string_view | delimiter ) |
One CSV cell: a cell starting with = + - @ TAB or CR gets a leading ' (formula injection), then RFC 4180 quoting when it holds the delimiter, a quote, CR or LF.
References csv_cell().
Referenced by csv_cell().
| std::vector< std::string > reusex::core::csv_labels | ( | const std::vector< ResourceKey > & | columns | ) |
The CSV header labels of columns: each key's label, with " (<category>)" appended to every label that occurs more than once (counting the "Kode" column), so no two headers read the same.
References csv_labels().
Referenced by csv_labels().
| nlohmann::json reusex::core::csv_options_json | ( | const CsvOptions & | options | ) |
References csv_options_json().
Referenced by csv_options_json().
| auto reusex::core::current_progress_observer | ( | ) | -> IProgressObserver * |
The observer progress reported from THIS thread goes to: the innermost ScopedProgressObserver installed on it, else the global one (which may be null).
References current_progress_observer().
Referenced by current_progress_observer().
|
inline |
|
inline |
Definition at line 83 of file logging.hpp.
| void reusex::core::delete_column | ( | ProjectDB & | db, |
| const std::string & | id ) |
Delete a user column and, in the same transaction, every value stored under its name (logged at warn with the count), so the name can be used again.
| std::out_of_range | (no column). |
References delete_column().
Referenced by delete_column().
| void reusex::core::delete_resource | ( | ProjectDB & | db, |
| std::string_view | code ) |
Delete a part — manual or instance-backed — in one transaction.
An instance-backed part's instance guid is tombstoned (ProjectDB::dismiss_instance) so sync_survey does not re-create it, and its instance's passport link is dropped when it points at the part's passport. The passport is then deleted unless something else (another part or instance) still links it; a kept passport is logged at warn.
| std::out_of_range | for an unknown code. |
References delete_resource().
Referenced by delete_resource().
| SurveyTypeDeletion reusex::core::delete_survey_type | ( | ProjectDB & | db, |
| int64_t | type_id ) |
References delete_survey_type().
Referenced by delete_survey_type().
| void reusex::core::delete_template | ( | ProjectDB & | db, |
| int64_t | id ) |
| std::out_of_range | when id is unknown. |
References delete_template().
Referenced by delete_template().
| std::string reusex::core::display_value | ( | const ResourceKey & | key, |
| const std::optional< std::string > & | value ) |
A value as a reader sees it: treatment and miljøstatus as their Danish labels, booleans as Ja/Nej, unset as "".
References display_value().
Referenced by display_value().
| TemplateView reusex::core::duplicate_template | ( | ProjectDB & | db, |
| int64_t | id ) |
Copy as "<name> (kopi)", "<name> (kopi 2)", … (never a seed).
| std::out_of_range | when id is unknown. |
References duplicate_template().
Referenced by duplicate_template().
| std::string_view reusex::core::eak_fraction_name | ( | std::string_view | code | ) |
References eak_fraction_name().
Referenced by eak_fraction_name().
|
nodiscard |
Parse an EmissionQuantityType from its string identifier.
References emission_quantity_type_from_string().
Referenced by emission_quantity_type_from_string().
| std::string_view reusex::core::environment_label_da | ( | EnvironmentStatus | ) |
References environment_label_da().
Referenced by environment_label_da().
| EnvironmentStatus reusex::core::environment_status | ( | const std::vector< SampleState > & | linked | ) |
References environment_status().
Referenced by environment_status().
| EnvironmentStatus reusex::core::environment_status_of | ( | const ProjectDB & | db, |
| int64_t | type_id ) |
References environment_status_of().
Referenced by environment_status_of().
| std::map< int64_t, EnvironmentStatus > reusex::core::environment_statuses | ( | const ProjectDB & | db | ) |
References environment_statuses().
Referenced by environment_statuses().
| Eigen::Vector2d reusex::core::equirect_uv | ( | const Eigen::Vector3d & | bearing | ) |
Normalised equirect coordinates of a bearing in the panorama frame.
The panorama frame is the pipeline's optical convention (+x right, +y down, +z forward); theta = atan2(x, z), phi = asin(-y), u = (theta + pi) / 2pi, v = (pi/2 - phi) / pi. Identical to geometry::bearing_to_pixel divided by the image size and to the frontend's bearingToUv. The bearing need not be normalised; a zero bearing maps to the image centre.
References equirect_uv().
Referenced by equirect_uv().
|
inline |
|
inline |
Definition at line 104 of file logging.hpp.
| auto reusex::core::evaluate_filter | ( | const FilterExpression & | expr, |
| size_t | cloud_size ) -> IndicesPtr |
Evaluate filter expression against all points, generate Indices.
| expr | Parsed filter expression |
| cloud_size | Number of points to evaluate |
References evaluate_filter().
Referenced by evaluate_filter().
| auto reusex::core::evaluate_filter_expression | ( | const std::string & | filter_expr, |
| ProjectDB & | db, | ||
| size_t | expected_size ) -> IndicesPtr |
Parse and evaluate a filter expression against a project in one step.
The whole "resolve the named label clouds, check they line up with the cloud being filtered, evaluate, and say how much survived" sequence, which every caller needs and which used to be duplicated in the app layer. It lives here so rux and the pipeline stage runners filter identically (#284).
| filter_expr | Expression string; an empty string yields nullptr, i.e. "no filter", so callers can pass an unset option straight through. |
| db | Project to resolve the referenced label clouds from. |
| expected_size | Point count of the cloud the indices will index into. |
| std::runtime_error | on a parse error, a missing cloud, or a referenced cloud whose size disagrees with expected_size. |
References evaluate_filter_expression().
Referenced by evaluate_filter_expression().
| std::string reusex::core::export_resources_csv | ( | const ProjectDB & | db, |
| int64_t | template_id ) |
The CSV for one template: its resolved keys, every resource by code, its CSV options.
| std::out_of_range | when the template is unknown. |
References export_resources_csv().
Referenced by export_resources_csv().
| const Artifact * reusex::core::find_artifact | ( | std::string_view | name | ) |
Look up an artifact by name, or nullptr when it is not a pipeline artifact.
References find_artifact().
Referenced by find_artifact().
| const ResourceKey * reusex::core::find_key | ( | const std::vector< ResourceKey > & | catalogue, |
| std::string_view | id ) |
| std::string reusex::core::format_number | ( | double | v | ) |
Shortest round-trip text: 290.0 -> "290", 0.1 -> "0.1".
References format_number().
Referenced by format_number().
| FractionReport reusex::core::fractions_by_eak | ( | const std::vector< TypeTotals > & | ) |
Approved tonnes per (EAK code, treatment, contaminated), for the bygningsaffald.dk report (GUI Phase 5, R3).
Rejected types are ignored. bevaring never counts: it stays in the building, so it is not waste — but an unapproved bevaring type still blocks. A type awaiting a sample blocks (reason sample) and is withheld even when approved, because its answer can make it contaminated. Any other unapproved type blocks (review). An approved, reportable non-bevaring type without tonnes blocks (mass) and is never counted as zero, so the report cannot be ready while incomplete. Contaminated tonnes are never merged into a clean fraction. Rows are in code, then waste-hierarchy, then clean-before-contaminated order; the blocking list is in input order.
References fractions_by_eak().
Referenced by fractions_by_eak().
| std::string reusex::core::generate_guid | ( | ) |
Generate a fresh UUID-v4-like identifier (36-char, hyphenated hex).
Used for stable entity identity (material passports, building components, instances). Non-deterministic by design: each call yields a new value from a random_device-seeded generator. Do not use where reproducibility across runs is required.
References generate_guid().
Referenced by generate_guid().
| auto reusex::core::get_log_level | ( | ) | -> LogLevel |
References get_log_level().
Referenced by get_log_level().
| auto reusex::core::get_progress_observer | ( | ) | -> IProgressObserver * |
References get_progress_observer().
Referenced by get_progress_observer().
| auto reusex::core::get_visual_observer | ( | ) | -> IVisualObserver * |
References get_visual_observer().
Referenced by get_visual_observer().
|
inline |
|
inline |
Definition at line 90 of file logging.hpp.
| std::map< std::uint32_t, InstanceCentroid > reusex::core::instance_centroids | ( | const ProjectDB & | db, |
| std::string_view | label_cloud, | ||
| std::string_view | positions_cloud = "cloud" ) |
Centroid of every instance id in an instance-label cloud.
The label cloud stores labels only; positions come from positions_cloud, index-aligned point for point (the instances stage's contract). Label 0 (unlabeled, STANDARDS §3) is skipped, as are non-finite points. One pass over the clouds, whatever the number of instances.
| std::invalid_argument | when either cloud is not in the project. |
| CloudMisalignedError | when the clouds are not index-aligned. |
| std::runtime_error | when a cloud cannot be loaded. |
References instance_centroids().
Referenced by instance_centroids().
| std::map< std::uint32_t, InstanceEvidence > reusex::core::instance_evidence | ( | const ProjectDB & | db, |
| std::string_view | label_cloud, | ||
| const PhotoQuery & | query = {}, | ||
| std::string_view | positions_cloud = "cloud", | ||
| const std::atomic< bool > * | cancel = nullptr ) |
The ranked, occlusion-aware frames of every instance of label_cloud that has points: visible_frames_occluded over all its probes in one pass over the frames (each depth image decoded at most once).
Instances without finite points are absent.
| cancel | passed to visible_frames_occluded (throws OperationCancelled when raised). |
| as | instance_probes(). |
References instance_evidence().
Referenced by instance_evidence().
| std::map< std::uint32_t, PartPhotos > reusex::core::instance_photos | ( | const ProjectDB & | db, |
| std::string_view | label_cloud, | ||
| const PhotoQuery & | query = {}, | ||
| std::string_view | positions_cloud = "cloud" ) |
instance_evidence() reduced to count + best frame per instance.
References instance_photos().
Referenced by instance_photos().
| std::map< std::uint32_t, InstanceProbe > reusex::core::instance_probes | ( | const ProjectDB & | db, |
| std::string_view | label_cloud, | ||
| std::string_view | positions_cloud = "cloud", | ||
| std::size_t | samples = PhotoQuery{}.samples_per_instance ) |
instance_centroids() plus up to samples points per instance, taken at evenly spaced positions in the instance's (finite) point list — spatially spread, since the clouds are stored in Morton order (#394).
An instance with fewer points keeps all of them. Same throws as instance_centroids().
References instance_probes().
Referenced by instance_probes().
|
inlineconstexprnoexcept |
label is outside the point-label contract: above INT32_MAX, i.e. a negative API label (typically -1, the background or an uninitialised room) that reached a uint32 point cloud and wrapped to 0xFFFFFFFF (STANDARDS §3.1). Such a value is neither unlabeled nor a class. Definition at line 54 of file label_semantics.hpp.
References is_out_of_contract_label().
Referenced by is_out_of_contract_label().
|
inlineconstexprnoexcept |
label denotes a valid (non-unlabeled) point label. Definition at line 46 of file label_semantics.hpp.
References is_valid_label(), and kUnlabeled.
Referenced by reusex::geometry::CellComplex::compute_room_probabilities(), is_valid_label(), and label_to_index().
| std::vector< ResourceKey > reusex::core::key_catalogue | ( | const ProjectDB & | db | ) |
References key_catalogue().
| std::vector< ResourceKey > reusex::core::key_catalogue | ( | const std::vector< ProjectDB::PropertyDefinition > & | columns | ) |
Built-in, then leksikon, then user columns (in the given order) — the "catalogue order" template categories expand in.
References key_catalogue().
Referenced by key_catalogue(), and key_catalogue().
|
inline |
Convert a point label to a zero-based vector index, replacing the error-prone bare label - 1 idiom used to index parallel arrays such as plane_normals.
| std::out_of_range | if label is kUnlabeled (0), which has no associated index. |
Definition at line 64 of file label_semantics.hpp.
References is_valid_label(), and label_to_index().
Referenced by label_to_index().
| TemplateMember reusex::core::legacy_column_member | ( | std::string_view | column, |
| const std::vector< ResourceKey > & | catalogue ) |
References legacy_column_member().
Referenced by legacy_column_member().
| std::vector< std::string > reusex::core::leksikon_categories | ( | ) |
Distinct categories of leksikon_fields(), in order.
References leksikon_categories().
Referenced by leksikon_categories().
| std::vector< LeksikonField > reusex::core::leksikon_fields | ( | ) |
Nested object-array fields (dangerous substances, emissions) are skipped: they are rows, not one value.
References leksikon_fields().
Referenced by leksikon_fields().
| std::vector< ResourceKey > reusex::core::leksikon_keys | ( | ) |
References leksikon_keys().
Referenced by leksikon_keys().
| std::vector< Resource > reusex::core::list_resources | ( | const ProjectDB & | db, |
| const std::optional< std::vector< std::string > > & | keys = std::nullopt ) |
One per survey part, by code.
With keys, values holds exactly those keys in that order (null when unset or unknown); without, every built-in key plus each catalogue key the part's passport stores, in catalogue order. Passport fields with no catalogue key are skipped, and stored blanks ("", "[]", a leksikon TriState's "unknown") read as unset.
References list_resources().
Referenced by list_resources().
|
inline |
Definition at line 55 of file logging.hpp.
References log(), log_message(), and should_log().
Referenced by critical(), critical(), debug(), debug(), error(), error(), info(), info(), log(), log(), trace(), trace(), warn(), and warn().
|
inline |
Definition at line 64 of file logging.hpp.
References log(), log_message(), and should_log().
| void reusex::core::log_message | ( | LogLevel | level, |
| std::string_view | message ) |
References log_message().
Referenced by log(), log(), and log_message().
| std::map< std::uint32_t, std::uint32_t > reusex::core::majority_room | ( | const std::vector< std::uint32_t > & | instance_labels, |
| const std::vector< std::uint32_t > & | room_labels ) |
References majority_room().
Referenced by majority_room().
|
nodiscard |
Parse a Material from its string identifier.
References material_from_string().
Referenced by material_from_string().
|
nodiscard |
Every Material string identifier, in enum order.
References material_names().
Referenced by material_names().
| nlohmann::json reusex::core::members_json | ( | const std::vector< TemplateMember > & | members | ) |
References members_json().
Referenced by members_json().
| std::optional< std::string > reusex::core::normalise_value | ( | const ResourceKey & | key, |
| const std::optional< std::string > & | value ) |
Validate value for key and return it normalised for storage (numbers with '.
', booleans "true"/"false", multiselect arrays compact JSON); nullopt means clear. "" clears any key except a built-in text key (stored as ""); an empty multiselect array "[]" clears too.
| KeyValueError | when the key is read-only, the value does not fit its data_type/options (a multiselect wants a JSON array of distinct options; a leksikon whole number must fit an int), sys:quantity is negative, sys:name or sys:unit is empty, or a clear hits sys:name/quantity/unit/treatment/starred. |
References normalise_value().
Referenced by normalise_value().
| std::vector< PanoramaSighting > reusex::core::panoramas_for_point | ( | const ProjectDB & | db, |
| const Eigen::Vector3d & | world_point, | ||
| const PanoramaQuery & | query = {} ) |
Panoramas that can be placed in the world, nearest first, with where world_point appears in each.
Placement follows the frontend's resolvePlacement: a resected pose (has_pose) wins; otherwise the matched sensor frame's position with the levelled, heading-free basis (+z forward on world +X, +y down on world -Z). Panoramas with neither are skipped. For a levelled panorama u is relative to that arbitrary heading, so it is only as good as the heading (the heading field says which). Sorted by distance, then id (STANDARDS §6).
When the project has panoramas but none can be placed, a warn with the counts is logged (STANDARDS §5).
References panoramas_for_point().
Referenced by panoramas_for_point().
| CsvOptions reusex::core::parse_csv_options | ( | const nlohmann::json & | csv | ) |
| std::invalid_argument | when csv is not an object or a known field has a value outside its set. |
References parse_csv_options().
Referenced by parse_csv_options().
| auto reusex::core::parse_filter_expression | ( | const std::string & | expression, |
| ProjectDB & | db ) -> std::unique_ptr< FilterExpression > |
Parse filter expression and resolve label cloud references from ProjectDB.
| expression | Filter expression string (e.g., "planes in [1, 2]") |
| db | ProjectDB to load label clouds from |
| std::runtime_error | if syntax invalid or cloud not found |
References parse_filter_expression().
Referenced by parse_filter_expression().
| GaussianSplatHeader reusex::core::parse_gaussian_splat_ply_header | ( | std::string_view | head | ) |
Parse the PLY header in head and verify it is an INRIA splat file.
| head | The first bytes of the file, at least up to end_header (see kGaussianSplatHeaderProbeBytes). |
| std::runtime_error | when head is not a PLY, is truncated before end_header, is binary_big_endian, or is a PLY without the Gaussian properties — the last being the interesting case, since rux export ply writes a perfectly valid PLY that no splat renderer can draw. The message is user-facing: it names what is missing and which command produces the right file. |
References parse_gaussian_splat_ply_header().
Referenced by parse_gaussian_splat_ply_header().
| std::vector< TemplateMember > reusex::core::parse_members | ( | const nlohmann::json & | members | ) |
Parse [{"category": name} | {"key": id}, …].
Shape only: a category or key that does not exist is accepted and later reported as missing.
| std::invalid_argument | naming the bad element. |
References parse_members().
Referenced by parse_members().
| std::optional< double > reusex::core::parse_number | ( | std::string_view | text | ) |
Finite number with '.
' or one ',' as decimal separator; surrounding blanks and a leading '+' are allowed. nullopt otherwise.
References parse_number().
Referenced by parse_number().
| std::optional< PipelineStage > reusex::core::parse_pipeline_stage | ( | std::string_view | name | ) |
Parse a stage name (e.g.
"mesh", "register") to a PipelineStage. Returns std::nullopt for an unknown name.
References parse_pipeline_stage().
Referenced by parse_pipeline_stage().
| std::string reusex::core::part_code | ( | int | number | ) |
References part_code().
Referenced by part_code().
| ResourcePatchResult reusex::core::patch_resource | ( | ProjectDB & | db, |
| std::string_view | code, | ||
| const std::vector< ResourceWrite > & | writes, | ||
| const std::optional< std::vector< std::string > > & | keys = std::nullopt ) |
Validate every write (normalise_value), then apply them in one transaction: type-scoped keys to the survey type, part-scoped built-ins to the part, leksikon/column keys to the part's passport (created on the first non-null write).
Clearing an absent value succeeds.
| KeyValueError | (nothing written) — also when one key appears twice in writes —, std::out_of_range (no part). |
References patch_resource().
Referenced by patch_resource().
| const std::vector< Artifact > & reusex::core::pipeline_artifacts | ( | ) |
Every artifact the contracts refer to.
References pipeline_artifacts().
Referenced by pipeline_artifacts().
| std::vector< std::string > reusex::core::pipeline_stage_names | ( | ) |
All stage names accepted by parse_pipeline_stage(), for help text.
References pipeline_stage_names().
Referenced by pipeline_stage_names().
|
inline |
Point label (uint32_t, 0 = unlabeled) → API (CV_32S, -1 = background).
Inverse of api_to_point_label(): kUnlabeled maps to kBackgroundApi.
Definition at line 93 of file label_semantics.hpp.
References kBackgroundApi, kUnlabeled, and point_label_to_api().
Referenced by point_label_to_api().
| std::optional< PipelineStage > reusex::core::producing_stage | ( | std::string_view | artifact | ) |
The earliest stage that writes artifact, or nullopt when nothing does (an externally sourced artifact).
optimize rewrites sensor_frames in place, so the earliest producer — import — is the one reported.
References producing_stage().
Referenced by producing_stage().
| std::vector< std::size_t > reusex::core::project_frame_mask | ( | const ProjectDB & | db, |
| int | frame_id, | ||
| const cv::Mat & | mask, | ||
| const MaskProjectionOptions & | opts = {} ) |
Indices of the base-cloud points that the mask covers in one frame.
Every point of opts.cloud is placed in the camera optical frame with world -> camera = (pose * local_transform)^-1 (the visible_frames() / vision::project() convention) and projected with the frame's pinhole intrinsics. Pixel coordinates are computed in the intrinsics' own width x height and rescaled to the mask's and the depth image's sizes, so the mask may be the colour image's size (a saved segmentation image) or any other. A point is selected when it is in front of the camera, within max_depth, lands inside the image on a non-zero mask pixel, and passes the occlusion test against the frame's depth image (CV_16U millimetres or CV_32F metres; a pixel with no depth reading rejects the point — it cannot be confirmed visible).
Zero hits is not an error (the mask may cover only background beyond the cloud); it logs a warn with the counts that explain it (STANDARDS §5).
| mask | Single-channel mask, non-zero = selected (CV_8U or CV_32S). |
| MaskSelectionError | when the frame has no usable stored pose, no depth image, degenerate intrinsics, or the base cloud is missing. |
| std::invalid_argument | when the mask is empty or multi-channel. |
References project_frame_mask().
Referenced by project_frame_mask().
| CsvOptions reusex::core::read_csv_options | ( | std::string_view | stored, |
| std::string_view | template_name ) |
Stored options, tolerantly: a bad field logs warn and uses its default.
References read_csv_options().
Referenced by read_csv_options().
| std::vector< TemplateMember > reusex::core::read_members | ( | std::string_view | stored, |
| std::string_view | template_name ) |
Stored members, tolerantly: unreadable JSON logs warn and reads as none.
References read_members().
Referenced by read_members().
| std::vector< double > reusex::core::redistribute_quantity | ( | const std::vector< double > & | current, |
| double | total ) |
References redistribute_quantity().
Referenced by redistribute_quantity().
| std::vector< ReportSurveyRow > reusex::core::report_survey_rows | ( | const ProjectDB & | db | ) |
One row per reportable survey type, in id order, for the PDF report's survey section ("kun godkendte mængder indgår").
A type is listed when it is approved and not awaiting a sample (core::reportable) and it does not block the waste report — so the rows agree with fractions_by_eak: an approved, non-bevaring type without tonnes blocks there (reason mass) and is left out here too. A bevaring type without tonnes never blocks (it is not waste), so it is listed with mass_t nullopt. quantity is the sum of the type's parts.
References report_survey_rows().
Referenced by report_survey_rows().
| nlohmann::json reusex::core::report_version_json | ( | const ProjectDB::ReportPdfRecord & | r | ) |
{id, created_at, label, size_bytes, version, blocking_types}; blocking_types is null for a version generated before schema v23.
References report_version_json().
Referenced by report_version_json().
| bool reusex::core::reportable | ( | ReviewStatus | status, |
| EnvironmentStatus | environment ) |
True when a type's tonnes may be reported: it is approved and not awaiting a sample (an afventer answer can still make it contaminated).
The single rule shared by fractions_by_eak and the report's tonnes (Phase 5, F2).
References reportable().
Referenced by reportable().
| void reusex::core::reset_log_handler | ( | ) |
References reset_log_handler().
Referenced by reset_log_handler().
| void reusex::core::reset_progress_observer | ( | ) |
References reset_progress_observer().
Referenced by reset_progress_observer().
| void reusex::core::reset_visual_observer | ( | ) |
References reset_visual_observer().
Referenced by reset_visual_observer().
| ResolvedTemplate reusex::core::resolve_template | ( | const std::vector< TemplateMember > & | members, |
| const std::vector< ResourceKey > & | catalogue ) |
Spec §5.2: a category member expands to every catalogue key in that category (catalogue order), a key member adds that key, duplicates keep their first position, and members that resolve to nothing go to missing.
References resolve_template().
Referenced by resolve_template().
| ResourceReportSection reusex::core::resource_report_section | ( | const ProjectDB & | db, |
| int64_t | template_id ) |
The PDF's Ressourcetabel for one template: every resource whose type is not rejected, by code.
| std::out_of_range | for an unknown template. |
References resource_report_section().
Referenced by resource_report_section().
| std::vector< ResourceTable > reusex::core::resource_tables | ( | const std::vector< ResourceKey > & | columns, |
| const std::vector< Resource > & | rows, | ||
| std::size_t | max_columns = kResourceTableMaxColumns ) |
Wrap columns into tables of at most max_columns, each led by a "Betegnelse" column whose cell is "<sys:name> · <code>" (sys:name is not repeated among the others).
No rows: no tables.
References kResourceTableMaxColumns, and resource_tables().
Referenced by resource_tables().
| std::vector< TemplateView > reusex::core::restore_seed_templates | ( | ProjectDB & | db | ) |
Insert every seed whose tag no template carries ("Gendan standardskabeloner"); a seed whose name is taken gets " (standard)".
Returns the inserted ones.
References restore_seed_templates().
Referenced by restore_seed_templates().
| std::optional< ReviewStatus > reusex::core::review_status_from_string | ( | std::string_view | ) |
References review_status_from_string().
Referenced by review_status_from_string().
| std::string reusex::core::sample_code | ( | int | number | ) |
References sample_code().
Referenced by sample_code().
| std::optional< SampleResult > reusex::core::sample_result_from_string | ( | std::string_view | ) |
References sample_result_from_string().
Referenced by sample_result_from_string().
| std::optional< SampleStage > reusex::core::sample_stage_from_string | ( | std::string_view | ) |
References sample_stage_from_string().
Referenced by sample_stage_from_string().
| std::vector< SeedTemplate > reusex::core::seed_templates | ( | ) |
"Materialepas (fuld)" (one category member per leksikon category) and "Hurtig genbrugsscreening" (the 11 sys: keys), in that order.
References seed_templates().
Referenced by seed_templates().
| void reusex::core::set_log_handler | ( | LogHandler | handler | ) |
References set_log_handler().
Referenced by set_log_handler().
| void reusex::core::set_log_level | ( | LogLevel | level | ) |
References set_log_level().
Referenced by set_log_level().
| void reusex::core::set_progress_observer | ( | IProgressObserver * | observer | ) |
References set_progress_observer().
Referenced by set_progress_observer().
| ProjectDB::SurveyTypeRecord reusex::core::set_review_status | ( | ProjectDB & | db, |
| int64_t | type_id, | ||
| ReviewStatus | status ) |
Approving a type whose miljøstatus is afventer throws SamplePendingError.
References set_review_status().
Referenced by set_review_status().
| std::vector< ProjectDB::SurveyPartRecord > reusex::core::set_type_quantity | ( | ProjectDB & | db, |
| int64_t | type_id, | ||
| double | total ) |
Scales the type's parts to sum to total (redistribute_quantity).
Throws std::invalid_argument when the type has no parts or total < 0.
References set_type_quantity().
Referenced by set_type_quantity().
| void reusex::core::set_visual_observer | ( | IVisualObserver * | observer | ) |
References set_visual_observer().
Referenced by set_visual_observer().
| auto reusex::core::should_log | ( | LogLevel | level | ) | -> bool |
References should_log().
Referenced by log(), log(), and should_log().
| const StageContract & reusex::core::stage_contract | ( | PipelineStage | stage | ) |
The contract of one stage.
Throws std::logic_error for an enumerator with no table row — a programming error, never a runtime condition.
References stage_contract().
Referenced by stage_contract().
| const std::vector< StageContract > & reusex::core::stage_contracts | ( | ) |
Every stage contract, in pipeline order.
References stage_contracts().
Referenced by stage_contracts().
|
inline |
Convert a storage label image (CV_16U, 0 = bg) to an API label image (CV_32S, -1 = background) by subtracting the +1 offset.
| std::invalid_argument | if storage is not CV_16U (empty is passed through as empty). |
Definition at line 130 of file label_semantics.hpp.
References storage_mat_to_api().
Referenced by storage_mat_to_api().
|
inline |
Storage value (CV_16U, 0 = bg, label + 1) → API label (CV_32S, -1 = background).
Definition at line 119 of file label_semantics.hpp.
References storage_to_api().
Referenced by storage_to_api().
|
nodiscard |
Parse a SubstanceContentMethod from its string identifier.
References substance_content_method_from_string().
Referenced by substance_content_method_from_string().
| SurveySyncReport reusex::core::sync_survey | ( | ProjectDB & | db, |
| const SurveySyncOptions & | opts = {} ) |
Fill survey_types / survey_parts from the instances table: one type per semantic class, one bygningsdel (survey part) per instance, placed in the room most of its points fall in.
Idempotent — only adds instances that have no part yet (has_survey_part_for, keyed on instance guid) and were not dismissed (a deleted part stays deleted, see parts_dismissed), and never touches existing types/parts, so edits made in the GUI survive a rerun. If the instance cloud has labels but no instances rows (a pre-v10 cloud), the rows are backfilled first from the cloud's labels and its "SM{class}-{id}" definitions (see instances_backfilled). Lost instance links of parts that own a passport are restored (see links_restored). Throws std::runtime_error naming rux create instances if the instances cloud does not exist.
References sync_survey().
Referenced by sync_survey().
| TemplateView reusex::core::template_view | ( | const ProjectDB & | db, |
| int64_t | id ) |
| std::out_of_range | when id is unknown. |
References template_view().
Referenced by template_view().
| std::vector< TemplateView > reusex::core::template_views | ( | const ProjectDB & | db | ) |
Every template by id. Logs warn once per template with missing members.
References template_views().
Referenced by template_views().
| std::string_view reusex::core::to_string | ( | BlockingReason | ) |
References to_string().
|
nodiscard |
Convert EmissionQuantityType enum to its string identifier.
References to_string().
| std::string_view reusex::core::to_string | ( | EnvironmentStatus | ) |
References to_string().
| std::string_view reusex::core::to_string | ( | KeyScope | ) |
References to_string().
|
nodiscard |
Convert Material enum to its string identifier.
References to_string().
Referenced by fmt::formatter< reusex::core::EmissionQuantityType >::format(), fmt::formatter< reusex::core::Material >::format(), fmt::formatter< reusex::core::SubstanceContentMethod >::format(), fmt::formatter< reusex::core::TransactionType >::format(), fmt::formatter< reusex::core::TriState >::format(), to_string(), to_string(), to_string(), to_string(), to_string(), to_string(), to_string(), to_string(), to_string(), to_string(), to_string(), to_string(), to_string(), to_string(), reusex::core::IVisualObserver::viewer_add_camera_frustum(), reusex::core::IVisualObserver::viewer_add_cell_complex(), reusex::core::IVisualObserver::viewer_add_cloud(), reusex::core::IVisualObserver::viewer_add_geometry(), reusex::core::IVisualObserver::viewer_add_labeled_cloud(), reusex::core::IVisualObserver::viewer_add_plane(), reusex::core::IVisualObserver::viewer_add_plane(), reusex::core::IVisualObserver::viewer_add_plane_pair(), and reusex::core::IVisualObserver::viewer_add_visibility_graph().
| std::string_view reusex::core::to_string | ( | PipelineStage | stage | ) |
Canonical lower-case name of a stage (the primary CLI token).
References to_string().
| std::string_view reusex::core::to_string | ( | ReviewStatus | ) |
References to_string().
| std::string_view reusex::core::to_string | ( | SampleResult | ) |
References to_string().
| std::string_view reusex::core::to_string | ( | SampleStage | ) |
References to_string().
| std::string_view reusex::core::to_string | ( | Stage | stage | ) |
References to_string().
|
nodiscard |
Convert SubstanceContentMethod enum to its string identifier.
References to_string().
|
nodiscard |
Convert TransactionType enum to its string identifier.
References to_string().
| std::string_view reusex::core::to_string | ( | Treatment | ) |
References to_string().
|
nodiscard |
Convert TriState enum to its string identifier.
References to_string().
|
inline |
|
inline |
Definition at line 76 of file logging.hpp.
|
nodiscard |
Parse a TransactionType from its string identifier.
References transaction_type_from_string().
Referenced by transaction_type_from_string().
| std::optional< Treatment > reusex::core::treatment_from_string | ( | std::string_view | ) |
References treatment_from_string().
Referenced by treatment_from_string().
| std::string_view reusex::core::treatment_label_da | ( | Treatment | ) |
Danish user-facing labels (the PDF report).
Mirror the rux-frontend repo's src/kortlaegning/vocab.ts TREATMENT_LABEL / ENV_LABEL.
References treatment_label_da().
Referenced by treatment_label_da().
|
nodiscard |
Parse a TriState from its string identifier.
References tri_state_from_string().
Referenced by tri_state_from_string().
| std::vector< TypeTotals > reusex::core::type_totals | ( | const ProjectDB & | db | ) |
References type_totals().
Referenced by type_totals().
| std::string reusex::core::unique_name | ( | std::string_view | base, |
| std::string_view | tag, | ||
| const std::vector< std::string > & | taken ) |
First of "<base> (<tag>)", "<base> (<tag> 2)", "<base> (<tag> 3)", … that is not in taken.
References unique_name().
Referenced by unique_name().
| ProjectDB::PropertyDefinition reusex::core::update_column | ( | ProjectDB & | db, |
| const std::string & | id, | ||
| const ColumnPatch & | patch ) |
A rename moves the stored values in the same transaction.
| std::out_of_range | (no column), NameConflictError (name taken, or any passport already stores values under it — even when this column holds none), std::invalid_argument (empty). |
References update_column().
Referenced by update_column().
| ProjectDB::SampleRecord reusex::core::update_sample_checked | ( | ProjectDB & | db, |
| int64_t | id, | ||
| const ProjectDB::SamplePatch & | patch ) |
Sample edit with the stage/result rule enforced (validate_sample_state on the merged state).
References update_sample_checked().
Referenced by update_sample_checked().
| TemplateView reusex::core::update_template | ( | ProjectDB & | db, |
| int64_t | id, | ||
| const TemplateInput & | input ) |
| as | create_template, plus std::out_of_range for an unknown id. |
References update_template().
Referenced by update_template().
| ValidationReport reusex::core::validate_project | ( | const ProjectDB & | db | ) |
Run every check and aggregate the findings.
References validate_project().
Referenced by validate_project().
| void reusex::core::validate_sample_state | ( | const SampleState & | ) |
References validate_sample_state().
Referenced by validate_sample_state().
| ValidationReport reusex::core::validate_stage | ( | const ProjectDB & | db, |
| PipelineStage | stage, | ||
| const ArtifactOverrides & | overrides = {} ) |
Run check_stage_inputs for a single stage and aggregate the findings.
References validate_stage().
Referenced by validate_stage().
| std::optional< std::string > reusex::core::value_of | ( | const Resource & | r, |
| std::string_view | key ) |
The value stored under key in r, or nullopt (absent or unset).
References value_of().
Referenced by value_of().
| std::vector< FrameVisibility > reusex::core::visible_frames | ( | const ProjectDB & | db, |
| const Eigen::Vector3d & | world_point, | ||
| const VisibilityQuery & | query = {} ) |
Rank the posed sensor frames by how centrally a world point projects.
For every sensor frame that carries a usable stored pose (gated on ProjectDB::has_sensor_frame_pose, per #336) and valid pinhole intrinsics, the point is transformed into the camera optical frame using world -> camera = (pose * local_transform)^-1 — the same convention reusex::vision::project() uses. A frame keeps the point when it is in front of the camera (z > 0) and its pinhole projection lands within the image bounds (a frustum test). The centrality score is the projection's normalised distance from the principal point.
The result is sorted best-first: ascending centrality, ties broken by nearer depth, then by frame_id — so the order is fully deterministic (STANDARDS §6). Work is bounded by the number of sensor frames.
Frames without a usable pose or with degenerate intrinsics are skipped, not fatal: a project may be partway through import. When no frame carries a pose the returned vector is empty and a warn is logged with the counts (STANDARDS §5), rather than failing outright.
Lives in core (not vision) deliberately: it depends only on ProjectDB and SensorIntrinsics plus Eigen, and the GUI read endpoint that drives it (ruxd_api_lib) links reusex_core but NOT reusex_vision, which stays out of the light test binary (#268). There is no PCL, CGAL, RTABMap or ML here, so core's header-hygiene rule (STANDARDS §1) is respected.
| db | Project to read sensor frames from. |
| world_point | The 3D point in world coordinates. |
| query | Optional visibility tunables. |
References visible_frames().
Referenced by visible_frames().
| std::vector< std::vector< FrameVisibility > > reusex::core::visible_frames_batch | ( | const ProjectDB & | db, |
| const std::vector< Eigen::Vector3d > & | world_points, | ||
| const VisibilityQuery & | query = {} ) |
visible_frames() for many points at once.
Reads every frame's pose and intrinsics once and projects all points through them, so the cost is one pass over the sensor frames rather than one per point. result[i] is exactly visible_frames(db, world_points[i], query), sorted the same way.
References visible_frames_batch().
Referenced by visible_frames_batch().
| std::vector< std::vector< FrameVisibility > > reusex::core::visible_frames_occluded | ( | const ProjectDB & | db, |
| const std::vector< VisibilityProbe > & | probes, | ||
| const OcclusionQuery & | query = {}, | ||
| const std::atomic< bool > * | cancel = nullptr ) |
Occlusion-aware visible_frames_batch(): frames that actually see each probe, not merely frames whose frustum contains it.
Per posed frame (one pass, each depth image decoded at most once and only when some anchor projects inside the frame): an anchor that passes the frustum test of query.visibility keeps the frame when the anchor or one of its samples, projected into the frame, is in front of the camera, inside the image, and within query.depth_tolerance of the stored depth (CV_16U millimetres; pixel scaled from the intrinsics' size to the depth image's). Ranking and the reported u/v/depth/centrality are the anchor's, sorted as in visible_frames().
Logs (debug) how many frames were depth-tested, had no depth, and how many frustum hits the depth test removed; warns when no frame is usable.
| cancel | when non-null, checked once per frame; raising it makes the call throw OperationCancelled within one frame's work (a server shutting down mid-computation does not wait for the whole pass). |
References visible_frames_occluded().
Referenced by visible_frames_occluded().
|
inline |
|
inline |
Definition at line 97 of file logging.hpp.
|
inlineconstexpr |
ProjectDB segmentation API convention: -1 marks background/unlabeled in the CV_32S label images returned by ProjectDB.
Definition at line 38 of file label_semantics.hpp.
Referenced by api_mat_to_storage(), api_to_point_label(), api_to_storage(), and point_label_to_api().
|
inlineconstexpr |
Definition at line 31 of file resource_keys.hpp.
|
inlineconstexpr |
Definition at line 32 of file resource_keys.hpp.
|
inlineconstexpr |
Definition at line 36 of file resource_export.hpp.
|
inlineconstexpr |
The leading resource-code column of the CSV: its header in label mode and in key mode.
Definition at line 35 of file resource_export.hpp.
|
inlineconstexpr |
Default name of the instance-label cloud sync_survey reads from, and the default SurveySyncOptions::instances_cloud.
Definition at line 39 of file survey.hpp.
|
inlineconstexpr |
The leksikon field a hand-added resource's name is stored under.
Definition at line 74 of file resources.hpp.
|
inlineconstexpr |
How many bytes from the head of a file are enough to find end_header.
An INRIA header is ~1.5 KiB (62 properties at degree 3). 64 KiB is room for an implementation with comments and then some, while bounding the read of a file that turns out not to be a PLY at all.
Definition at line 42 of file gaussian_splat.hpp.
|
inlineconstexpr |
Export-template columns (schema v21 config.columns) as members.
Matches a user column label, then any key label, then a leksikon field name; otherwise a legacy:<name> key member that never resolves (so it shows up in missing).
Definition at line 80 of file resource_templates.hpp.
|
inlineconstexpr |
semantic_class of a survey type created by hand, never matched by sync_survey.
Definition at line 36 of file survey.hpp.
|
inlineconstexpr |
Largest label that can be stored in the CV_16U PNG layer.
Storage encodes label + 1, so the maximum encodable value before wrapping 16 bits is 65535 - 1 = 65534.
Definition at line 43 of file label_semantics.hpp.
Referenced by api_mat_to_storage(), and api_to_storage().
|
inlineconstexpr |
Definition at line 56 of file resource_export.hpp.
Referenced by resource_tables().
|
inlineconstexpr |
Definition at line 51 of file resource_templates.hpp.
|
inlineconstexpr |
Definition at line 52 of file resource_templates.hpp.
|
inlineconstexpr |
Definition at line 33 of file survey.hpp.
|
inlineconstexpr |
Point-cloud convention: 0 means "unlabeled" in every CloudL (labels, planes, rooms, instances).
Valid point labels start at 1.
Definition at line 34 of file label_semantics.hpp.
Referenced by api_to_point_label(), is_valid_label(), and point_label_to_api().