MeVisLab Scripting Reference
MLOpenVDBGridWrapper Class Reference

#include <mlOpenVDBGridWrapper.h>

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 which wraps an OpenVDB grid (and some auxillary data).

Member Function Documentation

◆ add

void MLOpenVDBGridWrapper::add ( double value)
slot

Simply add 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

Apply gaussian filter.

◆ applyLaplacian

void MLOpenVDBGridWrapper::applyLaplacian ( )
slot

Apply laplacian filter.

◆ applyMean

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

Apply mean filter.

◆ applyMeanCurvature

void MLOpenVDBGridWrapper::applyMeanCurvature ( )
slot

Apply mean curvature filter.

◆ applyMedian

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

Apply median filter.

◆ applyOffset

void MLOpenVDBGridWrapper::applyOffset ( double offset)
slot

Apply offset filter with the given offset value.

◆ csgDifference

void MLOpenVDBGridWrapper::csgDifference ( MLOpenVDBGridWrapper * other)
slot

Subtract other from this grid.

◆ csgIntersection

void MLOpenVDBGridWrapper::csgIntersection ( MLOpenVDBGridWrapper * other)
slot

Intersection other with this grid.

◆ csgUnion

void MLOpenVDBGridWrapper::csgUnion ( MLOpenVDBGridWrapper * other)
slot

Create union of other with this grid.

◆ deepCopy

MLOpenVDBGridWrapper * MLOpenVDBGridWrapper::deepCopy ( )
inlineslot

Create a deep copy of this grid.

◆ getValueRange

QVariant MLOpenVDBGridWrapper::getValueRange ( ) const
slot

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

◆ hasIsoValue

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

Return 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

Return origin of the grid.

◆ resolution

double MLOpenVDBGridWrapper::resolution ( ) const
inlineslot

Return resolution of the grid.

◆ toWEM

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

Create 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 that 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.