Class AlgorithmMinimumPerimeterPolygon

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.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 Detail

      • 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 Detail

      • 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 Detail

      • 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
      • 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)