Volume Cartographer 2.27.0
|
Fits a curve to a set of points for resampling. More...
#include <vc/segmentation/lrps/FittedCurve.hpp>
Public Member Functions | |
std::size_t | size () const |
Return the current number of resampled points in the spline. More... | |
const std::vector< Voxel > & | points () const |
Return the current list of resampled points. More... | |
const decltype(spline_) & | spline () const |
Return the spline created from the input points. More... | |
Pixel | eval (double t) const |
Resample the curve at a given t-value in [0.0, 1.0]. More... | |
std::vector< Voxel > | evenlySpacePoints () |
Evenly resample the curve with the same number of points as the input set. More... | |
std::vector< Voxel > | resample (double resamplePerc=1.0) |
Resample the curve at a t-interval of resamplePerc. More... | |
std::vector< Voxel > | sample (std::size_t numPoints) const |
Resample the curve to have numPoints of evenly spaced points. | |
Voxel | operator() (int index) const |
Returns the voxel located at index. | |
std::vector< double > | curvature (int hstep=1) const |
Calculate the local curvature along the spline. More... | |
double | arclength () const |
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_ |
CubicSpline< double > | spline_ |
Fits a curve to a set of points for resampling.
Definition at line 19 of file FittedCurve.hpp.
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.
vs | List of 2D points to fit |
zIndex | Current location in curve |
std::vector< double > volcart::segmentation::FittedCurve::curvature | ( | int | hstep = 1 | ) | const |
Calculate the local curvature along the spline.
hstep | How much to move by each time you move Default: 1 point |
|
inline |
Resample the curve at a given t-value in [0.0, 1.0].
Definition at line 59 of file FittedCurve.hpp.
|
inline |
Evenly resample the curve with the same number of points as the input set.
Definition at line 63 of file FittedCurve.hpp.
|
inline |
Return the current list of resampled points.
Definition at line 53 of file FittedCurve.hpp.
std::vector< Voxel > volcart::segmentation::FittedCurve::resample | ( | double | resamplePerc = 1.0 | ) |
Resample the curve at a t-interval of resamplePerc.
resamplePerc | Sampling interval, in percent of original number of points |
|
inline |
Return the current number of resampled points in the spline.
Definition at line 50 of file FittedCurve.hpp.
|
inline |
Return the spline created from the input points.
Definition at line 56 of file FittedCurve.hpp.
|
private |
Number of points in the curve
Definition at line 23 of file FittedCurve.hpp.
|
private |
List of sampled points
Definition at line 29 of file FittedCurve.hpp.
|
private |
Spline representation of curve
Definition at line 31 of file FittedCurve.hpp.
|
private |
Parameterized nodes
Definition at line 27 of file FittedCurve.hpp.
|
private |
z-position of the curve
Definition at line 25 of file FittedCurve.hpp.