ReUseX  0.0.1
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
segment_rooms.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#include "reusex/core/logging.hpp"
7#include "reusex/core/processing_observer.hpp"
8#include "reusex/io/reusex.hpp"
9#include "reusex/types.hpp"
10#include "reusex/utils/fmt_formatter.hpp"
11
12#include <pcl/markov_clustering.hpp>
13
14// GraphBLAS imports complex.h which defines a macro named 'I' that conflicts
15// with the type in CLI11
16#ifdef I
17#undef I
18#endif
19
20#include <fmt/format.h>
21
22#include <pcl/common/pca.h>
23#include <pcl/correspondence.h>
24#include <pcl/filters/filter.h>
25#include <pcl/filters/uniform_sampling.h>
26#include <pcl/io/auto_io.h>
27#include <pcl/io/pcd_io.h>
28#include <pcl/point_types.h>
29#include <pcl/search/kdtree.h>
30
31#include <atomic>
32
33namespace ReUseX::geometry {
38
39 float grid_size = 0.5F;
40 float inflation = 2.0F;
41 int expansion = 2;
42 float pruning_threshold = 0.0001F;
43 float convergence_threshold = 1e-8F;
44 int max_iter = 100;
45
46 // Optional cancellation flag. Caller retains ownership and must keep this
47 // alive for the full duration of the segment_rooms(...) call.
48 const std::atomic_bool *cancel_token = nullptr;
49};
50
53
54} // namespace ReUseX::geometry
auto segment_rooms_impl(const SegmentRoomsRequest &request) -> CloudLPtr
auto segment_rooms(const SegmentRoomsRequest &request) -> CloudLPtr
typename CloudL::ConstPtr CloudLConstPtr
Definition types.hpp:34
typename CloudN::ConstPtr CloudNConstPtr
Definition types.hpp:30
typename CloudL::Ptr CloudLPtr
Definition types.hpp:33
typename Cloud::ConstPtr CloudConstPtr
Definition types.hpp:26
const std::atomic_bool * cancel_token