Volume Cartographer 2.27.0
ThinnedFloodFillSegmentation.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <cstddef>
6#include <cstdint>
7#include <limits>
8
12
14{
42{
43public:
45
50
54 ~ThinnedFloodFillSegmentation() override = default;
59 const ThinnedFloodFillSegmentation&) = default;
64 default;
65
67 void setFFLowThreshold(std::uint16_t t);
68
70 void setFFHighThreshold(std::uint16_t t);
71
77
83
89 void setMeasureVertical(bool b);
90
92 void setSpurLengthThreshold(int length);
93
98 void setMaxRadius(std::size_t radius);
99
101 PointSet compute() override;
102
105
113 void setDumpVis(bool b);
114
115private:
117 std::uint16_t low_{14135};
119 std::uint16_t high_{65535};
121 float dtt_{0};
123 int kernel_{5};
125 bool dumpVis_{false};
127 std::size_t spurLength_{6};
134 std::size_t maxRadius_{std::numeric_limits<std::size_t>::max()};
137};
138} // namespace volcart::segmentation
Basic signal class for implementing event callbacks.
Definition: Signals.hpp:38
Base class for segmentation algorithms that create a segmentation by growing from a set of seed point...
void setSpurLengthThreshold(int length)
Set the max length of spurs that can be pruned.
void setClosingKernelSize(int s)
Set the kernel size used in the closing operation. Larger kernels close bigger gaps.
ThinnedFloodFillSegmentation(const ThinnedFloodFillSegmentation &)=default
void setDistanceTransformThreshold(float t)
Set the threshold for the distance transform pre-processing operation.
void setDumpVis(bool b)
Debug: Dumps visualizations of the mask and skeleton for each slice to disk.
void setMeasureVertical(bool b)
Set the direction in which the thickness of the page will be measured. If this value is false,...
void setFFHighThreshold(std::uint16_t t)
Set the high threshold for the bounded flood-fill operation.
ThinnedFloodFillSegmentation & operator=(const ThinnedFloodFillSegmentation &)=default
ThinnedFloodFillSegmentation(ThinnedFloodFillSegmentation &&)=default
ThinnedFloodFillSegmentation()=default
Default constructor.
PointSet compute() override
Computes the segmentation.
VoxelMask getMask() const
Return the full, 3D mask.
void setFFLowThreshold(std::uint16_t t)
Set the low threshold for the bounded flood-fill operation.
void setMaxRadius(std::size_t radius)
Set the max radius that a single point can hav when measuring the width of the page.
ThinnedFloodFillSegmentation & operator=(ThinnedFloodFillSegmentation &&)=default
Segmentation algorithms and utilities library