Class JDialogFillObjects

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

public class JDialogFillObjects extends JDialogScriptableBase implements AlgorithmInterface, ActionDiscovery
DOCUMENT ME!
See Also:
  • Field Details

    • serialVersionUID

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

      private ButtonGroup destinationGroup
      use later.
    • destinationPanel

      private JPanel destinationPanel
      panel that hold the new image radio button.
    • displayLoc

      private int displayLoc
      Flag indicating if a new image is to be generated.
    • idObjectsAlgo2D

      private AlgorithmMorphology2D idObjectsAlgo2D
      Morphology2D algorithm reference.
    • idObjectsAlgo25D

      private AlgorithmMorphology25D idObjectsAlgo25D
      Morphology25D algorithm reference.
    • idObjectsAlgo3D

      private AlgorithmMorphology3D idObjectsAlgo3D
      Morphology3D algorithm reference.
    • image

      private ModelImage image
      source image.
    • image25D

      private JCheckBox image25D
      DOCUMENT ME!
    • do25D

      private boolean do25D
      DOCUMENT ME!
    • imageVOIGroup

      private ButtonGroup imageVOIGroup
      DOCUMENT ME!
    • imageVOIPanel

      private JPanel imageVOIPanel
      used later.
    • newImage

      private JRadioButton newImage
      new image radio button.
    • regionFlag

      private boolean regionFlag
      DOCUMENT ME!
    • replaceImage

      private JRadioButton replaceImage
      use later.
    • titles

      private String[] titles
      DOCUMENT ME!
    • ubyteImage

      private ModelImage ubyteImage
      Usigned byte image, the actual image to do the morphology calculation.
    • userInterface

      private ViewUserInterface userInterface
      user interface renference.
    • VOIRegions

      private JRadioButton VOIRegions
      DOCUMENT ME!
    • wholeImage

      private JRadioButton wholeImage
      DOCUMENT ME!
  • Constructor Details

    • JDialogFillObjects

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

      public JDialogFillObjects(Frame theParentFrame, ModelImage im)
      Creates new dialog.
      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
    • setImage25D

      public void setImage25D(boolean b)
      Process the image in 2.5D.
      Parameters:
      b - whether to do 2.5D morphology
    • algorithmPerformed

      public void algorithmPerformed(AlgorithmBase algorithm)
      When the morphology algorithm finish running, this method is invoked.
      Specified by:
      algorithmPerformed in interface AlgorithmInterface
      Parameters:
      algorithm - AlgorithmBase reference
    • getResultImage

      public ModelImage getResultImage()
      Accessor that returns the image after filling holes.
      Returns:
      The result image.
    • callAlgorithm

      protected void callAlgorithm()
      When OK button is clicked, this method is invoked.
      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.
    • init

      private void init()
      Initial control panel.
    • setVariables

      private boolean setVariables()
      Set the variable when the OK button is clicked.
      Returns:
      boolean always true
    • getActionMetadata

      public ActionMetadata getActionMetadata()
      Return meta-information about this discoverable action for categorization and labeling purposes.
      Specified by:
      getActionMetadata in interface ActionDiscovery
      Returns:
      Metadata for this action.
    • createInputParameters

      public ParameterTable createInputParameters()
      Returns a table listing the input parameters of this algorithm (which should match up with the scripting parameters used in setGUIFromParams()).
      Specified by:
      createInputParameters in interface ActionDiscovery
      Returns:
      A parameter table listing the inputs of this algorithm.
    • createOutputParameters

      public ParameterTable createOutputParameters()
      Returns a table listing the output parameters of this algorithm (usually just labels used to obtain output image names later).
      Specified by:
      createOutputParameters in interface ActionDiscovery
      Returns:
      A parameter table listing the outputs of this algorithm.
    • getOutputImageName

      public String getOutputImageName(String imageParamName)
      Returns the name of an image output by this algorithm, the image returned depends on the parameter label given (which can be used to retrieve the image object from the image registry).
      Specified by:
      getOutputImageName in interface ActionDiscovery
      Parameters:
      imageParamName - The output image parameter label for which to get the image name.
      Returns:
      The image name of the requested output image parameter label.
    • isActionComplete

      public boolean isActionComplete()
      Returns whether the action has successfully completed its execution.
      Specified by:
      isActionComplete in interface ActionDiscovery
      Returns:
      True, if the action is complete. False, if the action failed or is still running.