Class JDialogRGBtoGrays

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

public class JDialogRGBtoGrays extends JDialogScriptableBase implements AlgorithmInterface
Dialog to call a algorithm to convert an RGB to a grayscale images. This dialog will not be visible because it does not require user input at this time. It was made a dialog object because it may in the future require user input and to be consistent with the dialog/algorithm paradigm. In should be noted, that the algorithms are executed in their own thread.
Version:
0.1 Nov 17, 1998
Author:
Matthew J. McAuliffe, Ph.D.
See Also:
  • Field Details

    • serialVersionUID

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

      private ModelImage imageA
      DOCUMENT ME!
    • resultImageB

      private ModelImage resultImageB
      DOCUMENT ME!
    • resultImageG

      private ModelImage resultImageG
      DOCUMENT ME!
    • resultImageR

      private ModelImage resultImageR
      DOCUMENT ME!
    • RGBAlgo

      private AlgorithmRGBtoGrays RGBAlgo
      DOCUMENT ME!
  • Constructor Details

    • JDialogRGBtoGrays

      public JDialogRGBtoGrays()
      Empty constructor needed for dynamic instantiation (used during scripting).
    • JDialogRGBtoGrays

      public JDialogRGBtoGrays(Frame theParentFrame, ModelImage imA)
      Sets variables needed to call algorithm.
      Parameters:
      theParentFrame - Parent frame
      imA - Source image
  • Method Details

    • algorithmPerformed

      public void algorithmPerformed(AlgorithmBase algorithm)
      This method is required if the AlgorithmPerformed interface is implemented. It is called by the algorithms 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.
    • callAlgorithm

      public void callAlgorithm()
      Calls the algorithm.
      Specified by:
      callAlgorithm in class JDialogScriptableBase
    • getResultImageB

      public ModelImage getResultImageB()
      Accessor that returns the Blue result image.
      Returns:
      resultImageB
    • getResultImageG

      public ModelImage getResultImageG()
      Accessor that returns the Green result image.
      Returns:
      resultImageG
    • getResultImageR

      public ModelImage getResultImageR()
      Accessor that returns the Red result image.
      Returns:
      resultImageR
    • doPostAlgorithmActions

      protected void doPostAlgorithmActions()
      Store the result image in the script runner's image table now that the action execution is finished.
      Overrides:
      doPostAlgorithmActions in class JDialogScriptableBase
    • 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.