Class JDialogMipavOptions

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

public class JDialogMipavOptions extends JDialogBase implements KeyListener
This dialog contains access to MIPAV preferences.
Author:
parsonsd
See Also:
  • Field Details

    • serialVersionUID

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

      JLabel[] labels
      DOCUMENT ME!
    • activeColor

      private JButton activeColor
      DOCUMENT ME!
    • checkOnFrameClose

      private JCheckBox checkOnFrameClose
      DOCUMENT ME!
    • colorChooser

      private JColorChooser colorChooser
      DOCUMENT ME!
    • crosshairChoices

      private JComboBox crosshairChoices
      DOCUMENT ME!
    • crosshairNames

      private String[] crosshairNames
      DOCUMENT ME!
    • multiThreadingEnabledCheckBox

      private JCheckBox multiThreadingEnabledCheckBox
      Multi-Threading Enabled Check Box
    • gpuCompEnabledCheckBox

      private JCheckBox gpuCompEnabledCheckBox
      GPU computing enabled check box
    • gpuInfoButton

      private JButton gpuInfoButton
      DOCUMENT ME!
    • dicomReceiverOnStart

      private JCheckBox dicomReceiverOnStart
      Dicom Receiver check box
    • debugMinorBox

      private JComboBox debugMinorBox
      Box to select logging level for Minor category
    • debugAlgorithmBox

      private JComboBox debugAlgorithmBox
      Box to select logging level for Algorithm category
    • debugFileIOBox

      private JComboBox debugFileIOBox
      Box to select logging level for FileIO category
    • debugCommsBox

      private JComboBox debugCommsBox
      Box to select logging level for Comms category
    • debugScriptingBox

      private JComboBox debugScriptingBox
      Box to select logging level for Scripting category
    • dicomCatcher

      private JCheckBox dicomCatcher
      DOCUMENT ME!
    • displayColorPanel

      private final JPanel displayColorPanel
      DOCUMENT ME!
    • displayPanel

      private final JPanel displayPanel
      MIPAV global options private JPanel globalChangesPanel;.
    • displaySplash

      private JCheckBox displaySplash
      DOCUMENT ME!
    • displayUserInterfacePanel

      private final JPanel displayUserInterfacePanel
      DOCUMENT ME!
    • enableLoggingBox

      private JCheckBox enableLoggingBox
      DOCUMENT ME!
    • fileFilter

      private int fileFilter
      DOCUMENT ME!
    • fileMiscPanel

      private final JPanel fileMiscPanel
      DOCUMENT ME!
    • filePanel

      private final JPanel filePanel
      DOCUMENT ME!
    • fileSavePanel

      private final JPanel fileSavePanel
      DOCUMENT ME!
    • filterButton

      private JButton filterButton
      DOCUMENT ME!
    • editUserDefButton

      private JButton editUserDefButton
      Button to lasunch the Edit User Defined File Types Dialog
    • fontChooser

      private JComboBox fontChooser
      DOCUMENT ME!
    • fontNames

      private String[] fontNames
      DOCUMENT ME!
    • fontSizeField

      private JTextField fontSizeField
      DOCUMENT ME!
    • frameRateField

      private JTextField frameRateField
      DOCUMENT ME!
    • histoForceUBYTE

      private JCheckBox histoForceUBYTE
    • imageChooser

      private JComboBox imageChooser
      DOCUMENT ME!
    • logFileButton

      private JButton logFileButton
      DOCUMENT ME!
    • logFilename

      private String logFilename
      DOCUMENT ME!
    • provenanceCheckBox

      private JCheckBox provenanceCheckBox
      DOCUMENT ME!
    • provenanceFilename

      private String provenanceFilename
    • provenanceFileButton

      private JButton provenanceFileButton
    • provenanceImageCheckBox

      private JCheckBox provenanceImageCheckBox
    • otherPanel

      private final JPanel otherPanel
      DOCUMENT ME!
    • performHeapMaxCheck

      private JCheckBox performHeapMaxCheck
      DOCUMENT ME!
    • pointVOIChoices

      private JComboBox pointVOIChoices
      DOCUMENT ME!
    • preferredActiveColor

      private Color preferredActiveColor
      DOCUMENT ME!
    • preferredCrosshair

      private String preferredCrosshair
      DOCUMENT ME!
    • quickListLevel

      private JComboBox quickListLevel
      DOCUMENT ME!
    • saveAllCheckBox

      private JCheckBox saveAllCheckBox
      DOCUMENT ME!
    • saveDefaultsCheckBox

      private JCheckBox saveDefaultsCheckBox
      DOCUMENT ME!
    • saveLabel

      private JLabel saveLabel
      Label before comboBoxSaveMethod
    • comboBoxSaveImgMethod

      private JComboBox comboBoxSaveImgMethod
      Whether to save .img files as selected by dialog or always as analyze, interfile, or nifti.
    • comboBoxSaveMncMethod

      private JComboBox comboBoxSaveMncMethod
      Whether to save .mnc files as selected by dialog or always as minc1 or minc2.
    • savePromptOverwriteBox

      private JCheckBox savePromptOverwriteBox
      DOCUMENT ME!
    • saveThumbnailCheckBox

      private JCheckBox saveThumbnailCheckBox
      DOCUMENT ME!
    • flipNIFTIReadCheckBox

      private JCheckBox flipNIFTIReadCheckBox
    • fileTempDirField

      private JTextField fileTempDirField
    • fileTempDirBrowseButton

      private JButton fileTempDirBrowseButton
    • showLineVOIAngleBox

      private JCheckBox showLineVOIAngleBox
      DOCUMENT ME!
    • continuousVOIBox

      private JCheckBox continuousVOIBox
    • VOIGroup

      private ButtonGroup VOIGroup
    • saveVOILPSButton

      private JRadioButton saveVOILPSButton
    • saveVOIVoxelButton

      private JRadioButton saveVOIVoxelButton
    • showOutputWindow

      private JCheckBox showOutputWindow
      DOCUMENT ME!
    • tabbedPane

      private final JTabbedPane tabbedPane
      DOCUMENT ME!
    • userInterface

      private final ViewUserInterface userInterface
      ui must be set to access the list of images to set image-specfic options (ie,. log mode)
    • voiColorChoices

      private JComboBox voiColorChoices
      DOCUMENT ME!
    • voiColorNames

      private String[] voiColorNames
      DOCUMENT ME!
    • voiColors

      private Color[] voiColors
      DOCUMENT ME!
    • voiDrawButton

      private JButton voiDrawButton
      DOCUMENT ME!
    • intensityLabelColorButton

      private JButton intensityLabelColorButton
      DOCUMENT ME!
    • intensityLabelBackgroundButton

      private JButton intensityLabelBackgroundButton
      DOCUMENT ME!
    • voiDrawColor

      private Color voiDrawColor
      DOCUMENT ME!
    • intensityLabelColor

      private Color intensityLabelColor
      DOCUMENT ME!
    • intensityLabelBackgroundColor

      private Color intensityLabelBackgroundColor
      DOCUMENT ME!
    • doIntensityOnLeftBox

      private JCheckBox doIntensityOnLeftBox
      Check boxes for whether right and left mouse clicks produce default actions.
    • doWinLevOnRightBox

      private JCheckBox doWinLevOnRightBox
      Check boxes for whether right and left mouse clicks produce default actions.
    • WindowLevelGroup

      private ButtonGroup WindowLevelGroup
    • relativeWindowLevelButton

      private JRadioButton relativeWindowLevelButton
    • absoluteWindowLevelButton

      private JRadioButton absoluteWindowLevelButton
    • openImagesInTiledFormatBox

      private JCheckBox openImagesInTiledFormatBox
      opens images in tiled format
    • displayImagePanel

      private final JPanel displayImagePanel
      Gives user choices for displaying complex images.
    • complexDisplayChoices

      private JComboBox complexDisplayChoices
      The available choices for displaying the numerical values of complex data
    • defaultDisplayChoices

      private JComboBox defaultDisplayChoices
      Available choices for displaying brightness/color display correlations for pixel values.
    • displayLogMag

      private JCheckBox displayLogMag
      The check box to indicate whether images are displayed using the log of their magnitude
    • activeImageColorBorderSize

      private JComboBox activeImageColorBorderSize
      border size for active image color
    • displayHistogram

      private JCheckBox displayHistogram
      Whether images are updated in real-time based on histogram changes.
    • interpolateDisplayChoices

      private JComboBox interpolateDisplayChoices
      Available options for image interpolation
    • resetButton

      private JButton resetButton
      Button used to reset all preferences to default state.
    • displayLUT

      private JCheckBox displayLUT
      Whether to auto-display lut associated with file.
    • lfDisplayChoices

      private JComboBox lfDisplayChoices
      Look and feel choices.
    • maxDebugLineField

      private JTextField maxDebugLineField
  • Constructor Details

    • JDialogMipavOptions

      public JDialogMipavOptions()
      creates a dialog, builds in the options:
      1. splash page option
      2. Swing file-dialog option
      3. Active image color high-light option
      4. Debugging options

      It then builds in the Apply and Close (window) buttons and makes the dialog visible.

  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Calls various methods based on the user's actions.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      event - Event that triggered this function.
    • reloadComplexImages

      private void reloadComplexImages(String beforeComplexDisplayChoice, boolean beforeDoLogMagChoice)
      Evaluates whether the user preferences which control complex image loading have changed in a way that requires reloading of all complex images
    • fillChooser

      public void fillChooser()
      no information available.
    • itemStateChanged

      public void itemStateChanged(ItemEvent e)
      DOCUMENT ME!
      Specified by:
      itemStateChanged in interface ItemListener
      Overrides:
      itemStateChanged in class JDialogBase
      Parameters:
      e - DOCUMENT ME!
    • keyPressed

      public void keyPressed(KeyEvent e)
      DOCUMENT ME!
      Specified by:
      keyPressed in interface KeyListener
      Parameters:
      e - DOCUMENT ME!
    • keyReleased

      public void keyReleased(KeyEvent e)
      DOCUMENT ME!
      Specified by:
      keyReleased in interface KeyListener
      Parameters:
      e - DOCUMENT ME!
    • keyTyped

      public void keyTyped(KeyEvent e)
      DOCUMENT ME!
      Specified by:
      keyTyped in interface KeyListener
      Parameters:
      e - DOCUMENT ME!
    • showPane

      public void showPane(String name)
      Displays the panel with the given name.
    • makeActiveColorOptions

      protected void makeActiveColorOptions(GridBagConstraints gbc, GridBagLayout gbl)
      makes the active-colour option line in the globalChangesPanel, to allow user to select the colour used to denote the active image. Sets the colour to either the colour in the preferences file or to the MIPAV default.
      Parameters:
      gbc - the constraints used in the globalChangesPanel
      gbl - the layout used in the globablChangesPanel
    • makeActiveColorBorderSizeOptions

      protected void makeActiveColorBorderSizeOptions(GridBagConstraints gbc, GridBagLayout gbl)
    • makeApplyClosePanel

      protected JPanel makeApplyClosePanel()
      makes the Apply/Close button panel, with the Apply button on the left and the Close button on the right.

      The panel is created and organised, but not applied anywhere.

      Returns:
      the Panel made.
    • makeCheckOnCloseFrameOptions

      protected void makeCheckOnCloseFrameOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes the "Check on frame close" option line in the globalChangesPanel If checked the user is required to reply to a dialog to close the frame. If unchecked the frame is closed and data my be lost.
      Parameters:
      gbc - the constraints used in the globalChangesPanel
      gbl - the layout used in the globablChangesPanel
    • makeLFOptions

      protected void makeLFOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes option for look and feel
    • makeDefaultLoadImageOptions

      protected void makeDefaultLoadImageOptions(GridBagConstraints gbc2, GridBagLayout gbl)
      Makes the options for displaying how images should be displayed on default.
    • makeComplexImageOptions

      protected void makeComplexImageOptions(GridBagConstraints gbc2, GridBagLayout gbl)
      Makes the options for displaying complex image information
      Parameters:
      gbc2 - GridBagConstraints
      gbl - GridBagLayout
    • makeLUTImageOptions

      protected void makeLUTImageOptions(GridBagConstraints gbc2, GridBagLayout gbl)
      Makes checkbox for whether to display image using lut that is modality or image specific.
    • makeLogMagImageOptions

      protected void makeLogMagImageOptions(GridBagConstraints gbc2, GridBagLayout gbl)
      Makes checkbox for whether to display the log of image magnitude on user's screen
    • makeInterpolateImageOptions

      protected void makeInterpolateImageOptions(GridBagConstraints gbc2, GridBagLayout gbl)
      Makes checkbox for whether to display the image with interpolation on user's screen
    • makeHistogramImageOptions

      protected void makeHistogramImageOptions(GridBagConstraints gbc2, GridBagLayout gbl)
      Makes checkbox for whether to update image in real-time as histogram luts are changed
    • makeUbyteHistoOptions

      protected void makeUbyteHistoOptions(GridBagConstraints gbc2, GridBagLayout gbl)
    • makeCrosshairOptions

      protected void makeCrosshairOptions(GridBagConstraints gbc2, GridBagLayout gbl)
      Makes the options for crosshair display.
      Parameters:
      gbc2 - GridBagConstraints
      gbl - GridBagLayout
    • makeDebugOptions

      protected void makeDebugOptions(GridBagConstraints gbc, GridBagLayout gbl)
      makes the debug option line in the globalChangesPanel.
      Parameters:
      gbc - the constraints used in the globalChangesPanel
      gbl - the layout used in the globablChangesPanel
    • makeDebugOptionsHelper

      private void makeDebugOptionsHelper(JPanel panel, String label, JComboBox comboBox, Preferences.LogLevel currentLevel)
    • makeMaxDebugLineOptions

      protected void makeMaxDebugLineOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes options for max number of lines in debug panel
      Parameters:
      gbc - GridBagConstraints
      gbl - GridBagLayout
    • makeFileFilterOptions

      protected void makeFileFilterOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes the file filter option line in the globalChangesPanel.
      Parameters:
      gbc - the constraints used in the globalChangesPanel
      gbl - the layout used in the globablChangesPanel
    • makeFileTemporaryDirectory

      protected void makeFileTemporaryDirectory(GridBagConstraints gbc, GridBagLayout gbl)
      Makes the temporary file directory fields in fileMiscPanel.
      Parameters:
      gbc - the constraints used in the globalChangesPanel
      gbl - the layout used in the globablChangesPanel
    • makeFontOptions

      protected void makeFontOptions(GridBagConstraints gbc, GridBagLayout gbl)
      DOCUMENT ME!
      Parameters:
      gbc - DOCUMENT ME!
      gbl - DOCUMENT ME!
    • makeMouseClickOptions

      protected void makeMouseClickOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes options for how user interface will react when the left or right mouse buttons are clicked.
      Parameters:
      gbc - DOCUMENT ME!
      gbl - DOCUMENT ME!
    • makeWindowLevelOptions

      protected void makeWindowLevelOptions(GridBagConstraints gbc, GridBagLayout gbl)
    • makeFrameRateOptions

      protected void makeFrameRateOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes options for default frame rate for saving AVIs.
      Parameters:
      gbc - GridBagConstraints
      gbl - GridBagLayout
    • makeHeapMaxCheckOptions

      protected void makeHeapMaxCheckOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes the "VM Heap Max/Preferences memory check" option line in the globalChangesPanel If checked, the initial heap size and maximum heap size in the VM startup file is checked against what is in the preferences for this option. If unchecked, it signifies that no check should be made.
      Parameters:
      gbc - the constraints used in the globalChangesPanel
      gbl - the layout used in the globablChangesPanel
    • makeLoggingOptions

      protected void makeLoggingOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes the Logging option line with checkbox/button in the globalChangesPanel.
      Parameters:
      gbc - the constraints used in the globalChangesPanel
      gbl - the layout used in the globablChangesPanel
    • makeProvenanceOptions

      protected void makeProvenanceOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes the Data provenance option line in the globalChangesPanel.
      Parameters:
      gbc - the constraints used in the globalChangesPanel
      gbl - the layout used in the globablChangesPanel
    • makeNumericsOnly

      protected void makeNumericsOnly(JTextField txt)
      takes a txt field, and forces the textfield to accept numbers, backspace, period and delete-key entries.
      Parameters:
      txt - DOCUMENT ME!
    • makeOutputWindowOptions

      protected void makeOutputWindowOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes the checkbox where the user can decide whether the output window should appear on startup.
      Parameters:
      gbc - the constraints used in the globalChangesPanel
      gbl - the layout used in the globablChangesPanel
    • makeQuickListOptions

      protected void makeQuickListOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes the quicklist option line in the otherPanel.
      Parameters:
      gbc - the constraints used in the otherPanel
      gbl - the layout used in the globablChangesPanel
    • makeSaveAllOptions

      protected void makeSaveAllOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes the "Save All on Save" option line in the otherPanel.
      Parameters:
      gbc - the constraints used in the otherPanel
      gbl - the layout used in the globablChangesPanel
    • makeSaveDefaultsOptions

      protected void makeSaveDefaultsOptions(GridBagConstraints gbc, GridBagLayout gbl)
      makes the "Save dialog defaults" option line in the otherPanel.
      Parameters:
      gbc - GridBagConstraints the contraints
      gbl - GridBagLayout the layout...
    • makeDicomReceiverOnStartOptions

      protected void makeDicomReceiverOnStartOptions(GridBagConstraints gbc, GridBagLayout gbl)
    • makeMultiThreadingEnabledOptions

      protected void makeMultiThreadingEnabledOptions(GridBagConstraints gbc, GridBagLayout gbl)
    • makeGpuCompEnabledOptions

      protected void makeGpuCompEnabledOptions(GridBagConstraints gbc, GridBagLayout gbl)
    • makeSaveHdrImgOptions

      protected void makeSaveHdrImgOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes the "Always save .hdr/.img files from dialog/ in Analyze format/ in Interfile format/ in Nifti format" combo box in the otherPanel.
      Parameters:
      gbc - the constraints used in the globalChangesPanel
      gbl - the layout used in the globbalChangesPanel
    • makeSaveMncOptions

      protected void makeSaveMncOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes the "Always save .mnc files from dialog/ in Minc-1.0 CDF format/ in Minc-2.0 HDF5 format" combo box in the otherPanel.
      Parameters:
      gbc - the constraints used in the globalChangesPanel
      gbl - the layout used in the globbalChangesPanel
    • makeSaveOverwriteOptions

      protected void makeSaveOverwriteOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes the option to prompt on overwrite for saving.
      Parameters:
      gbc - GridBagConstraints
      gbl - GridBagLayout
    • makeSaveXMLThumbnailOptions

      protected void makeSaveXMLThumbnailOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes the "Save Thumbnail for XML Files" option line in the globalChangesPanel.
      Parameters:
      gbc - the constraints used in the globalChangesPanel
      gbl - the layout used in the globablChangesPanel
    • makeFlipNIFTIReadOptions

      protected void makeFlipNIFTIReadOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes the "Flip Y axis on NIFTI read of IS and PA" option line in the globalChangesPanel.
      Parameters:
      gbc - the constraints used in the globalChangesPanel
      gbl - the layout used in the globablChangesPanel
    • makeSplashOptions

      protected void makeSplashOptions(GridBagConstraints gbc, GridBagLayout gbl)
      makes the splash-screen option line in the otherPanel.
      Parameters:
      gbc - the constraints used in the otherPanel
      gbl - the layout used in the globablChangesPanel
    • makeVOIColorOptions

      protected void makeVOIColorOptions(GridBagConstraints gbc2, GridBagLayout gbl)
      DOCUMENT ME!
      Parameters:
      gbc2 - DOCUMENT ME!
      gbl - DOCUMENT ME!
    • makeIntensityLabelColorOptions

      protected void makeIntensityLabelColorOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes the drop down list for color options for the intensity label text color
      Parameters:
      gbl -
      gbc2 -
    • makeVOIDrawColorOptions

      protected void makeVOIDrawColorOptions(GridBagConstraints gbc, GridBagLayout gbl)
      DOCUMENT ME!
      Parameters:
      gbc - DOCUMENT ME!
      gbl - DOCUMENT ME!
    • makeVOILineAngleOptions

      protected void makeVOILineAngleOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes the options for displaying the angle for active line VOIs.
      Parameters:
      gbc - GridBagConstraints
      gbl - GridBagLayout
    • makeVOIContinuousOptions

      protected void makeVOIContinuousOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Makes the options for displaying the angle for active line VOIs.
      Parameters:
      gbc - GridBagConstraints
      gbl - GridBagLayout
    • makeVOISaveLPSOptions

      protected void makeVOISaveLPSOptions(GridBagConstraints gbc, GridBagLayout gbl)
    • makeVOIPointDrawTypeOptions

      protected void makeVOIPointDrawTypeOptions(GridBagConstraints gbc, GridBagLayout gbl)
      Sets the graphic type for VOI points (4 types, each with a corresponding gif).
      Parameters:
      gbc - GridBagConstraints the constraints
      gbl - GridBagLayout the layout
    • buildResetDefaultsButton

      protected JButton buildResetDefaultsButton()
      Builds the reset to defaults button. Sets it internally as well return the just-built button.
      Returns:
      JButton reset defaults button