Class AlgorithmMinimumPerimeterPolygon

java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmMinimumPerimeterPolygon
All Implemented Interfaces:
ActionListener, WindowListener, Runnable, EventListener

public class AlgorithmMinimumPerimeterPolygon extends AlgorithmBase
Smoothing VOI with minimum perimeter polygon. References: 1.) Digital ImageProcessing Fourth Edition, Rafael C. Gonzalez and Richard E. Woods, Boundary Approximations Using Minimum-Perimeter Polygons, pp. 963-968.
Author:
ilb
  • Field Details

    • activeVOI

      private VOI activeVOI
      The voi selected by the user.
    • squareCellLength

      private int squareCellLength
      Square cell length.
    • resultVOI

      private VOI resultVOI
      The resultant polygon and the evolution has completed.
    • srcImage

      private ModelImage srcImage
      Source image.
  • Constructor Details

    • AlgorithmMinimumPerimeterPolygon

      public AlgorithmMinimumPerimeterPolygon()
    • AlgorithmMinimumPerimeterPolygon

      public AlgorithmMinimumPerimeterPolygon(ModelImage srcImg, VOI activeVOI, int squareCellLength)
      Creates a new AlgorithmMinimumPerimeterPolygon object.
      Parameters:
      srcImg - 2D or 3D source image
      activeVOI - the selected voi
      squareCellLength - square cell length
  • Method Details

    • finalize

      public void finalize()
      Prepares this class for destruction.
      Overrides:
      finalize in class AlgorithmBase
    • getResultVOI

      public VOI getResultVOI()
      Accessor that returns a voi that is a smoothed version of the original.
      Returns:
      resultVOI
    • runAlgorithm

      public void runAlgorithm()
      Starts the smooth algorithm.
      Specified by:
      runAlgorithm in class AlgorithmBase
    • calc

      private void calc()
      Prepares the data and runs the algorithm for a 2D or 3D image.
    • det

      private double det(double x1, double x2, double x3, double y1, double y2, double y3)