Class AlgorithmHeightFunction

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

    public class AlgorithmHeightFunction
    extends AlgorithmBase
    The class generates a triangle or quad mesh of a 2D dataset (image) to be displayed in the surface viewer. If the image is 3D, takes the 2D current slice. The triangle mesh is like a relief map of the image; the higher intensities are peaks and the lower intensities are valleys.
    Version:
    0.1 Aug 1, 2001
    Author:
    Matthew J. McAuliffe, Ph.D.
    • Field Detail

      • mesh

        private final int mesh
        DOCUMENT ME!
      • sampleSize

        private int sampleSize
        DOCUMENT ME!
      • slice

        private final int slice
        DOCUMENT ME!
      • surfaceFileName

        private java.lang.String surfaceFileName
        DOCUMENT ME!
    • Constructor Detail

      • AlgorithmHeightFunction

        public AlgorithmHeightFunction​(ModelImage srcImg,
                                       int sampleSize,
                                       java.lang.String fileName,
                                       int slice,
                                       int mesh)
        Sets up variables needed by algorithm to run.
        Parameters:
        srcImg - Source image model.
        sampleSize - Sample size to use when plotting surface.
        fileName - File name to save surface to.
        slice - Slice of 3D image to plot; 0 if 2D image.
        mesh - Type of mesh; 0 = Quad mesh, 1 = Triangle mesh
    • Method Detail

      • runAlgorithm

        public void runAlgorithm()
        Runs the algorithm; calls either calcQuadSurface or calcTriangleSurface, depending on the mesh parameter set in the constructor.
        Specified by:
        runAlgorithm in class AlgorithmBase
      • calcQuadSurface

        private void calcQuadSurface()
        Calculates quad surface.
      • calcTriSurface

        private void calcTriSurface()
        Calculates triangulated surface.