Class JDialogHoughHyperbola

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

public class JDialogHoughHyperbola extends JDialogBase implements AlgorithmInterface, ItemListener, WindowListener
Dialog to create Hough transform with p, q, r1, r2, and theta output for hyperbola detection in binary image, where p is the x coordinate of the hyperbola center, q is the y coordinate of the hyperbola center, r1 is the 1/2 the transverse axis, r2 is 1/2 the conjugate axis, and theta is the angle of the transverse axis with the x axis.
See Also:
  • Field Details

    • serialVersionUID

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

      private AlgorithmHoughHyperbola hAlgo
      DOCUMENT ME!
    • image

      private ModelImage image
      DOCUMENT ME!
    • resultImage

      private ModelImage resultImage
      DOCUMENT ME!
    • minPixels

      private int minPixels
      Minimum number of points found on a hyperbola for it to be valid.
    • minPixelsText

      private JTextField minPixelsText
      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
    • numHyperbolas

      private int numHyperbolas
      number of hyperbolas to be found
    • numHyperbolasText

      private JTextField numHyperbolasText
    • 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 hyperbola find is performed
    • pointSetsText

      private JTextField pointSetsText
    • countThreshold

      private int countThreshold
      Number of counts required to find a hyperbola
    • countText

      private JTextField countText
    • hyperbolaRangeTolerance

      private double hyperbolaRangeTolerance
      Maximum percent by which perimiter pixels can deviate from the hyperbola equation
    • toleranceText

      private JTextField toleranceText
    • maxCyclesText

      private JTextField maxCyclesText
    • maxHyperbolaFindCycles

      private int maxHyperbolaFindCycles
      Maximum number of pointSetsRequired triplet point acquisitions 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

    • JDialogHoughHyperbola

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

      public JDialogHoughHyperbola(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.