Class JDialogPointArea

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

public class JDialogPointArea extends JDialogScriptableBase implements AlgorithmInterface
Dialog that will call AlgorithmPointArea in order to calculate the average intensity through a volume around an area with a given size (x by y) at a given point. The results are then graphed.
Version:
1.0
Author:
ben link
See Also:
  • Field Details

    • serialVersionUID

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

      float[] averageIntensities
      DOCUMENT ME!
    • rgbAverageIntensities

      float[][] rgbAverageIntensities
      DOCUMENT ME!
    • constrainBox

      private JCheckBox constrainBox
      DOCUMENT ME!
    • leftPad

      private boolean leftPad
      DOCUMENT ME!
    • leftPadBox

      private JCheckBox leftPadBox
      DOCUMENT ME!
    • locationField

      private JTextField locationField
      DOCUMENT ME!
    • pointAlgo

      private AlgorithmPointArea pointAlgo
      DOCUMENT ME!
    • showGraph

      private boolean showGraph
      DOCUMENT ME!
    • srcImage

      private ModelImage srcImage
      DOCUMENT ME!
    • threshold

      private float threshold
      DOCUMENT ME!
    • thresholdBox

      private JCheckBox thresholdBox
      DOCUMENT ME!
    • thresholdField

      private JTextField thresholdField
      DOCUMENT ME!
    • topPad

      private boolean topPad
      DOCUMENT ME!
    • topPadBox

      private JCheckBox topPadBox
      DOCUMENT ME!
    • useThreshold

      private boolean useThreshold
      DOCUMENT ME!
    • xLoc

      private int xLoc
      DOCUMENT ME!
    • xSpaceField

      private JTextField xSpaceField
      DOCUMENT ME!
    • xSpacing

      private int xSpacing
      DOCUMENT ME!
    • yLoc

      private int yLoc
      DOCUMENT ME!
    • ySpaceField

      private JTextField ySpaceField
      DOCUMENT ME!
    • ySpacing

      private int ySpacing
      DOCUMENT ME!
  • Constructor Details

    • JDialogPointArea

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

      public JDialogPointArea(Frame theParentFrame, ModelImage image, boolean showGraph)
      Constructor called from a ViewJFrameImage.
      Parameters:
      theParentFrame - Frame
      image - ModelImage
      showGraph - boolean
    • JDialogPointArea

      public JDialogPointArea(Frame theParentFrame, ModelImage image, int xLoc, int yLoc, boolean showGraph)
      Constructor called from ViewJComponentEditImage (by clicking on a point and selecting from menu).
      Parameters:
      theParentFrame - Frame
      image - ModelImage
      xLoc - int X location for point
      yLoc - int Y location for point
      showGraph - boolean whether or not to show the graph
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      actionPerformed - 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.
    • setLeftPad

      public void setLeftPad(boolean leftPad)
      Accessor to set if padded with extra column on left.
      Parameters:
      leftPad - DOCUMENT ME!
    • setShowGraph

      public void setShowGraph(boolean showGraph)
      Accessor to set showGraph.
      Parameters:
      showGraph - DOCUMENT ME!
    • setThreshold

      public void setThreshold(float threshold)
      Accessor to set threshold.
      Parameters:
      threshold - DOCUMENT ME!
    • setTopPad

      public void setTopPad(boolean topPad)
      Accessor to set if padded with extra row on top.
      Parameters:
      topPad - DOCUMENT ME!
    • setUseThreshold

      public void setUseThreshold(boolean useThreshold)
      Accessor to set if threshold is used.
      Parameters:
      useThreshold - DOCUMENT ME!
    • setXLoc

      public void setXLoc(int xLoc)
      Accessor to set x point location.
      Parameters:
      xLoc - DOCUMENT ME!
    • setXSpacing

      public void setXSpacing(int xSpacing)
      Accessor to set x spacing around point.
      Parameters:
      xSpacing - DOCUMENT ME!
    • setYLoc

      public void setYLoc(int yLoc)
      Accessor to set y point location.
      Parameters:
      yLoc - DOCUMENT ME!
    • setYSpacing

      public void setYSpacing(int ySpacing)
      Accessor to set y spacing around point.
      Parameters:
      ySpacing - DOCUMENT ME!
    • callAlgorithm

      protected void callAlgorithm()
      DOCUMENT ME!
      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.
    • init

      private void init()
      Initializes GUI components and adds them to the 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.
    • showIntensityGraph

      private void showIntensityGraph()
      Shows a graph of the average intensities through a volume (calculated from AlgorithmPointArea).