Class JDialogRGBtoHSB

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

public class JDialogRGBtoHSB extends JDialogScriptableBase implements AlgorithmInterface
Dialog to separate RGB channels into grayscale Hue, Saturation, and Brightness channels.
See Also:
  • Field Details

    • serialVersionUID

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

      private AlgorithmRGBtoHSB HSBAlgo
      DOCUMENT ME!
    • imageA

      private ModelImage imageA
      DOCUMENT ME!
    • resultImageB

      private ModelImage resultImageB
      DOCUMENT ME!
    • resultImageH

      private ModelImage resultImageH
      DOCUMENT ME!
    • resultImageS

      private ModelImage resultImageS
      DOCUMENT ME!
  • Constructor Details

    • JDialogRGBtoHSB

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

      public JDialogRGBtoHSB(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 Brightness result image.
      Returns:
      resultImageB
    • getResultImageH

      public ModelImage getResultImageH()
      Accessor that returns the Hue result image.
      Returns:
      resultImageR
    • getResultImageS

      public ModelImage getResultImageS()
      Accessor that returns the Saturation result image.
      Returns:
      resultImageG
    • 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.