Volume Cartographer 2.27.0
Classes | Typedefs | Functions | Variables
volcart::segmentation Namespace Reference

Segmentation algorithms and utilities library More...

Classes

class  ChainSegmentationAlgorithm
 Base class for segmentation algorithms that propagate a collected chain of points. More...
 
class  ComputeVolumetricMask
 Compute a VolumetricMask from a PointSet. More...
 
class  EnergyMetrics
 A collection of energy metrics for evaluating a FittedCurve. More...
 
class  FittedCurve
 Fits a curve to a set of points for resampling. More...
 
class  ForceChain
 A simple class for tracking a list of offset vectors ("forces") More...
 
class  IntensityMap
 A class representing the intensity map generated from a row of a matrix, normalized to the range [0, 1]. More...
 
class  LocalResliceSegmentation
 Local Reslice Particle Simulation (LRPS) segmentation. More...
 
class  OpticalFlowSegmentation
 Optical Flow Segmentation. More...
 
class  Particle
 A simple particle class. More...
 
class  ParticleChain
 A simple class for keeping track of a connected chain of Particle objects. More...
 
class  RegionGrowingSegmentationAlgorithmBaseClass
 Base class for segmentation algorithms that create a segmentation by growing from a set of seed points. More...
 
class  Spline
 Simple spline wrapper around Eigen::Spline. More...
 
class  StructureTensorParticleSim
 Structure Tensor Particle Simulation (STPS) segmentation. More...
 
class  ThinnedFloodFillSegmentation
 ThinnedFloodFillSegmentation. More...
 

Typedefs

template<typename Scalar >
using CubicSpline = Spline< Scalar, 3 >
 
using Force = cv::Vec3d
 

Functions

template<typename T1 , typename T2 >
std::vector< std::pair< T1, T2 > > Zip (const std::vector< T1 > &v1, const std::vector< T2 > &v2)
 Combine two equal-sized vectors into a single vector of paired elements. More...
 
template<typename T , int Length>
std::pair< std::vector< T >, std::vector< T > > Unzip (const std::vector< cv::Vec< T, Length > > &vs)
 Separate single vector of paired elements into two vectors of single elements. More...
 
template<typename T >
std::vector< double > NormalizeVector (const std::vector< T > &v, double newMin=0, double newMax=1)
 Normalize vector elements to within the range [newMin, newMax]. More...
 
template<typename T , int Len>
std::vector< cv::Vec< double, Len > > NormalizeVector (const std::vector< cv::Vec< T, Len > > vs)
 Normalize vector of cv::Vec using cv::norm. More...
 
template<typename T >
D1Forward (const std::vector< T > &vs, int index, int hstep=1)
 Calculate the first derivative for a sampled point. More...
 
template<typename T >
D1Backward (const std::vector< T > &vs, int index, int hstep=1)
 Calculate the first derivative for a sampled point. More...
 
template<typename T >
D1Central (const std::vector< T > &vs, int index, int hstep=1)
 Calculate the first derivative for a sampled point. More...
 
template<typename T >
D1FivePointStencil (const std::vector< T > &vs, int index, int hstep=1)
 Calculate the first derivative for a sampled point using a five-point stencil. More...
 
template<typename T >
D1At (const std::vector< T > &vs, int index, int hstep=1)
 Calculate the first derivative for a sampled point. More...
 
template<typename T >
std::vector< T > D1 (const std::vector< T > &vs, int hstep=1)
 Calculate the first derivative for a vector of sampled points. More...
 
template<typename T >
D2Forward (const std::vector< T > &vs, int index, int hstep=1)
 Calculate the second derivative for a sampled point. More...
 
template<typename T >
D2Backward (const std::vector< T > &vs, int index, int hstep=1)
 Calculate the second derivative for a sampled point. More...
 
template<typename T >
D2Central (const std::vector< T > &vs, int index, int hstep=1)
 Calculate the second derivative for a sampled point. More...
 
template<typename T >
D2FivePointStencil (const std::vector< T > &vs, int index, int hstep=1)
 Calculate the second derivative for a sampled point using a five-point stencil. More...
 
template<typename T >
D2At (const std::vector< T > &vs, int index, int hstep=1)
 Calculate the second derivative for a sampled point. More...
 
template<typename T >
std::vector< T > D2 (const std::vector< T > &vs, int hstep=1)
 Calculate the second derivative for a vector of sampled points. More...
 
auto operator+ (ForceChain lhs, const ForceChain &rhs) -> ForceChain
 
auto operator* (ForceChain lhs, const double &rhs) -> ForceChain
 
auto operator* (const double &rhs, ForceChain lhs) -> ForceChain
 
Particle operator+ (Particle lhs, const cv::Vec3d &rhs)
 
Particle operator* (Particle lhs, const double &rhs)
 
auto operator+ (ParticleChain lhs, const ForceChain &rhs) -> ParticleChain
 
auto operator+ (const ForceChain &rhs, ParticleChain lhs) -> ParticleChain
 
auto operator* (ParticleChain lhs, const double &rhs) -> ParticleChain
 
auto operator* (const double &rhs, ParticleChain lhs) -> ParticleChain
 
std::vector< cv::Vec3i > GetNeighbors (const cv::Vec3i &v)
 
int EuclideanDistance (const cv::Vec3i &start, const cv::Vec3i &end)
 
std::size_t MeasureThickness (const cv::Vec3i &seed, const cv::Mat &slice, std::uint16_t low, std::uint16_t high, bool measureVert, std::size_t maxRadius)
 
template<class Container >
auto Median (Container c)
 
std::vector< cv::Vec3i > DoFloodFill (const std::vector< cv::Vec3i > &pts, int bound, cv::Mat img, std::uint16_t low, std::uint16_t high)
 
VectorMath
std::vector< double > SquareDiff (const std::vector< Voxel > &v1, const std::vector< Voxel > &v2)
 Computes the difference of Squares on two vectors. More...
 
double SumSquareDiff (const std::vector< double > &v1, const std::vector< double > &v2)
 Sums the square differences between two vectors. More...
 

Variables

static constexpr std::array< std::array< double, 9 >, 4 > D1_CENTRAL_DIFF_COEFFS
 
static constexpr std::array< std::array< double, 9 >, 4 > D2_CENTRAL_DIFF_COEFFS
 

Detailed Description

Segmentation algorithms and utilities library

Typedef Documentation

◆ Force

using volcart::segmentation::Force = typedef cv::Vec3d

Force type

Definition at line 13 of file ForceChain.hpp.

Function Documentation

◆ DoFloodFill()

std::vector< cv::Vec3i > volcart::segmentation::DoFloodFill ( const std::vector< cv::Vec3i > &  pts,
int  bound,
cv::Mat  img,
std::uint16_t  low,
std::uint16_t  high 
)

Run flood fill using the provided set of seed points

Returns the contiguous set of points which fall within the range [low, high] and which are no more than bound distance from an initial seed.

◆ EuclideanDistance()

int volcart::segmentation::EuclideanDistance ( const cv::Vec3i &  start,
const cv::Vec3i &  end 
)

Calculate the Euclidean distance between two voxels

◆ GetNeighbors()

std::vector< cv::Vec3i > volcart::segmentation::GetNeighbors ( const cv::Vec3i &  v)

Get the list of a voxel's eight neighbors

◆ MeasureThickness()

std::size_t volcart::segmentation::MeasureThickness ( const cv::Vec3i &  seed,
const cv::Mat &  slice,
std::uint16_t  low,
std::uint16_t  high,
bool  measureVert,
std::size_t  maxRadius 
)

Estimate the thickness of page from every seed point.

Projects bidirectionally from the seed until it finds voxels not in the range [low, high] or until maxRadius is reached. If measureVert is true, projects vertically from seed. Otherwise, projects horizontally.

◆ Median()

template<class Container >
auto volcart::segmentation::Median ( Container  c)

Find the median element in a container

Definition at line 39 of file FloodFill.hpp.

◆ operator*() [1/5]

auto volcart::segmentation::operator* ( const double &  rhs,
ForceChain  lhs 
) -> ForceChain

Free function operator for multiplying a ForceChain by a scalar

◆ operator*() [2/5]

auto volcart::segmentation::operator* ( const double &  rhs,
ParticleChain  lhs 
) -> ParticleChain

Free function operator for multiplying a ParticleChain by a scalar

◆ operator*() [3/5]

auto volcart::segmentation::operator* ( ForceChain  lhs,
const double &  rhs 
) -> ForceChain

Free function operator for multiplying a ForceChain by a scalar

◆ operator*() [4/5]

Particle volcart::segmentation::operator* ( Particle  lhs,
const double &  rhs 
)

Free function operator for Particle and scale factor multiplication

◆ operator*() [5/5]

auto volcart::segmentation::operator* ( ParticleChain  lhs,
const double &  rhs 
) -> ParticleChain

Free function operator for multiplying a ParticleChain by a scalar

◆ operator+() [1/4]

auto volcart::segmentation::operator+ ( const ForceChain rhs,
ParticleChain  lhs 
) -> ParticleChain

Free function operator for ParticleChain and ForceChain addition

◆ operator+() [2/4]

auto volcart::segmentation::operator+ ( ForceChain  lhs,
const ForceChain rhs 
) -> ForceChain

Free function operator for per-element ForceChain addition

◆ operator+() [3/4]

Particle volcart::segmentation::operator+ ( Particle  lhs,
const cv::Vec3d &  rhs 
)

Free function operator for Particle and vector offset addition

◆ operator+() [4/4]

auto volcart::segmentation::operator+ ( ParticleChain  lhs,
const ForceChain rhs 
) -> ParticleChain

Free function operator for ParticleChain and ForceChain addition