Class JDialogScaleSaliency

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

public class JDialogScaleSaliency extends JDialogScriptableBase implements AlgorithmInterface, ItemListener, WindowListener
See Also:
  • Field Details

    • serialVersionUID

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

      private static final int NORMAL_MODE
      See Also:
    • PARZEN_WINDOW_MODE

      private static final int PARZEN_WINDOW_MODE
      See Also:
    • ANTI_ALIASED_SAMPLING_MODE

      private static final int ANTI_ALIASED_SAMPLING_MODE
      See Also:
    • mode

      private int mode
    • modeGroup

      private ButtonGroup modeGroup
    • normalButton

      private JRadioButton normalButton
    • parzenButton

      private JRadioButton parzenButton
    • scalarImage

      private boolean scalarImage
    • aaButton

      private JRadioButton aaButton
    • sAlgo

      private AlgorithmScaleSaliency sAlgo
      DOCUMENT ME!
    • image

      private ModelImage image
      DOCUMENT ME!
    • maximumRadius

      private int maximumRadius
      DOCUMENT ME!
    • maximumText

      private JTextField maximumText
      DOCUMENT ME!
    • sigma

      private double sigma
      DOCUMENT ME!
    • sigmaLabel

      private JLabel sigmaLabel
    • sigmanbinsText

      private JTextField sigmanbinsText
    • minimumText

      JTextField minimumText
    • minimumRadius

      private int minimumRadius
    • nbinsLabel

      JLabel nbinsLabel
    • nbins

      private int nbins
    • nbinsText

      private JTextField nbinsText
      DOCUMENT ME!
    • wt

      private double wt
    • interScaleSaliencyText

      private JTextField interScaleSaliencyText
    • yt

      private double yt
    • saliencyText

      private JTextField saliencyText
  • Constructor Details

    • JDialogScaleSaliency

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

      public JDialogScaleSaliency(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

      protected void callAlgorithm()
      DOCUMENT ME!
      Specified by:
      callAlgorithm in class JDialogScriptableBase
    • 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.
    • setGUIFromParams

      protected void setGUIFromParams()
      Set the dialog GUI using the script parameters while running this algorithm as part of a script.
      Specified by:
      setGUIFromParams in class JDialogScriptableBase
    • storeParamsFromGUI

      protected void storeParamsFromGUI() throws ParserException
      Record the parameters just used to run this algorithm in a script.
      Specified by:
      storeParamsFromGUI in class JDialogScriptableBase
      Throws:
      ParserException - If there is a problem creating/recording the new parameters.
    • createInputParameters

      public ParameterTable createInputParameters()
      Returns a table listing the input parameters of this algorithm (which should match up with the scripting parameters used in setGUIFromParams()).
      Returns:
      A parameter table listing the inputs of this algorithm.
    • getActionMetadata

      public ActionMetadata getActionMetadata()
      Return meta-information about this discoverable action for categorization and labeling purposes.
      Returns:
      Metadata for this action.