Filter a Voxel

Use the Voxel > Utilities > Filter a Voxel menu option (geogxnet.dll(Geosoft.GX.VoxUtils.FilterVoxel;Run)*), to apply a filter to an existing voxel and set the output to a new voxel. The filter method can be selected from a predefined list of filters, or can be defined in a filter file.

Filter a Voxel dialog options

Input voxel

Select the voxel file to filter.

Script Parameter: FILTERVOXEL.INPUT

Output voxel

Specify the name for the filtered voxel file.

Script Parameter: FILTERVOXEL.OUTPUT

Filter

Select a predefined filter to apply or provide the filter coefficients through a filter file.

Script Parameter: FILTERVOXEL.FILTER ( 0:From file, 1:Smoothing, 2: Laplace, 6: Total gradient)

File

If From file has been selected above, select the filter file to apply. A set of predefined filter files are provided with the installation. You can add customized filter files to the %USERPROFILE%\Documents\Geosoft\Desktop Applications \etc directory for your personal use.

Script Parameter: FILTERVOXEL.FILE

Number of passes

Enter the number of passes to apply in the filtering process.

Script Parameter: FILTERVOXEL.NPASSES

Dummy handling

Specify the method of handling dummy values if encountered in the input voxel.

If "Interpolate" is selected, then the voxel is pre-processed by interpolating first in the Z direction, then in the X and Y directions. The final result is then masked against the original, so that the output will not contain any cells not in the original, but the filters themselves will be able to work on fully-populated sub-cubes in the voxel. Linear interpolation is done on interior dummies, and nearest interpolation is done at the edges.

If "Dummy" is selected for the Laplace, Total gradient or file filters then all locations in the output voxel will be set to dummy for filtering operations where any of the surrounding values required by the filter are dummies. This will generally result in "losing" any values on faces and edges, so that voxel shrinks by one surface layer. If "Dummy" is selected for the Smoothing filter, then the filtering operation is applied using just the defined locations, and the weighting is adjusted according to the sum of the weights actually used, so the output voxel is defined at all input locations and no shrinking occurs.

The default setting is "Interpolate". The final result is then masked against the original, so that the output will not contain any cells not in the original, but will match the original in defined volume.

Script Parameter: FILTERVOXEL.DUMMYHANDLING (0: Dummy, 1: Interpolate)

Application Notes

*The GX tool will search in the "...\Geosoft\Desktop Applications \gx" folder. The GX.Net tools, however, are embedded in the geogxnet.dll located in the "...\Geosoft\Desktop Applications \bin" folder. If running this GX interactively, bypassing the menu, first change the folder to point to the "bin" folder, then supply the GX.Net tool in the specified format.

Coefficient File Format

The coefficients are given in a left-handed coordinate system in the increasing order of X then Y then Z, where X increases the fastest.

Coefficients are provided in the following format (see illustration)

Line 1: (0,0,0) (1,0,0) (2,0,0) (0,1,0) (1,1,0) (2,1,0) (0,2,0) (1,2,0) (2,2,0)

Line 2: (0,0,1) (1,0,1) (2,0,1) (0,1,1) (1,1,1) (2,1,1) (0,2,1) (1,2,1) (2,2,1)

Line 3: (0,0,2) (1,0,2) (2,0,2) (0,1,2) (1,1,2) (2,1,2) (0,2,2) (1,2,2) (2,2,2)

Variable Cell Sizes

Variable cell size is taken into account for the X, Y, Z and Total gradient filters. All other filters ignore variable spacing.

The filters provided with the installation are explained below:

Filters

Filter

Coefficients

Comments

Smoothing

0 0 0 0 0.085 0 0 0 0

0 0.085 0 0.085 0.49 0.085 0 0.085 0

0 0 0 0 0.085 0 0 0 0

Symmetric filter, sum=1.0

This is basically a 3D Hanning filter. Apply more times to get more smoothing.

Laplace

0 0 0 0 -0.16666667 0 0 0 0

0 -0.16666667 0 -0.16666667 1.00000002 -0.16666667 0 -0.16666667 0

0 0 0 0 -0.16666667 0 0 0 0

Symmetric filter, sum=0.0

The Laplace is a very simple and useful first-difference filter. It is particularly useful for accentuating and exposing noise, or areas of rapid change. Applying a single Laplace filter followed by two or three smoothing passes is a good way to reveal all the texture contained in a voxel.

X-gradient

0 0 0 0 0 0 0 0 0

0 0 0 -0.5 0 0.5 0 0 0

0 0 0 0 0 0 0 0 0

The output is adjusted to account for the actual voxel point separations.

Y-gradient

0 0 0 0 0 0 0 0 0

0 -0.5 0 0 0 0 0 0.5 0

0 0 0 0 0 0 0 0 0

The output is adjusted to account for the actual voxel point separations.

Z-gradient

0 0 0 0 -0.5 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0.5 0 0 0 0

The output is adjusted to account for the actual voxel point separations.

Total gradient

The vector sum of the X, Y and Z gradients.

The output is adjusted to account for the actual voxel point separations.

From file

The filter file must contain 27 coefficient values.

Typically, filter coefficients sum to 1 for conservative operations (preserving the sum of values in the original voxel), or to 0 (to apply a difference operation).