Class JDialogFRETBleedThrough

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

public class JDialogFRETBleedThrough extends JDialogScriptableBase implements AlgorithmInterface, ListSelectionListener
Dialog to get user input, then call the algorithm.
See Also:
  • Field Details

    • serialVersionUID

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

      private JRadioButton acceptorButton
      DOCUMENT ME!
    • acceptorRun

      private boolean acceptorRun
      DOCUMENT ME!
    • activeButton

      private JRadioButton activeButton
      DOCUMENT ME!
    • activeIndex

      private int activeIndex
      DOCUMENT ME!
    • backgroundButton

      private JRadioButton backgroundButton
      DOCUMENT ME!
    • backgroundIndex

      private int backgroundIndex
      DOCUMENT ME!
    • blueButton

      private JRadioButton blueButton
      DOCUMENT ME!
    • chooserButton

      private JButton chooserButton
      DOCUMENT ME!
    • chooserButton2

      private JButton chooserButton2
      DOCUMENT ME!
    • colorGroup

      private ButtonGroup colorGroup
      DOCUMENT ME!
    • colorPanel

      private JPanel colorPanel
      DOCUMENT ME!
    • componentImage

      private ViewJComponentEditImage componentImage
      DOCUMENT ME!
    • doColor

      private boolean doColor
      DOCUMENT ME!
    • donorButton

      private JRadioButton donorButton
      DOCUMENT ME!
    • dyeGroup

      private ButtonGroup dyeGroup
      DOCUMENT ME!
    • fbtAlgo

      private AlgorithmFRETBleedThrough fbtAlgo
      DOCUMENT ME!
    • FP2Image

      private ModelImage FP2Image
      DOCUMENT ME!
    • FRETImage

      private ModelImage FRETImage
      DOCUMENT ME!
    • greenButton

      private JRadioButton greenButton
      DOCUMENT ME!
    • imageList

      private JList imageList
      DOCUMENT ME!
    • imageList2

      private JList imageList2
      DOCUMENT ME!
    • imagePanel

      private JPanel imagePanel
      DOCUMENT ME!
    • imagePanel2

      private JPanel imagePanel2
      DOCUMENT ME!
    • model

      private DefaultListModel model
      DOCUMENT ME!
    • model2

      private DefaultListModel model2
      DOCUMENT ME!
    • nBoundingVOIs

      private int nBoundingVOIs
      DOCUMENT ME!
    • paramPanel

      private JPanel paramPanel
      DOCUMENT ME!
    • redButton

      private JRadioButton redButton
      DOCUMENT ME!
    • removeButton

      private JButton removeButton
      DOCUMENT ME!
    • removeButton2

      private JButton removeButton2
      DOCUMENT ME!
    • srcImage

      private ModelImage srcImage
      The source image must be either an image with donor dye only taken with a donor fluorescent peak filter or an image with acceptor dye only taken with a acceptor fluorescent peak filter.
    • useBlue

      private boolean useBlue
      DOCUMENT ME!
    • useGreen

      private boolean useGreen
      DOCUMENT ME!
    • useRed

      private boolean useRed
      DOCUMENT ME!
    • userInterface

      private ViewUserInterface userInterface
      DOCUMENT ME!
    • VOIGroup

      private ButtonGroup VOIGroup
      DOCUMENT ME!
    • VOIs

      private ViewVOIVector VOIs
      DOCUMENT ME!
  • Constructor Details

    • JDialogFRETBleedThrough

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

      public JDialogFRETBleedThrough(ModelImage im)
      Used primarily for the script to store variables and run the algorithm. No actual dialog will appear but the set up info and result image will be stored here.
      Parameters:
      im - Source image.
    • JDialogFRETBleedThrough

      public JDialogFRETBleedThrough(Frame theParentFrame, ModelImage im)
      Creates a new JDialogFRETBleedThrough object.
      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 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.
    • setAcceptorRun

      public void setAcceptorRun(boolean acceptorRun)
      DOCUMENT ME!
      Parameters:
      acceptorRun - DOCUMENT ME!
    • setBlue

      public void setBlue(boolean useBlue)
      DOCUMENT ME!
      Parameters:
      useBlue - DOCUMENT ME!
    • setGreen

      public void setGreen(boolean useGreen)
      DOCUMENT ME!
      Parameters:
      useGreen - DOCUMENT ME!
    • setRed

      public void setRed(boolean useRed)
      DOCUMENT ME!
      Parameters:
      useRed - DOCUMENT ME!
    • setSourceImage

      public void setSourceImage(ModelImage image)
      Accessor that sets the source image.
      Parameters:
      image - new source image.
    • valueChanged

      public void valueChanged(ListSelectionEvent evt)
      Sets the remove index based on the selected index in the list.
      Specified by:
      valueChanged in interface ListSelectionListener
      Parameters:
      evt - Event that caused this method to fire.
    • callAlgorithm

      protected void callAlgorithm()
      Once all the necessary variables are set, call AlgorithmFRETBleedThrough.
      Specified by:
      callAlgorithm 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.
    • checkImage

      private boolean checkImage(ModelImage testImage)
      Checks the color and dimensionality of the new image vs. the original source image. The new image cannot be color unless the source image is color. However, then new image may be black and white when the source image is color. All new images should have the same dimensions as the source.
      Parameters:
      testImage - DOCUMENT ME!
      Returns:
      Flag indicating if the image checks out.
    • init

      private void init()
      Sets up the GUI (panels, buttons, etc) and displays it on the screen.
    • open

      private ModelImage open()
      Open an image based on the suffix of the file.
      Returns:
      The image.
    • 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.