# OEVoxelizeMethod¶

The OEVoxelizeMethod namespace is used to instruct the OEMakeGridFromSurface function how to voxelize the surface onto the grid. A voxel is the three dimensional equivalent of a pixel.

The OEMakeGridFromSurface function for how to pass this constant into the function.

Distance

Each grid point is filled with the minimum distance squared from the surface. The distance is negative if the grid point is inside the surface.

Note

The distance is squared to avoid calling the costly square root function.

Gaussian

Same as distance, but the value placed in the grid is plotted as a Gaussian function. This means each gridpoint is set to $$e^{-0.33*d^2}$$, where $$d$$ is the minimum distance to the surface. Note, where $$d$$ can still be negative inside the surface. Therefore, the grid values have the following correlation to the volume enclosed by the surface:

Inside the Surface
Values are greater than 1.0
At the Surface
Values are 1.0
Outside the Surface
Values are less than 1.0 and greater than 0.0

Blank

Same as distance, but grid points inside the surface are set to 1.

Blur

Discern the shape of the volume enclosed by the surface. This is done by mapping a Gaussian for every grid point inside the volume. This smears out the surface boundary a bit and allowing a smooth drop off from the surface.

Default

The default voxelization method is OEVoxelizeMethod_Distance.