Volume Cartographer 2.27.0
Public Types | Public Member Functions | Private Attributes | List of all members
volcart::segmentation::ComputeVolumetricMask Class Reference

Compute a VolumetricMask from a PointSet. More...

#include <vc/segmentation/ComputeVolumetricMask.hpp>

Inheritance diagram for volcart::segmentation::ComputeVolumetricMask:
[legend]
Collaboration diagram for volcart::segmentation::ComputeVolumetricMask:
[legend]

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

- Public Attributes inherited from volcart::IterationsProgress
Signal progressStarted
 
Signal< std::size_t > progressUpdated
 
Signal progressComplete
 

Detailed Description

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.

Member Typedef Documentation

◆ PointSet

PointSet type

Definition at line 29 of file ComputeVolumetricMask.hpp.

Member Function Documentation

◆ progressIterations()

std::size_t volcart::segmentation::ComputeVolumetricMask::progressIterations ( ) const
overridevirtual

Returns the maximum progress value.

Implements volcart::IterationsProgress.

Member Data Documentation

◆ enableClosing_

bool volcart::segmentation::ComputeVolumetricMask::enableClosing_ {true}
private

Enable closing

Definition at line 84 of file ComputeVolumetricMask.hpp.

◆ high_

std::uint16_t volcart::segmentation::ComputeVolumetricMask::high_ {65535}
private

High flood-fill threshold parameter

Definition at line 82 of file ComputeVolumetricMask.hpp.

◆ input_

PointSet volcart::segmentation::ComputeVolumetricMask::input_
private

Input points

Definition at line 76 of file ComputeVolumetricMask.hpp.

◆ kernel_

int volcart::segmentation::ComputeVolumetricMask::kernel_ {5}
private

(Square) Kernel size parameter for the closing operation

Definition at line 86 of file ComputeVolumetricMask.hpp.

◆ low_

std::uint16_t volcart::segmentation::ComputeVolumetricMask::low_ {14135}
private

Low flood-fill threshold parameter

Definition at line 80 of file ComputeVolumetricMask.hpp.

◆ mask_

VolumetricMask::Pointer volcart::segmentation::ComputeVolumetricMask::mask_
private

Mask

Definition at line 92 of file ComputeVolumetricMask.hpp.

◆ maxRadius_

std::size_t volcart::segmentation::ComputeVolumetricMask::maxRadius_ {std::numeric_limits<std::size_t>::max()}
private

Maximum layer thickness to consider for a single seed point

Definition at line 90 of file ComputeVolumetricMask.hpp.

◆ measureVertically_

bool volcart::segmentation::ComputeVolumetricMask::measureVertically_ {false}
private

Direction of thickness estimation measurement

Definition at line 88 of file ComputeVolumetricMask.hpp.

◆ vol_

Volume::Pointer volcart::segmentation::ComputeVolumetricMask::vol_
private

Input volume

Definition at line 78 of file ComputeVolumetricMask.hpp.


The documentation for this class was generated from the following file: