Volume Cartographer 2.27.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
volcart::segmentation::ChainSegmentationAlgorithm Class Referenceabstract

Base class for segmentation algorithms that propagate a collected chain of points. More...

#include <vc/segmentation/ChainSegmentationAlgorithm.hpp>

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

Public Types

enum class  Status { Success , Failure , ReturnedEarly }
 
using Pointer = std::shared_ptr< ChainSegmentationAlgorithm >
 
using Chain = std::vector< cv::Vec3d >
 
using PointSet = volcart::OrderedPointSet< cv::Vec3d >
 
using Bounds = volcart::BoundingBox< double, 3 >
 

Public Member Functions

virtual ~ChainSegmentationAlgorithm ()=default
 
auto progressIterations () const -> std::size_t override
 Returns the maximum progress value. More...
 
void setVolume (Volume::Pointer vol)
 Set the input Volume. More...
 
void setBounds (Bounds b)
 Set the bounding box for computation. More...
 
void setChain (Chain c)
 Set the input chain of seed points. More...
 
void setNumberOfSteps (std::size_t n)
 Set the number of propagation steps. More...
 
void setStepSize (double s)
 Set the propagation step size. More...
 
virtual auto compute () -> PointSet=0
 Compute the segmentation. More...
 
auto getStatus () const -> Status
 Get the status of the previous computation. More...
 
auto getPointSet () const -> const PointSet &
 Get the segmented pointset. More...
 
auto getPointSet () -> PointSet &
 Get the segmented pointset. More...
 
virtual std::size_t progressIterations () const =0
 

Protected Member Functions

 ChainSegmentationAlgorithm ()=default
 

Protected Attributes

Volume::Pointer vol_
 
Chain startingChain_
 
Bounds bb_
 
std::size_t numSteps_ {0}
 
double stepSize_ {1.0}
 
PointSet result_
 
Status status_ {Status::Success}
 

Additional Inherited Members

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

Detailed Description

Base class for segmentation algorithms that propagate a collected chain of points.

Author
Seth Parker

Definition at line 20 of file ChainSegmentationAlgorithm.hpp.

Member Typedef Documentation

◆ Bounds

Bounding Box type

Definition at line 34 of file ChainSegmentationAlgorithm.hpp.

◆ Chain

Chain type

Definition at line 30 of file ChainSegmentationAlgorithm.hpp.

◆ Pointer

Shared pointer type

Definition at line 24 of file ChainSegmentationAlgorithm.hpp.

◆ PointSet

PointSet type

Definition at line 32 of file ChainSegmentationAlgorithm.hpp.

Member Enumeration Documentation

◆ Status

Computation result status

Definition at line 36 of file ChainSegmentationAlgorithm.hpp.

Constructor & Destructor Documentation

◆ ~ChainSegmentationAlgorithm()

virtual volcart::segmentation::ChainSegmentationAlgorithm::~ChainSegmentationAlgorithm ( )
virtualdefault

Default destructor for virtual base class

◆ ChainSegmentationAlgorithm()

volcart::segmentation::ChainSegmentationAlgorithm::ChainSegmentationAlgorithm ( )
protecteddefault

Default constructor

Member Function Documentation

◆ compute()

virtual auto volcart::segmentation::ChainSegmentationAlgorithm::compute ( ) -> PointSet
pure virtual

◆ getPointSet() [1/2]

auto volcart::segmentation::ChainSegmentationAlgorithm::getPointSet ( ) -> PointSet&
inline

Get the segmented pointset.

Definition at line 90 of file ChainSegmentationAlgorithm.hpp.

◆ getPointSet() [2/2]

auto volcart::segmentation::ChainSegmentationAlgorithm::getPointSet ( ) const -> const PointSet&
inline

Get the segmented pointset.

Definition at line 84 of file ChainSegmentationAlgorithm.hpp.

◆ getStatus()

auto volcart::segmentation::ChainSegmentationAlgorithm::getStatus ( ) const -> Status
inline

Get the status of the previous computation.

Definition at line 79 of file ChainSegmentationAlgorithm.hpp.

◆ progressIterations()

auto volcart::segmentation::ChainSegmentationAlgorithm::progressIterations ( ) const -> std::size_t
inlineoverridevirtual

◆ setBounds()

void volcart::segmentation::ChainSegmentationAlgorithm::setBounds ( Bounds  b)
inline

Set the bounding box for computation.

Used by an derived algorithm to determine a out-of-bounds stop condition for computation.

Definition at line 52 of file ChainSegmentationAlgorithm.hpp.

◆ setChain()

void volcart::segmentation::ChainSegmentationAlgorithm::setChain ( Chain  c)
inline

Set the input chain of seed points.

Definition at line 55 of file ChainSegmentationAlgorithm.hpp.

◆ setNumberOfSteps()

void volcart::segmentation::ChainSegmentationAlgorithm::setNumberOfSteps ( std::size_t  n)
inline

Set the number of propagation steps.

Typically, the expected number of output iterations. Derived algorithms may produce intermediate iterations that are not included in the output.

Definition at line 64 of file ChainSegmentationAlgorithm.hpp.

◆ setStepSize()

void volcart::segmentation::ChainSegmentationAlgorithm::setStepSize ( double  s)
inline

Set the propagation step size.

Typically the expected unit distance between each output iteration in voxel units.

Definition at line 71 of file ChainSegmentationAlgorithm.hpp.

◆ setVolume()

void volcart::segmentation::ChainSegmentationAlgorithm::setVolume ( Volume::Pointer  vol)
inline

Set the input Volume.

Definition at line 40 of file ChainSegmentationAlgorithm.hpp.

Member Data Documentation

◆ bb_

Bounds volcart::segmentation::ChainSegmentationAlgorithm::bb_
protected

Bounding box

Definition at line 107 of file ChainSegmentationAlgorithm.hpp.

◆ numSteps_

std::size_t volcart::segmentation::ChainSegmentationAlgorithm::numSteps_ {0}
protected

Number of propagation steps

Definition at line 109 of file ChainSegmentationAlgorithm.hpp.

◆ result_

PointSet volcart::segmentation::ChainSegmentationAlgorithm::result_
protected

Result

Definition at line 113 of file ChainSegmentationAlgorithm.hpp.

◆ startingChain_

Chain volcart::segmentation::ChainSegmentationAlgorithm::startingChain_
protected

Seed chain

Definition at line 105 of file ChainSegmentationAlgorithm.hpp.

◆ status_

Status volcart::segmentation::ChainSegmentationAlgorithm::status_ {Status::Success}
protected

Computation status

Definition at line 115 of file ChainSegmentationAlgorithm.hpp.

◆ stepSize_

double volcart::segmentation::ChainSegmentationAlgorithm::stepSize_ {1.0}
protected

Propagation step size

Definition at line 111 of file ChainSegmentationAlgorithm.hpp.

◆ vol_

Volume::Pointer volcart::segmentation::ChainSegmentationAlgorithm::vol_
protected

Volume

Definition at line 103 of file ChainSegmentationAlgorithm.hpp.


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