Class JDialogVOIHausdorffDistance

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

Author:
ilb This dialog and utility allows for calculating the Hausdorff distance between 2 VOIs.
See Also:
  • Field Details

    • image

      protected ModelImage image
      image and cloned image
    • userInterface

      protected ViewUserInterface userInterface
    • everything

      protected JTabbedPane everything
      Tabbed pane that holds all components.
    • highlighter

      Operator to provide listener access... could be done by /this/
    • addremove

      Panel to push/pull VOIs from full list to selectable list.
    • alg

      algorithm
    • sourceRoot

      private DefaultMutableTreeNode sourceRoot
      DOCUMENT ME!
    • selectedRoot

      private DefaultMutableTreeNode selectedRoot
      DOCUMENT ME!
    • sourceVoiModel

      private DefaultTreeModel sourceVoiModel
      The tree of VOIs, composed of an image with children VOIs
    • selectedVOIModel

      private DefaultTreeModel selectedVOIModel
      The tree of VOIs, composed of an image with children VOIs
    • sourceVoiTree

      private JTree sourceVoiTree
      The graphical representation of voiModel
    • selectedVoiTree

      private JTree selectedVoiTree
    • ICON_POLYGON

      private static Icon ICON_POLYGON
      DOCUMENT ME!
    • ICON_POLYLINE

      private static Icon ICON_POLYLINE
      DOCUMENT ME!
    • ICON_POINT

      private static Icon ICON_POINT
      DOCUMENT ME!
    • ICON_LINE

      private static Icon ICON_LINE
      DOCUMENT ME!
    • ICON_MEDICAL_FRAME

      private static Icon ICON_MEDICAL_FRAME
      DOCUMENT ME!
    • ICON_X_AXIS

      private static Icon ICON_X_AXIS
      DOCUMENT ME!
    • ICON_Y_AXIS

      private static Icon ICON_Y_AXIS
      DOCUMENT ME!
    • ICON_Z_AXIS

      private static Icon ICON_Z_AXIS
      DOCUMENT ME!
    • ICON_PROTRACTOR

      private static Icon ICON_PROTRACTOR
      DOCUMENT ME!
    • frameBorder

      private Border frameBorder
    • jsp

      private JScrollPane jsp
    • treeSelectionChange

      private boolean treeSelectionChange
    • updateTree

      private boolean updateTree
    • voiHandler

      protected VOIHandlerInterface voiHandler
    • selectedVOI

      private VOI selectedVOI
    • index

      int index
    • logicalOperation

      int logicalOperation
    • processList

      ViewVOIVector processList
  • Constructor Details

    • JDialogVOIHausdorffDistance

      public JDialogVOIHausdorffDistance(VOIHandlerInterface voiHandler, VOIVector voiList)
      constructor
      Parameters:
      voiList -
  • Method Details

    • cleanUpAndDispose

      protected void cleanUpAndDispose()
      Clean up some things done by the dialog which may affect other parts of MIPAV.
    • buildDialog

      protected void buildDialog(VOIVector voiList)
      Builds the dialog
      Parameters:
      voiList -
    • buildOKCancelPanel

      protected JPanel buildOKCancelPanel()
      creates the panel which consists of the OKAY button and the Cancel button.
    • vectorSelected

      public void vectorSelected(VOIVectorEvent voiEvent)
      un-implemented.
      Specified by:
      vectorSelected in interface VOIVectorListener
      Parameters:
      voiEvent - DOCUMENT ME!
    • addedVOI

      public void addedVOI(VOIVectorEvent voiEvent)
      resets the volumes list to the current VOIVector. adds the highlighter to the new VOI.
      Specified by:
      addedVOI in interface VOIVectorListener
      Parameters:
      voiEvent - DOCUMENT ME!
    • removedVOI

      public void removedVOI(VOIVectorEvent voiEvent)
      resets the volumes list to the current VOIVector. removes the highlighter from the removed VOI.
      Specified by:
      removedVOI in interface VOIVectorListener
      Parameters:
      voiEvent - DOCUMENT ME!
    • buildSourceListingPanel

      private JPanel buildSourceListingPanel(VOIVector VOIlist)
      Creates the panel holding the directory tree.
      Parameters:
      VOIlist - DOCUMENT ME!
      Returns:
      Panel.
    • updateTree

      public void updateTree()
    • buildVOITree

      protected JTree buildVOITree()
      DOCUMENT ME!
    • buildSourcePanel

      private JPanel buildSourcePanel(VOIVector VOIlist)
      creates the source panel which consists of the directory line, the browse button, and a check box approving the anonymize in sub-directories.
      Parameters:
      VOIlist - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • buildSelectedListing

      private JPanel buildSelectedListing()
      creates the visual display in which to list all selected directories in the directory tree. The panel is 240 pixels wide though that is supposed to be the minimum size
      Returns:
      the panel which is to hold the list of selected items
    • buildVOIPanel

      protected JPanel buildVOIPanel(VOIVector VOIlist)
      creates the source panel for the VOI tab which consists of the directory line, the browse button, and a check box approving the anonymize in sub-directories. Also includes the file-format selection for the output file.
      Parameters:
      VOIlist - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • callAlgorithm

      protected void callAlgorithm()
      Description copied from class: JDialogScriptableBase
      Starts the algorithm. Already exists in most algorithm dialogs. Should be called during scripted execution and regular operation.
      Specified by:
      callAlgorithm in class JDialogScriptableBase
    • setGUIFromParams

      protected void setGUIFromParams()
      Description copied from class: JDialogScriptableBase
      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
      Description copied from class: JDialogScriptableBase
      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.
    • algorithmPerformed

      public void algorithmPerformed(AlgorithmBase algorithm)
      Description copied from interface: AlgorithmInterface
      Called after an algorithm this listener is registered to exits (maybe successfully, maybe not). If the algorithm is run in a separate thread, this call will be made within that thread. If not, this call will be made from that same, shared thread.
      Specified by:
      algorithmPerformed in interface AlgorithmInterface
      Parameters:
      algorithm - the algorithm which has just completed
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
    • windowClosing

      public void windowClosing(WindowEvent event)
      Description copied from class: JDialogBase
      Disposes of error dialog, then frame. Sets cancelled to true.
      Specified by:
      windowClosing in interface WindowListener
      Overrides:
      windowClosing in class JDialogBase
      Parameters:
      event - WindowEvent
    • printTree

      private void printTree(TreeModel model, Object parent)
    • valueChanged

      public void valueChanged(TreeSelectionEvent e)
      Updates the ViewJFrameImage when a VOI/contour is selected.
      Specified by:
      valueChanged in interface TreeSelectionListener
      Parameters:
      e - TreeSelectionEvent
    • updateVOI

      public void updateVOI(VOI _voi, ModelImage img)
      Updates the dialog based on the VOI passed in.
      Parameters:
      _voi - VOI whose properties we want to calculate.
      img - Image where voi is to be updated
    • createInputParameters

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

      public ParameterTable createOutputParameters()
      Description copied from interface: ActionDiscovery
      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.
    • getActionMetadata

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

      public String getOutputImageName(String imageParamName)
      Description copied from interface: ActionDiscovery
      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()
      Description copied from interface: ActionDiscovery
      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.