Class JDialogHoughEllipse

All Implemented Interfaces:
AlgorithmInterface, DialogDefaultsInterface, ActionListener, FocusListener, ItemListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class JDialogHoughEllipse extends JDialogBase implements AlgorithmInterface, ItemListener, WindowListener
Dialog to create Hough transform with p, q, r1, r2, and theta output for ellipse detection in binary image, where p is the x coordinate of the ellipse center, q is the y coordinate of the ellipse center, r1 is the semimajor axis (or major radius), r2 is the semiminor axis (or minor radius), and theta is the angle of the major axis with the x axis.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • hAlgo

      private AlgorithmHoughEllipse hAlgo
      DOCUMENT ME!
    • image

      private ModelImage image
      DOCUMENT ME!
    • resultImage

      private ModelImage resultImage
      DOCUMENT ME!
    • minCoverage

      private double minCoverage
      Minimum percentage of the perimiter of a found ellipse that must be covered by points for it to be valid.
    • minCoverageText

      private JTextField minCoverageText
      DOCUMENT ME!
    • sidePointsForTangent

      private int sidePointsForTangent
      Maximum number of points to take from each side of a point on a curve in determining a tangent
    • sideText

      private JTextField sideText
    • pixelWidthText

      private JTextField pixelWidthText
    • maxPixelBinWidth

      private double maxPixelBinWidth
      For xCenter, yCenter, r1, and r2 must bin width invalid input: '<'= maxPixelBinWidth
    • degreesWidthText

      private JTextField degreesWidthText
    • maxDegreesBinWidth

      private double maxDegreesBinWidth
      For theta must have bin width invalid input: '<'= maxDegreesBinWidth
    • numEllipses

      private int numEllipses
      number of ellipses to be found
    • numEllipsesText

      private JTextField numEllipsesText
    • minPointDistance

      private double minPointDistance
      Smallest allowable distance between 2 of 3 picked points
    • minPointText

      private JTextField minPointText
    • maxPointDistance

      private double maxPointDistance
      Largest allowable distance between 2 of 3 picked points
    • maxPointText

      private JTextField maxPointText
    • pointSetsRequired

      private int pointSetsRequired
      Number of point triplets required before each ellipse find is performed
    • pointSetsText

      private JTextField pointSetsText
    • countThreshold

      private int countThreshold
      Number of counts required to find an ellipse
    • countText

      private JTextField countText
    • ellipseRangeTolerance

      private double ellipseRangeTolerance
      Maximum percent by which perimiter pixels can deviate from the ellipse equation
    • toleranceText

      private JTextField toleranceText
    • maxCyclesText

      private JTextField maxCyclesText
    • maxEllipseFindCycles

      private int maxEllipseFindCycles
      Maximum number of pointSetsRequired triplet point acqusitions that is allowed to occur
    • maxBufferText

      private JTextField maxBufferText
    • maxBufferSize

      private int maxBufferSize
      The maximum Hough transform size in megabytes - default is currently 256
  • Constructor Details

    • JDialogHoughEllipse

      public JDialogHoughEllipse(ModelImage image)
      Creates a new JDialogHoughEllipse object.
      Parameters:
      image - DOCUMENT ME!
    • JDialogHoughEllipse

      public JDialogHoughEllipse(Frame theParentFrame, ModelImage im)
      Creates new dialog.
      Parameters:
      theParentFrame - Parent frame
      im - Source image
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Closes dialog box when the OK button is pressed and calls the algorithm.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      event - Event that triggers function.
    • algorithmPerformed

      public void algorithmPerformed(AlgorithmBase algorithm)
      This method is required if the AlgorithmPerformed interface is implemented. It is called by the algorithm when it has completed or failed to to complete, so that the dialog can be display the result image and/or clean up.
      Specified by:
      algorithmPerformed in interface AlgorithmInterface
      Parameters:
      algorithm - Algorithm that caused the event.
    • itemStateChanged

      public void itemStateChanged(ItemEvent event)
      itemStateChanged.
      Specified by:
      itemStateChanged in interface ItemListener
      Overrides:
      itemStateChanged in class JDialogBase
      Parameters:
      event - DOCUMENT ME!
    • windowClosing

      public void windowClosing(WindowEvent event)
      Disposes of error dialog, then frame. Sets cancelled to true.
      Specified by:
      windowClosing in interface WindowListener
      Overrides:
      windowClosing in class JDialogBase
      Parameters:
      event - DOCUMENT ME!
    • callAlgorithm

      private void callAlgorithm()
      DOCUMENT ME!
    • init

      private void init()
      Initializes GUI components and displays dialog.
    • setVariables

      private boolean setVariables()
      Use the GUI results to set up the variables needed to run the algorithm.
      Returns:
      true if parameters set successfully, false otherwise.