Class OpenCLAlgorithmMarchingCubes

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.EventListener

    public class OpenCLAlgorithmMarchingCubes
    extends OpenCLAlgorithmBase
    • Field Detail

      • isoValue

        private float isoValue
      • blurFlag

        private final boolean blurFlag
        If true then the input image is blurred slightly.
      • blurSigma

        private float blurSigma
        The amount to blur to smooth surface.
      • decimateFlag

        private final boolean decimateFlag
        If true then the extracted surface is decimated into a continuous level of detail surface (clod).
      • surfaceFileName

        private java.lang.String surfaceFileName
        Path and name of extracted surface file. ".sur" will be appended if necessary.
      • edgeTable

        private int[] edgeTable
      • triTable

        private int[] triTable
      • numVertsTable

        int[] numVertsTable
      • resultMesh

        private WildMagic.LibGraphics.SceneGraph.TriMesh resultMesh
    • Constructor Detail

      • OpenCLAlgorithmMarchingCubes

        public OpenCLAlgorithmMarchingCubes​(ModelImage image,
                                            int level,
                                            boolean entireImage,
                                            boolean decFlag,
                                            boolean blurFlag,
                                            float sigma,
                                            java.lang.String fileName)
    • Method Detail

      • marchingCubes3D

        private void marchingCubes3D​(int time)
      • reductionKernel

        private float reductionKernel​(org.jocl.cl_command_queue commandQueue,
                                      long elementCount,
                                      org.jocl.cl_mem inputBuffer)
      • getMesh

        public WildMagic.LibGraphics.SceneGraph.TriMesh getMesh()
      • saveMesh

        private void saveMesh​(java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f> newVertices,
                              int[] aiConnect,
                              boolean flip,
                              java.lang.String kName)
                       throws java.io.IOException
        Throws:
        java.io.IOException