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

Fits a curve to a set of points for resampling. More...

#include <vc/segmentation/lrps/FittedCurve.hpp>

Collaboration diagram for volcart::segmentation::FittedCurve:
[legend]

Public Types

using Spline = CubicSpline
 

Public Member Functions

auto size () const -> std::size_t
 Return the current number of resampled points in the spline.
 
auto points () const -> const std::vector< Voxel > &
 Return the current list of resampled points.
 
auto spline () const -> const Spline &
 Return the spline created from the input points.
 
auto eval (double t) const -> Pixel
 Resample the curve at a given t-value in [0.0, 1.0].
 
auto evenlySpacePoints () -> std::vector< Voxel >
 Evenly resample the curve with the same number of points as the input set.
 
auto resample (double resamplePerc=1.0) -> std::vector< Voxel >
 Resamples the curve at a t-interval of resamplePerc. More...
 
auto sample (std::size_t numPoints) const -> std::vector< Voxel >
 Sample the curve into numPoints of evenly spaced points.
 
auto operator() (int index) const -> Voxel
 Returns the voxel located at index.
 
auto curvature (int hstep=1) const -> std::vector< double >
 Calculate the local curvature along the spline. More...
 
auto arclength () const -> double
 Calculate the arc length of the curve

 
Constructors
 FittedCurve ()=default
 
 FittedCurve (const std::vector< Voxel > &vs, int zIndex)
 Construct curve from set of points and z-Index. More...
 

Private Attributes

std::size_t npoints_ {0}
 
int zIndex_ {0}
 
std::vector< double > ts_
 
std::vector< Voxel > points_
 
Spline spline_
 

Detailed Description

Fits a curve to a set of points for resampling.

Definition at line 18 of file FittedCurve.hpp.

Member Typedef Documentation

◆ Spline

Spline type

Definition at line 22 of file FittedCurve.hpp.

Constructor & Destructor Documentation

◆ FittedCurve()

volcart::segmentation::FittedCurve::FittedCurve ( const std::vector< Voxel > &  vs,
int  zIndex 
)

Construct curve from set of points and z-Index.

All points in generated curve are assumed to be at z = zIndex.

Parameters
vsList of 2D points to fit
zIndexCurrent location in curve

Member Function Documentation

◆ curvature()

auto volcart::segmentation::FittedCurve::curvature ( int  hstep = 1) const -> std::vector< double >

Calculate the local curvature along the spline.

Parameters
hstepHow much to move by each time you move Default: 1 point

◆ resample()

auto volcart::segmentation::FittedCurve::resample ( double  resamplePerc = 1.0) -> std::vector< Voxel >

Resamples the curve at a t-interval of resamplePerc.

Parameters
resamplePercSampling interval, in percent of original number of points
Returns
List of newly resampled points on the curve

Member Data Documentation

◆ npoints_

std::size_t volcart::segmentation::FittedCurve::npoints_ {0}
private

Number of points in the curve

Definition at line 82 of file FittedCurve.hpp.

◆ points_

std::vector<Voxel> volcart::segmentation::FittedCurve::points_
private

List of sampled points

Definition at line 88 of file FittedCurve.hpp.

◆ spline_

Spline volcart::segmentation::FittedCurve::spline_
private

Spline representation of curve

Definition at line 90 of file FittedCurve.hpp.

◆ ts_

std::vector<double> volcart::segmentation::FittedCurve::ts_
private

Parameterized nodes

Definition at line 86 of file FittedCurve.hpp.

◆ zIndex_

int volcart::segmentation::FittedCurve::zIndex_ {0}
private

z-position of the curve

Definition at line 84 of file FittedCurve.hpp.


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