MeVisLab Scripting Reference
MLOpenVDBGridWrapper Class Reference

Inherits QObject.

Public Slots

MLOpenVDBGridWrapperdeepCopy ()
 
QVariant getValueRange () const
 
bool hasIsoValue (double isoValue=0.0) const
 
QVariantList origin () const
 
double resolution () const
 
MLWEMWrappertoWEM (double adaptivity=0.0, double isoValue=0.0)
 
Constructive solid geometry operations. <br>
void csgDifference (MLOpenVDBGridWrapper *other)
 
void csgIntersection (MLOpenVDBGridWrapper *other)
 
void csgUnion (MLOpenVDBGridWrapper *other)
 
Filter operations.
void applyGaussian (double width=1)
 
void applyLaplacian ()
 
void applyMean (double width=1)
 
void applyMeanCurvature ()
 
void applyMedian (double width=1)
 
void applyOffset (double offset)
 
void add (double value)
 

Friends

class MLOpenVDBToolsWrapper
 

Detailed Description

A class that wraps an OpenVDB grid (and some auxillary data).

Member Function Documentation

◆ add

void MLOpenVDBGridWrapper::add ( double  value)
slot

Adds a value to all voxels.

For dilate/erode operations, this is faster than applyOffset(), but somewhat less exact (but equal to selecting another isoValue in toWEM() ).

◆ applyGaussian

void MLOpenVDBGridWrapper::applyGaussian ( double  width = 1)
slot

Applies a Gaussian filter.

◆ applyLaplacian

void MLOpenVDBGridWrapper::applyLaplacian ( )
slot

Applies a Laplacian filter.

◆ applyMean

void MLOpenVDBGridWrapper::applyMean ( double  width = 1)
slot

Applies a mean filter.

◆ applyMeanCurvature

void MLOpenVDBGridWrapper::applyMeanCurvature ( )
slot

Applies a mean curvature filter.

◆ applyMedian

void MLOpenVDBGridWrapper::applyMedian ( double  width = 1)
slot

Applies a median filter.

◆ applyOffset

void MLOpenVDBGridWrapper::applyOffset ( double  offset)
slot

Applies an offset filter with the given offset value.

◆ csgDifference

void MLOpenVDBGridWrapper::csgDifference ( MLOpenVDBGridWrapper other)
slot

Subtracts other from this grid.

◆ csgIntersection

void MLOpenVDBGridWrapper::csgIntersection ( MLOpenVDBGridWrapper other)
slot

Intersects other with this grid.

◆ csgUnion

void MLOpenVDBGridWrapper::csgUnion ( MLOpenVDBGridWrapper other)
slot

Creates the union of other with this grid.

◆ deepCopy

MLOpenVDBGridWrapper* MLOpenVDBGridWrapper::deepCopy ( )
inlineslot

Create a deep copy of this grid.

◆ getValueRange

QVariant MLOpenVDBGridWrapper::getValueRange ( ) const
slot

Returns the value range of grid as a pair (minimum, maximum) or None if the grid is empty.

◆ hasIsoValue

bool MLOpenVDBGridWrapper::hasIsoValue ( double  isoValue = 0.0) const
slot

Returns true if the given isoValue is in the value range of the grid.

Useful if you only want to know if the result of a CSG intersection operation is empty, without needing the resulting surface object.

◆ origin

QVariantList MLOpenVDBGridWrapper::origin ( ) const
slot

Returns the origin of the grid.

◆ resolution

double MLOpenVDBGridWrapper::resolution ( ) const
inlineslot

Returns the resolution of the grid.

◆ toWEM

MLWEMWrapper* MLOpenVDBGridWrapper::toWEM ( double  adaptivity = 0.0,
double  isoValue = 0.0 
)
slot

Creates a WEM surface from the level-set.

Parameters
adaptivityDetermines how much triangles are reduced.
isoValueThe level-set value at which to create the surface.
Note
If you use an isoValue different from zero, check whether the grid was created with an appropriate bandwidth in MLOpenVDBToolsWrapper::createGrid or MLOpenVDBToolsWrapper::createCompatibleGrid. For positive values, the exteriorBandwidth should be at least this value. For negative values, the interiorBandwidth should be at least this value negated.
PVLs from the original WEM are currently silently dropped.