Class Voxelization


  • public final class Voxelization
    extends Object
    This is a voxelizer that produces a binary image with values filled in along the surface of the mesh.

    Thanks to Tomas Möller for sharing his public domain code.

    Author:
    Kyle Harrington
    • Method Detail

      • voxelize

        public static Img<BitType> voxelize​(Mesh mesh,
                                            int width,
                                            int height,
                                            int depth)
        Voxelizes mesh
        Parameters:
        mesh - the input Mesh
        width - the width of the resulting image
        height - the height of the resulting image
        depth - the depth of the resulting image
        Returns:
        an Img containing a voxelization of mesh
        Implementation Note:
        op names="geom.voxelization"
      • voxelize

        public static Img<BitType> voxelize​(Mesh mesh,
                                            Dimensions dims)
        Voxelizes mesh
        Parameters:
        mesh - the input Mesh
        dims - the Dimensions of the output image
        Returns:
        an Img containing a voxelization of mesh
        Implementation Note:
        op names="geom.voxelization"
      • voxelize

        public static <B extends BooleanType<B>> void voxelize​(Mesh mesh,
                                                               RandomAccessibleInterval<B> out)
        Voxelizes mesh
        Parameters:
        mesh - the input Mesh
        out - an output buffer in which the voxelization will be stored (container)
        Implementation Note:
        op names="geom.voxelization"