ReUseX  0.0.5
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/community_clustering.hpp>
13
14#include <fmt/format.h>
15
16#include <pcl/common/pca.h>
17#include <pcl/correspondence.h>
18#include <pcl/filters/filter.h>
19#include <pcl/filters/uniform_sampling.h>
20#include <pcl/io/auto_io.h>
21#include <pcl/io/pcd_io.h>
22#include <pcl/point_types.h>
23#include <pcl/search/kdtree.h>
24
25#include <atomic>
26
27namespace reusex::geometry {
29 IndicesConstPtr filter = nullptr; // Optional filter to limit processing
30
31 float grid_size = 0.5F;
32 float resolution = 1.0F;
33 float beta = 0.01F;
34 int max_iter = -1; // negative = iterate until convergence
35
36 // Optional cancellation flag. Caller retains ownership and must keep this
37 // alive for the full duration of the segment_rooms(...) call.
38 const std::atomic_bool *cancel_token = nullptr;
39};
40
42 CloudLConstPtr planes,
43 const SegmentRoomsOptions &options) -> CloudLPtr;
45 CloudLConstPtr planes,
47 -> CloudLPtr;
48
49} // namespace reusex::geometry
auto segment_rooms_impl(CloudConstPtr cloud, CloudNConstPtr normals, CloudLConstPtr planes, const SegmentRoomsOptions &options) -> CloudLPtr
auto segment_rooms(CloudConstPtr cloud, CloudNConstPtr normals, CloudLConstPtr planes, const SegmentRoomsOptions &options=SegmentRoomsOptions{}) -> CloudLPtr
pcl::IndicesConstPtr IndicesConstPtr
Definition types.hpp:24
typename CloudL::Ptr CloudLPtr
Definition types.hpp:35
typename CloudL::ConstPtr CloudLConstPtr
Definition types.hpp:36
typename Cloud::ConstPtr CloudConstPtr
Definition types.hpp:28
typename CloudN::ConstPtr CloudNConstPtr
Definition types.hpp:32
const std::atomic_bool * cancel_token