Volume Cartographer 2.27.0
RegionGrowingSegmentationAlgorithmBaseClass.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <cstddef>
6
10
12{
21{
22public:
32
34 using SeedPoints = std::vector<cv::Vec3d>;
35
38
40 enum class Status { Success, Failure, ReturnedEarly };
41
43 void setVolume(Volume::Pointer vol) { vol_ = std::move(vol); }
44
46 void setSeedPoints(SeedPoints p) { startingPoints_ = std::move(p); }
47
49 void setIterations(std::size_t i) { iterations_ = i; }
50
52 virtual PointSet compute() = 0;
53
55 Status getStatus() const { return status_; }
56
58 const PointSet& getPointSet() const { return result_; }
59
62
64 std::size_t progressIterations() const override { return iterations_; }
65
66protected:
69
76 std::size_t iterations_{0};
78 Status status_{Status::Success};
79};
80} // namespace volcart::segmentation
std::shared_ptr< Volume > Pointer
Definition: Volume.hpp:42
Base class for segmentation algorithms that create a segmentation by growing from a set of seed point...
virtual PointSet compute()=0
Compute the segmentation.
std::size_t progressIterations() const override
Returns the maximum progress value.
Segmentation algorithms and utilities library
Mixin type for classes which report their progress.
Definition: Mixins.hpp:13