Class AlgorithmHeightFunction

java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmHeightFunction
All Implemented Interfaces:
ActionListener, WindowListener, Runnable, 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 Details

    • QUAD

      private static final int QUAD
      DOCUMENT ME!
      See Also:
    • TRIANGLE

      private static final int TRIANGLE
      DOCUMENT ME!
      See Also:
    • mesh

      private final int mesh
      DOCUMENT ME!
    • sampleSize

      private int sampleSize
      DOCUMENT ME!
    • slice

      private final int slice
      DOCUMENT ME!
    • surfaceFileName

      private String surfaceFileName
      DOCUMENT ME!
  • Constructor Details

    • AlgorithmHeightFunction

      public AlgorithmHeightFunction(ModelImage srcImg, int sampleSize, 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 Details

    • finalize

      public void finalize()
      DOCUMENT ME!
      Overrides:
      finalize in class AlgorithmBase
    • 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.