ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
sync_downsample.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2025 Povl Filip Sonne-Frederiksen
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#pragma once
6
7#include "reusex/core/ProjectDB.hpp"
8
9#include <string>
10#include <vector>
11
12namespace reusex::geometry {
13
24 float leaf_size = 0.0f;
25
27 std::string primary_output;
28
32 bool only_primary = false;
33
37 bool force_desync = false;
38};
39
43 size_t output_points = 0;
44
47 std::vector<std::string> written_clouds;
48
51 std::vector<std::string> desynced_clouds;
52};
53
79SyncDownsampleResult sync_downsample(ProjectDB &db, const std::string &primary,
80 const SyncDownsampleOptions &opts);
81
82} // namespace reusex::geometry
SyncDownsampleResult sync_downsample(ProjectDB &db, const std::string &primary, const SyncDownsampleOptions &opts)
Downsample primary and — unless only_primary is set — all of its index-aligned sibling clouds in db,...
Options controlling a synchronized project-cloud downsample.
float leaf_size
Voxel leaf size in meters. Must be positive.
bool only_primary
When true, only the primary cloud is downsampled.
bool force_desync
Required alongside only_primary to actually perform a desynchronizing downsample.
std::string primary_output
Output name for the primary cloud. Empty means overwrite primary.
Outcome of a synchronized downsample, for logging / reporting.
size_t output_points
Number of output points in the downsampled primary cloud.
std::vector< std::string > desynced_clouds
Names of sibling clouds that were intentionally left untouched because only_primary/force_desync was ...
std::vector< std::string > written_clouds
Names of every cloud written (primary first, then siblings).