OpenVDB
12.0.1
|
Shape morphology of level sets. Morphing from a source narrow-band level sets to a target narrow-band level set. More...
#include <openvdb/tools/LevelSetMorph.h>
Public Types | |
using | GridType = GridT |
using | TreeType = typename GridT::TreeType |
using | TrackerT = LevelSetTracker< GridT, InterruptT > |
using | LeafRange = typename TrackerT::LeafRange |
using | LeafType = typename TrackerT::LeafType |
using | BufferType = typename TrackerT::BufferType |
using | ValueType = typename TrackerT::ValueType |
Public Member Functions | |
LevelSetMorphing (GridT &sourceGrid, const GridT &targetGrid, InterruptT *interrupt=nullptr) | |
Main constructor. More... | |
virtual | ~LevelSetMorphing () |
void | setTarget (const GridT &targetGrid) |
Redefine the target level set. More... | |
void | setAlphaMask (const GridT &maskGrid) |
Define the alpha mask. More... | |
math::BiasedGradientScheme | getSpatialScheme () const |
Return the spatial finite-difference scheme. More... | |
void | setSpatialScheme (math::BiasedGradientScheme scheme) |
Set the spatial finite-difference scheme. More... | |
math::TemporalIntegrationScheme | getTemporalScheme () const |
Return the temporal integration scheme. More... | |
void | setTemporalScheme (math::TemporalIntegrationScheme scheme) |
Set the temporal integration scheme. More... | |
math::BiasedGradientScheme | getTrackerSpatialScheme () const |
Return the spatial finite-difference scheme. More... | |
void | setTrackerSpatialScheme (math::BiasedGradientScheme scheme) |
Set the spatial finite-difference scheme. More... | |
math::TemporalIntegrationScheme | getTrackerTemporalScheme () const |
Return the temporal integration scheme. More... | |
void | setTrackerTemporalScheme (math::TemporalIntegrationScheme scheme) |
Set the temporal integration scheme. More... | |
int | getNormCount () const |
Return the number of normalizations performed per track or normalize call. More... | |
void | setNormCount (int n) |
Set the number of normalizations performed per track or normalize call. More... | |
int | getGrainSize () const |
Return the grain size used for multithreading. More... | |
void | setGrainSize (int grainsize) |
Set the grain size used for multithreading. More... | |
ValueType | minMask () const |
Return the minimum value of the mask to be used for the derivation of a smooth alpha value. More... | |
ValueType | maxMask () const |
Return the maximum value of the mask to be used for the derivation of a smooth alpha value. More... | |
void | setMaskRange (ValueType min, ValueType max) |
Define the range for the (optional) scalar mask. More... | |
bool | isMaskInverted () const |
Return true if the mask is inverted, i.e. min->max in the original mask maps to 1->0 in the inverted alpha mask. More... | |
void | invertMask (bool invert=true) |
Invert the optional mask, i.e. min->max in the original mask maps to 1->0 in the inverted alpha mask. More... | |
size_t | advect (ValueType time0, ValueType time1) |
Advect the level set from its current time, time0, to its final time, time1. If time0 > time1, perform backward advection. More... | |
Shape morphology of level sets. Morphing from a source narrow-band level sets to a target narrow-band level set.
The InterruptType
template argument below refers to any class with the following interface:
using BufferType = typename TrackerT::BufferType |
using GridType = GridT |
using LeafRange = typename TrackerT::LeafRange |
using LeafType = typename TrackerT::LeafType |
using TrackerT = LevelSetTracker<GridT, InterruptT> |
using TreeType = typename GridT::TreeType |
using ValueType = typename TrackerT::ValueType |
|
inline |
Main constructor.
|
inlinevirtual |
Advect the level set from its current time, time0, to its final time, time1. If time0 > time1, perform backward advection.
|
inline |
Return the grain size used for multithreading.
|
inline |
Return the number of normalizations performed per track or normalize call.
|
inline |
Return the spatial finite-difference scheme.
|
inline |
Return the temporal integration scheme.
|
inline |
Return the spatial finite-difference scheme.
|
inline |
Return the temporal integration scheme.
|
inline |
Invert the optional mask, i.e. min->max in the original mask maps to 1->0 in the inverted alpha mask.
|
inline |
Return true if the mask is inverted, i.e. min->max in the original mask maps to 1->0 in the inverted alpha mask.
|
inline |
Return the maximum value of the mask to be used for the derivation of a smooth alpha value.
|
inline |
Return the minimum value of the mask to be used for the derivation of a smooth alpha value.
|
inline |
Define the alpha mask.
|
inline |
Set the grain size used for multithreading.
Define the range for the (optional) scalar mask.
min | Minimum value of the range. |
max | Maximum value of the range. |
Mask values outside the range maps to alpha values of respectfully zero and one, and values inside the range maps smoothly to 0->1 (unless of course the mask is inverted).
ValueError | if min is not smaller than max. |
|
inline |
Set the number of normalizations performed per track or normalize call.
|
inline |
Set the spatial finite-difference scheme.
|
inline |
Redefine the target level set.
|
inline |
Set the temporal integration scheme.
|
inline |
Set the spatial finite-difference scheme.
|
inline |
Set the temporal integration scheme.