38 using Pointer = std::shared_ptr<LocalResliceSegmentation>;
47 template <
typename... Args>
50 return std::make_shared<LocalResliceSegmentation>(
51 std::forward<Args>(args)...);
138 int particleIndex = -1,
139 bool showSpline = false) const -> cv::Mat;
Base class for segmentation algorithms that propagate a collected chain of points.
std::shared_ptr< ChainSegmentationAlgorithm > Pointer
Fits a curve to a set of points for resampling.
Local Reslice Particle Simulation (LRPS) segmentation.
void setConsiderPrevious(bool b)
Set whether to consider previous position as candidate position.
void setMaterialThickness(double m)
Set the estimated thickness of the substrate (in um)
auto draw_particle_on_slice_(const FittedCurve &curve, int sliceIndex, int particleIndex=-1, bool showSpline=false) const -> cv::Mat
Debug: Draw curve on slice image.
void setTargetZIndex(int z)
Set the target z-index.
void setOptimizationIterations(int n)
Set the number of curve optimization iterations per step.
void setDistanceWeightFactor(int f)
Set the distance weight factor for candidate positions.
void setDelta(double d)
Set the weight for the Arc Length metric.
static auto New(Args... args) -> Pointer
void setBeta(double b)
Set the weight for the Absolute Curvature Sum metric.
void setResliceSize(int s)
Set the reslice window size.
auto estimate_normal_at_index_(const FittedCurve ¤tCurve, int index) -> cv::Vec3d
Estimate the normal to the curve at point index.
LocalResliceSegmentation()=default
Default constructor.
void setVisualize(bool b)
auto create_final_pointset_(const std::vector< std::vector< Voxel > > &points) -> PointSet
Convert the internal storage array into a final PointSet.
void setK1(double k)
Set the stretch weight factor.
static constexpr double DEFAULT_MIN_ENERGY_GRADIENT
auto compute() -> PointSet override
Compute the segmentation.
void setAlpha(double a)
Set the weight for the Active Contour metric.
double materialThickness_
~LocalResliceSegmentation() override=default
void setK2(double k)
Set the curvature weight factor.
auto progressIterations() const -> std::size_t override
Returns the maximum progress value.
Segmentation algorithms and utilities library