Class JDialogRGBConcat

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

public class JDialogRGBConcat extends JDialogScriptableBase implements AlgorithmInterface
Dialog to choose images, then call the RGBConcat algorithm.
Version:
0.1 June 5, 2000
Author:
Matthew J. McAuliffe, Ph.D.
See Also:
  • Field Details

    • serialVersionUID

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

      private static final int RED
      Red channel.
      See Also:
    • GREEN

      private static final int GREEN
      Green channel.
      See Also:
    • BLUE

      private static final int BLUE
      Blue channel.
      See Also:
    • blank

      private ModelImage blank
      DOCUMENT ME!
    • cBoxRemap

      private JCheckBox cBoxRemap
      DOCUMENT ME!
    • comboBoxImageBlue

      private JComboBox comboBoxImageBlue
      DOCUMENT ME!
    • comboBoxImageGreen

      private JComboBox comboBoxImageGreen
      DOCUMENT ME!
    • comboBoxImageRed

      private JComboBox comboBoxImageRed
      DOCUMENT ME!
    • radioARGB

      private JRadioButton radioARGB
    • radioARGB_FLOAT

      private JRadioButton radioARGB_FLOAT
      DOCUMENT ME!
    • radioARGB_USHORT

      private JRadioButton radioARGB_USHORT
      DOCUMENT ME!
    • radioARGB_UINTEGER

      private JRadioButton radioARGB_UINTEGER
    • colorGroup

      private ButtonGroup colorGroup
    • dataType

      private ModelStorageBase.DataType dataType
      ARGB, ARGB_USHORT, ARGB_UINTEGER, or ARGB_FLOAT for color image
    • remapGroup

      private ButtonGroup remapGroup
    • radioCommon

      private JRadioButton radioCommon
    • radioSeparate

      private JRadioButton radioSeparate
    • commonMapping

      private boolean commonMapping
    • textRemap

      private JTextField textRemap
    • remapHighestValue

      private float remapHighestValue
    • destinationGroup

      private ButtonGroup destinationGroup
      DOCUMENT ME!
    • destinationPanel

      private JPanel destinationPanel
      DOCUMENT ME!
    • displayLoc

      private int displayLoc
      DOCUMENT ME!
    • imageB

      private ModelImage imageB
      DOCUMENT ME!
    • imageG

      private ModelImage imageG
      DOCUMENT ME!
    • imageR

      private ModelImage imageR
      DOCUMENT ME!
    • mathAlgo

      private AlgorithmRGBConcat mathAlgo
      DOCUMENT ME!
    • newImage

      private JRadioButton newImage
      DOCUMENT ME!
    • remapMode

      private boolean remapMode
      DOCUMENT ME!
    • replaceImage

      private JRadioButton replaceImage
      DOCUMENT ME!
    • resultImage

      private ModelImage resultImage
      DOCUMENT ME!
  • Constructor Details

    • JDialogRGBConcat

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

      public JDialogRGBConcat(Frame theParentFrame, ModelImage im)
      Creates new dialog to enter parameters for RGBConcat algorithm.
      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.
    • getResultImage

      public ModelImage getResultImage()
      Accessor that returns the image.
      Returns:
      The result image
    • setBlueImage

      public void setBlueImage(ModelImage im)
      Accessor that sets the Blue Image Source.
      Parameters:
      im - image to set the Blue Image Source to.
    • setDisplayLocNew

      public void setDisplayLocNew()
      Accessor that sets the display loc variable to new, so that a new image is created once the algorithm completes.
    • setDisplayLocReplace

      public void setDisplayLocReplace()
      Accessor that sets the display loc variable to replace, so the current image is replaced once the algorithm completes.
    • setGreenImage

      public void setGreenImage(ModelImage im)
      Accessor that sets the Green Image Source.
      Parameters:
      im - image to set the Green Image Source to.
    • setDataType

      public void setDataType(int dataType)
      Accessor that sets whether color image type is ARGB, ARGB_USHORT, ARGB_UINTEGER, or ARGB_FLOAT
      Parameters:
      dataType -
    • setRemapMode

      public void setRemapMode(boolean flag)
      Accessor that sets the remap mode.
      Parameters:
      flag - true indicates remap data.
    • setCommonMapping

      public void setCommonMapping(boolean commonMapping)
      Parameters:
      commonMapping -
    • setRemapHighestValue

      public void setRemapHighestValue(float remapHighestValue)
      Parameters:
      remapHighestValue -
    • callAlgorithm

      protected void callAlgorithm()
      Once all the necessary variables are set, call the RGBConcat algorithm based on what type of image this is and whether or not there is a separate destination image.
      Specified by:
      callAlgorithm in class JDialogScriptableBase
    • 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.
    • buildComboBoxImage

      private void buildComboBoxImage(int channel)
      Builds a list of images to register to the template image.
      Parameters:
      channel - RED, GREEN, or BLUE
    • init

      private void init()
      Sets up the GUI (panels, buttons, etc) and displays it on the screen.
    • 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.