Volume Cartographer 2.27.0
|
Compute a VolumetricMask from a PointSet. More...
#include <vc/segmentation/ComputeVolumetricMask.hpp>
Public Types | |
using | PointSet = volcart::PointSet< cv::Vec3d > |
Public Member Functions | |
void | setPointSet (const PointSet &ps) |
Set the input PointSet. | |
void | setVolume (const Volume::Pointer &v) |
Set the input Volume. | |
void | setLowThreshold (std::uint16_t t) |
Set the low threshold for the bounded flood-fill operation. | |
void | setHighThreshold (std::uint16_t t) |
Set the high threshold for the bounded flood-fill operation. | |
void | setEnableClosing (bool b) |
If enabled, apply a morphological closing kernel to the mask. | |
void | setClosingKernelSize (int s) |
Set the kernel size used in the closing operation. Larger kernels close bigger gaps. | |
void | setMeasureVertical (bool b) |
Set the direction in which the thickness of the page will be measured. If this value is false, the thickness will be measured horizontally (+/- x) | |
void | setMaxRadius (std::size_t radius) |
Set the max radius that a single point can hav when measuring the width of the page. | |
VolumetricMask::Pointer | compute () |
Computes the segmentation. | |
VolumetricMask::Pointer | getMask () const |
Return the full, 3D mask. | |
std::size_t | progressIterations () const override |
Returns the maximum progress value. More... | |
virtual std::size_t | progressIterations () const =0 |
Private Attributes | |
PointSet | input_ |
Volume::Pointer | vol_ |
std::uint16_t | low_ {14135} |
std::uint16_t | high_ {65535} |
bool | enableClosing_ {true} |
int | kernel_ {5} |
bool | measureVertically_ {false} |
std::size_t | maxRadius_ {std::numeric_limits<std::size_t>::max()} |
VolumetricMask::Pointer | mask_ |
Additional Inherited Members | |
![]() | |
Signal | progressStarted |
Signal< std::size_t > | progressUpdated |
Signal | progressComplete |
Compute a VolumetricMask from a PointSet.
This class uses the flood fill algorithm from ThinnedFloodFillSegmentation to compute a per-voxel mask for a segmented layer in a volume. For each slice in the Z-range of the input PointSet, the points which intersect that slice are used as the seeds for running the flood fill algorithm.
Definition at line 25 of file ComputeVolumetricMask.hpp.
using volcart::segmentation::ComputeVolumetricMask::PointSet = volcart::PointSet<cv::Vec3d> |
PointSet type
Definition at line 29 of file ComputeVolumetricMask.hpp.
|
overridevirtual |
Returns the maximum progress value.
Implements volcart::IterationsProgress.
|
private |
Enable closing
Definition at line 84 of file ComputeVolumetricMask.hpp.
|
private |
High flood-fill threshold parameter
Definition at line 82 of file ComputeVolumetricMask.hpp.
|
private |
Input points
Definition at line 76 of file ComputeVolumetricMask.hpp.
|
private |
(Square) Kernel size parameter for the closing operation
Definition at line 86 of file ComputeVolumetricMask.hpp.
|
private |
Low flood-fill threshold parameter
Definition at line 80 of file ComputeVolumetricMask.hpp.
|
private |
Mask
Definition at line 92 of file ComputeVolumetricMask.hpp.
|
private |
Maximum layer thickness to consider for a single seed point
Definition at line 90 of file ComputeVolumetricMask.hpp.
|
private |
Direction of thickness estimation measurement
Definition at line 88 of file ComputeVolumetricMask.hpp.
|
private |
Input volume
Definition at line 78 of file ComputeVolumetricMask.hpp.