|
Volume Cartographer 2.28.0
|
Fits a curve to a set of points for resampling. More...
#include <vc/segmentation/lrps/FittedCurve.hpp>
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_ |
Fits a curve to a set of points for resampling.
Definition at line 18 of file FittedCurve.hpp.
Spline type
Definition at line 22 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 |
| auto volcart::segmentation::FittedCurve::curvature | ( | int | hstep = 1 | ) | const -> std::vector< double > |
Calculate the local curvature along the spline.
| hstep | How much to move by each time you move Default: 1 point |
| auto volcart::segmentation::FittedCurve::resample | ( | double | resamplePerc = 1.0 | ) | -> std::vector< Voxel > |
Resamples the curve at a t-interval of resamplePerc.
| resamplePerc | Sampling interval, in percent of original number of points |
|
private |
Number of points in the curve
Definition at line 82 of file FittedCurve.hpp.
|
private |
List of sampled points
Definition at line 88 of file FittedCurve.hpp.
|
private |
Spline representation of curve
Definition at line 90 of file FittedCurve.hpp.
|
private |
Parameterized nodes
Definition at line 86 of file FittedCurve.hpp.
|
private |
z-position of the curve
Definition at line 84 of file FittedCurve.hpp.