.. oe:namespace:: OESpicoli


.. oe:constnamespace:: OEVoxelizeMethod

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

   .. seealso:: 

      * The :oe:func:`OESpicoli::OEMakeGridFromSurface` function for how to
        pass this constant into the function. 

   .. oe:constant:: 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.

   .. oe:constant:: Gaussian
   
      Same as distance, but the value placed in the grid is plotted as
      a Gaussian function. This means each gridpoint is set to
      :math:`e^{-0.33*d^2}`, where :math:`d` is the minimum distance
      to the surface. Note, where :math:`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

   .. oe:constant:: Blank
   
      Same as distance, but grid points inside the surface are set to 1.

   .. oe:constant:: 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.

   .. oe:constant:: Default
   
      The default voxelization method is
      :oe:const:`OESpicoli::OEVoxelizeMethod::Distance`.
