Defined the six functions {fog,sdf}To{Sdf,Ext,SdfAndExt} in addition to the two functions maskSdf and dilateSdf. Sdf denotes a signed-distance field (i.e. negative values are inside), fog is a scalar fog volume (i.e. higher values are inside), and Ext is a field (of arbitrary type) that is extended off the iso-surface. All these functions are implemented with the methods in the class named FastSweeping.
More...
|
| template<typename GridT> |
| GridT::Ptr | fogToSdf (const GridT &fogGrid, typename GridT::ValueType isoValue, int nIter=1) |
| | Converts a scalar fog volume into a signed distance function. Active input voxels with scalar values above the given isoValue will have NEGATIVE distance values on output, i.e. they are assumed to be INSIDE the iso-surface.
|
| template<typename GridT> |
| GridT::Ptr | sdfToSdf (const GridT &sdfGrid, typename GridT::ValueType isoValue=0, int nIter=1) |
| | Given an existing approximate SDF it solves the Eikonal equation for all its active voxels. Active input voxels with a signed distance value above the given isoValue will have POSITIVE distance values on output, i.e. they are assumed to be OUTSIDE the iso-surface.
|
| template<typename FogGridT, typename ExtOpT, typename ExtValueT> |
| FogGridT::template ValueConverter< ExtValueT >::Type::Ptr | fogToExt (const FogGridT &fogGrid, const ExtOpT &op, const ExtValueT &background, typename FogGridT::ValueType isoValue, int nIter=1, FastSweepingDomain mode=FastSweepingDomain::SWEEP_ALL, const typename FogGridT::template ValueConverter< ExtValueT >::Type::ConstPtr extGrid=nullptr) |
| | Computes the extension of a field (scalar, vector, or int are supported), defined by the specified functor, off an iso-surface from an input FOG volume.
|
| template<typename SdfGridT, typename ExtOpT, typename ExtValueT> |
| SdfGridT::template ValueConverter< ExtValueT >::Type::Ptr | sdfToExt (const SdfGridT &sdfGrid, const ExtOpT &op, const ExtValueT &background, typename SdfGridT::ValueType isoValue=0, int nIter=1, FastSweepingDomain mode=FastSweepingDomain::SWEEP_ALL, const typename SdfGridT::template ValueConverter< ExtValueT >::Type::ConstPtr extGrid=nullptr) |
| | Computes the extension of a field (scalar, vector, or int are supported), defined by the specified functor, off an iso-surface from an input SDF volume.
|
| template<typename FogGridT, typename ExtOpT, typename ExtValueT> |
| std::pair< typename FogGridT::Ptr, typename FogGridT::template ValueConverter< ExtValueT >::Type::Ptr > | fogToSdfAndExt (const FogGridT &fogGrid, const ExtOpT &op, const ExtValueT &background, typename FogGridT::ValueType isoValue, int nIter=1, FastSweepingDomain mode=FastSweepingDomain::SWEEP_ALL, const typename FogGridT::template ValueConverter< ExtValueT >::Type::ConstPtr extGrid=nullptr) |
| | Computes the signed distance field and the extension of a field (scalar, vector, or int are supported), defined by the specified functor, off an iso-surface from an input FOG volume.
|
| template<typename SdfGridT, typename ExtOpT, typename ExtValueT> |
| std::pair< typename SdfGridT::Ptr, typename SdfGridT::template ValueConverter< ExtValueT >::Type::Ptr > | sdfToSdfAndExt (const SdfGridT &sdfGrid, const ExtOpT &op, const ExtValueT &background, typename SdfGridT::ValueType isoValue=0, int nIter=1, FastSweepingDomain mode=FastSweepingDomain::SWEEP_ALL, const typename SdfGridT::template ValueConverter< ExtValueT >::Type::ConstPtr extGrid=nullptr) |
| | Computes the signed distance field and the extension of a field (scalar, vector, or int are supported), defined by the specified functor, off an iso-surface from an input SDF volume.
|
| template<typename GridT> |
| GridT::Ptr | dilateSdf (const GridT &sdfGrid, int dilation, NearestNeighbors nn=NN_FACE, int nIter=1, FastSweepingDomain mode=FastSweepingDomain::SWEEP_ALL) |
| | Dilates the narrow band of an existing signed distance field by a specified number of voxels (like adding "onion-rings").
|
| template<typename GridT, typename MaskTreeT> |
| GridT::Ptr | maskSdf (const GridT &sdfGrid, const Grid< MaskTreeT > &mask, bool ignoreActiveTiles=false, int nIter=1) |
| | Fills mask by extending an existing signed distance field into the active values of this input ree of arbitrary value type.
|
| template<typename SdfGridT, typename OpT, typename ExtValueT> |
| SdfGridT::template ValueConverter< ExtValueT >::Type::Ptr | sdfToExt (const SdfGridT &sdfGrid, const OpT &op, const ExtValueT &background, typename SdfGridT::ValueType isoValue, int nIter, FastSweepingDomain mode, const typename SdfGridT::template ValueConverter< ExtValueT >::Type::ConstPtr extGrid) |
Defined the six functions {fog,sdf}To{Sdf,Ext,SdfAndExt} in addition to the two functions maskSdf and dilateSdf. Sdf denotes a signed-distance field (i.e. negative values are inside), fog is a scalar fog volume (i.e. higher values are inside), and Ext is a field (of arbitrary type) that is extended off the iso-surface. All these functions are implemented with the methods in the class named FastSweeping.
- Author
- Ken Museth
- Note
- Solves the (simplified) Eikonal Eq:
and performs velocity extension,
, both by means of the fast sweeping algorithm detailed in: "A Fast Sweeping Method For Eikonal Equations" by H. Zhao, Mathematics of Computation, Vol 74(230), pp 603-627, 2004
The algorithm used below for parallel fast sweeping was first published in: "New Algorithm for Sparse and Parallel Fast Sweeping: Efficient
Computation of Sparse Distance Fields" by K. Museth, ACM SIGGRAPH Talk, 2017, http://www.museth.org/Ken/Publications_files/Museth_SIG17.pdf