Class JDialogCircleGeneration

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

public class JDialogCircleGeneration extends JDialogBase implements AlgorithmInterface, ItemListener, WindowListener
Dialog to create an image with randomly spaced, aggregated, regular or uniform, or constrained circles of the same size
See Also:
  • Field Details

    • serialVersionUID

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

      DOCUMENT ME!
    • extents

      private int[] extents
    • resultImage

      private ModelImage resultImage
      DOCUMENT ME!
    • xDim

      private int xDim
      DOCUMENT ME!
    • xDimText

      private JTextField xDimText
      DOCUMENT ME!
    • yDim

      private int yDim
      DOCUMENT ME!
    • yDimText

      private JTextField yDimText
    • radius

      private int radius
    • radiusText

      private JTextField radiusText
      DOCUMENT ME!
    • numCircles

      private int numCircles
    • numCirclesText

      private JTextField numCirclesText
    • patternGroup

      private ButtonGroup patternGroup
    • randomButton

      private JRadioButton randomButton
    • aggregatedButton

      private JRadioButton aggregatedButton
    • aggregatedCirclesDifferentSizesButton

      private JRadioButton aggregatedCirclesDifferentSizesButton
    • aggregatedEllipseButton

      private JRadioButton aggregatedEllipseButton
    • aggregatedEllipseRandomOrientationButton

      private JRadioButton aggregatedEllipseRandomOrientationButton
    • aggregatedEllipseRandomOrientationDifferentSizes

      private JRadioButton aggregatedEllipseRandomOrientationDifferentSizes
    • regularButton

      private JRadioButton regularButton
    • constrainedButton

      private JRadioButton constrainedButton
    • pattern

      private int pattern
    • initialCirclesLabel

      private JLabel initialCirclesLabel
    • initialCirclesText

      private JTextField initialCirclesText
    • initialRandomCircles

      private int initialRandomCircles
    • minimumDistanceLabel

      private JLabel minimumDistanceLabel
    • minimumDistanceText

      private JTextField minimumDistanceText
    • minimumNearestNeighborDistance

      private double minimumNearestNeighborDistance
    • maximumDistanceLabel

      private JLabel maximumDistanceLabel
    • maximumDistanceText

      private JTextField maximumDistanceText
    • maximumNearestNeighborDistance

      private double maximumNearestNeighborDistance
    • semiMajorAxisLabel

      private JLabel semiMajorAxisLabel
    • semiMajorAxisText

      private JTextField semiMajorAxisText
    • semiMajorAxis

      private double semiMajorAxis
    • semiMinorAxisLabel

      private JLabel semiMinorAxisLabel
    • semiMinorAxisText

      private JTextField semiMinorAxisText
    • phiLabel

      private JLabel phiLabel
    • phiText

      private JTextField phiText
    • phi

      private double phi
    • semiMinorAxis

      private double semiMinorAxis
    • lowestForbiddenLabel

      private JLabel lowestForbiddenLabel
    • lowestForbiddenText

      private JTextField lowestForbiddenText
    • lowestForbiddenNNDistance

      private double lowestForbiddenNNDistance
    • highestForbiddenLabel

      private JLabel highestForbiddenLabel
    • highestForbiddenText

      private JTextField highestForbiddenText
    • highestForbiddenNNDistance

      private double highestForbiddenNNDistance
    • highestRegenerationLabel

      private JLabel highestRegenerationLabel
    • highestRegenerationText

      private JTextField highestRegenerationText
    • highestRegenerationNNDistance

      private double highestRegenerationNNDistance
    • ratioLabel

      private JLabel ratioLabel
    • ratioText

      private JTextField ratioText
    • smallestToLargestAxisRatio

      private double smallestToLargestAxisRatio
  • Constructor Details

    • JDialogCircleGeneration

      public JDialogCircleGeneration(Frame theParentFrame)
      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.