Class Preferences

java.lang.Object
gov.nih.mipav.view.Preferences

public class Preferences extends Object
This class reads the MIPAV preference file. The preference file stores a number of user specific parameters of the application. It is stored in the invalid input: '<' user directory >/mipav directory so that it can be read and written to by the user. It is a text file and can be manually edited - not recommended.
  • Field Details

    • PREF_SAVE_ALL_ON_SAVE

      public static final String PREF_SAVE_ALL_ON_SAVE
      Constant that indicates use of saving images, vois, and transfer functions.
      See Also:
    • PREF_SAVE_XML_THUMBNAIL

      public static final String PREF_SAVE_XML_THUMBNAIL
      Constant that indicates the saving of the xml thumbnail during a save.
      See Also:
    • PREF_FLIP_NIFTI_READ

      public static final String PREF_FLIP_NIFTI_READ
      See Also:
    • PREF_FILE_TEMP_DIR

      public static final String PREF_FILE_TEMP_DIR
      Constant that indicates the file temp directory.
      See Also:
    • PREF_LAX_CHECK

      public static final String PREF_LAX_CHECK
      Constant that indicates if lax file should be checked on mipav start.
      See Also:
    • PREF_CLOSE_FRAME_CHECK

      public static final String PREF_CLOSE_FRAME_CHECK
      Constant that indicates if user should be prompted on closing a frame.
      See Also:
    • PREF_OVERWRITE_VOI_STATS

      public static final String PREF_OVERWRITE_VOI_STATS
      Constant indicating if VOI statistics file should be overwritten.
      See Also:
    • PREF_DATA_PROVENANCE

      public static final String PREF_DATA_PROVENANCE
      Constant that indicates if data provenance is turned on.
      See Also:
    • PREF_IMAGE_LEVEL_DATA_PROVENANCE

      public static final String PREF_IMAGE_LEVEL_DATA_PROVENANCE
      Constant that indicates if data provenance is turned on for individual images (and saved on image-save).
      See Also:
    • PREF_DATA_PROVENANCE_FILENAME

      public static final String PREF_DATA_PROVENANCE_FILENAME
      Constant that indicates the path where the system data provenance should be stored
      See Also:
    • PREF_DEBUG

      public static final String PREF_DEBUG
      Constant for debug string.
      See Also:
    • PREF_LOGGING_ENABLED

      public static final String PREF_LOGGING_ENABLED
      Constant for whether logging is enabled
      See Also:
    • PREF_QUICK_MASK_NEW

      public static final String PREF_QUICK_MASK_NEW
      Constant that indicates if the Quick Mask operation should output to a new image
      See Also:
    • PREF_PAINT_TO_MASK_NEW

      public static final String PREF_PAINT_TO_MASK_NEW
      Constant that indicates if the Paint-to-Mask operation should output to a new image
      See Also:
    • PREF_ZOOM_LINEAR

      public static final String PREF_ZOOM_LINEAR
      Constant that indicates if the zoom should be linear (otherwise geometric)
      See Also:
    • PREF_INTENSITY_LABEL_COLOR

      public static final String PREF_INTENSITY_LABEL_COLOR
      Constant that indicates the intensity label color.
      See Also:
    • PREF_INTENSITY_LABEL_BACKGROUND_COLOR

      public static final String PREF_INTENSITY_LABEL_BACKGROUND_COLOR
      Constant that indicates the intensity label background color.
      See Also:
    • PREF_DEFAULT_FRAME_RATE

      public static final String PREF_DEFAULT_FRAME_RATE
      Constant that indicates the default frame rate
      See Also:
    • PREF_SAVE_DEFAULTS

      public static final String PREF_SAVE_DEFAULTS
      Constant that indicates if the last used parameters for algorithm dialogs should be used when they are opened.
      See Also:
    • PREF_SAVE_PROMPT_OVERWRITE

      public static final String PREF_SAVE_PROMPT_OVERWRITE
      Constant that indicates if a prompt should be shown before an image file is overwritten.
      See Also:
    • PREF_SHOW_DICOM_OVERLAYS

      public static final String PREF_SHOW_DICOM_OVERLAYS
      Constant that indicates if the DICOM overlay should be shown.
      See Also:
    • PREF_SHOW_IMAGE_OVERLAYS

      public static final String PREF_SHOW_IMAGE_OVERLAYS
      Constant that indicates if the image overlay should be shown.
      See Also:
    • PREF_SHOW_PAINT_BORDER

      public static final String PREF_SHOW_PAINT_BORDER
      Constant that indicates if the paint border shown.
      See Also:
    • PREF_SHOW_PRIVATE_TAGS

      public static final String PREF_SHOW_PRIVATE_TAGS
      Constant that indicates if the private DICOM tags are to be shown
      See Also:
    • PREF_SHOW_SPLASH

      public static final String PREF_SHOW_SPLASH
      Constant that indicates if the splash graphic should be shown when mipav starts.
      See Also:
    • PREF_SHOW_UI_LF

      public static final String PREF_SHOW_UI_LF
      Class name for selected look and feel type, can also be "None" (default selection)
      See Also:
    • PREF_LOG_FILENAME

      public static final String PREF_LOG_FILENAME
      Constant that indicates the pathname of the log file.
      See Also:
    • PREF_IMAGE_TOOLBAR_ON

      public static final String PREF_IMAGE_TOOLBAR_ON
      Constant identifying if the miscellaneous toolbar is on by default.
      See Also:
    • PREF_PAINT_TOOLBAR_ON

      public static final String PREF_PAINT_TOOLBAR_ON
      Constant indicating if the Paint Toolbar is on by default.
      See Also:
    • PREF_SCRIPTING_TOOLBAR_ON

      public static final String PREF_SCRIPTING_TOOLBAR_ON
      Constant that indicates if the Scripting toolbar should be shown by default.
      See Also:
    • PREF_VOI_TOOLBAR_ON

      public static final String PREF_VOI_TOOLBAR_ON
      Constant indicating if the VOI Toolbar is on by default.
      See Also:
    • PREF_SHORTCUTS

      public static final String PREF_SHORTCUTS
      Constant indicating the application shortcuts (user defined).
      See Also:
    • PREF_DICOM_BROWSER_CONFIG

      public static final String PREF_DICOM_BROWSER_CONFIG
      Constant indicating the DICOM browser configuration.
      See Also:
    • PREF_FAST_TRIPLANAR_REPAINT

      public static final String PREF_FAST_TRIPLANAR_REPAINT
      Constant that indicates whether the triplanar frame should wait for a mouse released event before repainting all 9 tri-planar images. Inserted here because repainting 9 images in real time gets to be tedious.
      See Also:
    • PREF_TRIPLANAR_SNAP90

      public static final String PREF_TRIPLANAR_SNAP90
      Constant that indicates if triplanar protractor should snap to nearest multiple of 90 degrees.
      See Also:
    • PREF_TRIPLANAR_SCROLL_ORIGINAL

      public static final String PREF_TRIPLANAR_SCROLL_ORIGINAL
      Constant that indicates if the triplanar should scroll the original image
      See Also:
    • PREF_SHOW_LINE_ANGLE

      public static final String PREF_SHOW_LINE_ANGLE
      Constant that indicates whether the angle of line VOIs should be shown on screen.
      See Also:
    • PREF_CONTINUOUS_VOI_CONTOUR

      public static final String PREF_CONTINUOUS_VOI_CONTOUR
      Constant that indicates whether [SHIFT] must be held down to draw continuous contours (false = hold-shift).
      See Also:
    • PREF_VOI_POINT_DRAW_TYPE

      public static final String PREF_VOI_POINT_DRAW_TYPE
      Constant indicating the look of VOI Points drawn on an image.
      See Also:
    • PREF_VOI_LPS_SAVE

      public static final String PREF_VOI_LPS_SAVE
      Constant indicating if VOIs should be saved as LPS or file coordinates
      See Also:
    • PREF_TRIPLANAR_2X2_LAYOUT

      public static final String PREF_TRIPLANAR_2X2_LAYOUT
      Constant that indicates whether the triplanar frame should use the old 2x2 layout or the newer 3x1 layout.
      See Also:
    • PREF_CROSSHAIR_PIXEL_GAP

      public static final String PREF_CROSSHAIR_PIXEL_GAP
      Constant that indicates the pixel gap away from the center of the crosshair (in one direction) actual gap is 2x.
      See Also:
    • PREF_MENU_FONT

      public static final String PREF_MENU_FONT
      Constant that indicates the menu font.
      See Also:
    • PREF_MENU_FONT_SIZE

      public static final String PREF_MENU_FONT_SIZE
      Constant that indicates the menu font size.
      See Also:
    • PREF_MENU_FONT_COLOR

      public static final String PREF_MENU_FONT_COLOR
      Constant that indicates the menu font color.
      See Also:
    • PREF_SHOW_VOI_NAME

      public static final String PREF_SHOW_VOI_NAME
      Constant that indicates whether to show the VOI name.
      See Also:
    • PREF_SHOW_OUTPUT

      public static final String PREF_SHOW_OUTPUT
      Constant that indicates whether to show output.
      See Also:
    • PREF_LAST_STACK_FLAG

      public static final String PREF_LAST_STACK_FLAG
      Constant that indicates the last stack flag.
      See Also:
    • PREF_DEFAULT_IMAGE_BROWSER_DIR

      public static final String PREF_DEFAULT_IMAGE_BROWSER_DIR
      Constant that indicates the initial directory in which to open the file chooser of the image browser.
      See Also:
    • PREF_MULTI_THREADING_ENABLED

      public static final String PREF_MULTI_THREADING_ENABLED
      Constant that indicated if the multi-theading is enabled
      See Also:
    • PREF_GPU_COMP_ENABLED

      public static final String PREF_GPU_COMP_ENABLED
      Constant that indicates if computing on the GPU is enabled
      See Also:
    • PREF_NUMBER_OF_THREADS

      public static final String PREF_NUMBER_OF_THREADS
      Constant that specifies how many system threads user would like MIPAV to use
      See Also:
    • PREF_SHOW_INTENSITY_ON_LEFT_CLICK

      public static final String PREF_SHOW_INTENSITY_ON_LEFT_CLICK
      Constant that indicates if left mouse click inside image should cause intensity value to display
      See Also:
    • PREF_SHOW_WINLEV_ON_RIGHT_CLICK

      public static final String PREF_SHOW_WINLEV_ON_RIGHT_CLICK
      Constant that indicates if right mouse click inside image should cause window/level changes
      See Also:
    • PREF_RELATIVE_WINDOW_LEVEL

      public static final String PREF_RELATIVE_WINDOW_LEVEL
      Constant that indicates if window/level changes should be relative to the current transfer function values
      See Also:
    • PREF_OPEN_IMAGES_IN_TILED_FORMAT

      public static final String PREF_OPEN_IMAGES_IN_TILED_FORMAT
      Constant that indicates if images are to be open im tiled format
      See Also:
    • PREF_LAST_PAINT_BRUSH

      public static final String PREF_LAST_PAINT_BRUSH
      Constant that indicates the last used paint brush so that it will be set as the default when new images are opened or mipav is restarted.
      See Also:
    • PREF_USER_FILETYPE_ASSOC

      public static final String PREF_USER_FILETYPE_ASSOC
      Constant that indicates the user defined file type associations.
      See Also:
    • PREF_USER_FILETYPES

      public static final String PREF_USER_FILETYPES
      Constant that indicates the user defined file types.
      See Also:
    • PREF_USER_FILETYPES_TEXTFIELDS

      public static final String PREF_USER_FILETYPES_TEXTFIELDS
      ?
      See Also:
    • PREF_FILENAME_FILTER

      public static final String PREF_FILENAME_FILTER
      Constant that indicates the filename filter.
      See Also:
    • PREF_IMAGE_DIR

      public static final String PREF_IMAGE_DIR
      Constant that indicates the current image directory.
      See Also:
    • PREF_PLUGIN_INSTALL_DIR

      public static final String PREF_PLUGIN_INSTALL_DIR
      Constant that indicates the current directory where plugins can be installed from.
      See Also:
    • PREF_VOI_TEXT_COLOR

      public static final String PREF_VOI_TEXT_COLOR
      Constant that indicates the last used VOI text color.
      See Also:
    • PREF_VOI_TEXT_BACKGROUND_COLOR

      public static final String PREF_VOI_TEXT_BACKGROUND_COLOR
      Constant that indicates the last used VOI text background color.
      See Also:
    • PREF_DICOM_STORAGE_DIR

      public static final String PREF_DICOM_STORAGE_DIR
      Constant that indicates the default dicom storage directory.
      See Also:
    • PREF_AUTOSTART_DICOM_RECEIVER

      public static final String PREF_AUTOSTART_DICOM_RECEIVER
      Constant that indicates whether to enable the dicom receiver on startup.
      See Also:
    • PREF_ASK_DICOM_RECEIVER

      public static final String PREF_ASK_DICOM_RECEIVER
      Constant that indicates whether to ask about starting dicom receiver on startup.
      See Also:
    • PREF_ACTIVE_IMAGE_COLOR

      public static final String PREF_ACTIVE_IMAGE_COLOR
      Constant that indicates the active image color.
      See Also:
    • PREF_ACTIVE_IMAGE_COLOR_BORDERSIZE

      public static final String PREF_ACTIVE_IMAGE_COLOR_BORDERSIZE
      Constant that indicates the active image color border size
      See Also:
    • PREF_QUICKLIST_NUMBER

      public static final String PREF_QUICKLIST_NUMBER
      number of recently used images to store in quicklist.
      See Also:
    • PREF_LAST_X_IMAGES

      public static final String PREF_LAST_X_IMAGES
      constant for the names of the last X number of images used to be shown in quicklist.
      See Also:
    • PREF_WARN_AUDIO_AVI

      public static final String PREF_WARN_AUDIO_AVI
      constant for warning the user when audio will be discarded from opened AVIs.
      See Also:
    • PREF_OVERWRITE_STATISTICS

      public static final String PREF_OVERWRITE_STATISTICS
      constant on whether to overwrite the voi statistics file automatically
      See Also:
    • PREF_CROSSHAIR_CURSOR

      public static final String PREF_CROSSHAIR_CURSOR
      Constant that indicates the crosshair cursor to be used.
      See Also:
    • PREF_DEFAULT_DISPLAY

      public static final String PREF_DEFAULT_DISPLAY
      Constant to indicate default brightness and color display to screen
      See Also:
    • PREF_COMPLEX_DISPLAY

      public static final String PREF_COMPLEX_DISPLAY
      Constant that indicates method used to display complex data values on MIPAV toolbar (MIPAV visually always shows magnitude or log magnitude).
      See Also:
    • PREF_LOGMAG_DISPLAY

      public static final String PREF_LOGMAG_DISPLAY
      Constant that indicates whether the log of the magnitude of an image is used for image display
      See Also:
    • PREF_AFNI_ORDER_LOAD

      public static final String PREF_AFNI_ORDER_LOAD
      Constant that indicates whether DICOM ordering should be used by default for loading AFNI images
      See Also:
    • PREF_FILE_LUT_DISPLAY

      public static final String PREF_FILE_LUT_DISPLAY
      Constant that indicates whether image will display using a stored LUT (from image file or generic to image type)
      See Also:
    • PREF_INTERPOLATE_MODE

      public static final String PREF_INTERPOLATE_MODE
      Constant that indicates the mode of image interpolation used for display
      See Also:
    • PREF_HISTOGRAM_DISPLAY

      public static final String PREF_HISTOGRAM_DISPLAY
      Constant that indicates whether image is updated in real-time on histogram changes
      See Also:
    • PREF_TRIM_VOI

      public static final String PREF_TRIM_VOI
      Constant that indicates the VOI Trim level variable.
      See Also:
    • PREF_TRIM_MASK

      public static final String PREF_TRIM_MASK
      Constant that indicates the mask trim level variable.
      See Also:
    • PREF_TRIM_FLAG

      public static final String PREF_TRIM_FLAG
      Constant that indicates the VOI Trim flag for trimming adjacent points.
      See Also:
    • PREF_VOI_THICKNESS

      public static final String PREF_VOI_THICKNESS
      Constant indicating the VOI Thickness.
      See Also:
    • PREF_VOI_DRAW_COLOR

      public static final String PREF_VOI_DRAW_COLOR
      the voi draw color constant.
      See Also:
    • PREF_VOI_START_COLOR

      public static final String PREF_VOI_START_COLOR
      the starting color for VOIs (first drawn).
      See Also:
    • PREF_DATA_PROVENANCE_MODE

      public static final String PREF_DATA_PROVENANCE_MODE
      constant for logging.
      See Also:
    • PREF_RGB_PAINT_COMPONENTS

      public static final String PREF_RGB_PAINT_COMPONENTS
      Constant indicating which channels should be used for applying paint to a RGB image
      See Also:
    • PREF_ALWAYS_SAVE_IMG_AS_ANALYZE

      public static final String PREF_ALWAYS_SAVE_IMG_AS_ANALYZE
      Constant that indicates whether .hdr/.img files should always be written in analyze format (as opposed to asking whether to save as interfile or nifti).
      See Also:
    • PREF_ALWAYS_SAVE_IMG_AS_INTERFILE

      public static final String PREF_ALWAYS_SAVE_IMG_AS_INTERFILE
      Constant that indicates whether .hdr/.img files should always be written in interfile format (as opposed to asking whether to save as analyze or nifti).
      See Also:
    • PREF_ALWAYS_SAVE_IMG_AS_NIFTI

      public static final String PREF_ALWAYS_SAVE_IMG_AS_NIFTI
      Constant that indicates whether .hdr/.img files should always be written in nifti format (as opposed to asking whether to save as analyze or interfile).
      See Also:
    • PREF_ALWAYS_SAVE_MNC_AS_MINC1

      public static final String PREF_ALWAYS_SAVE_MNC_AS_MINC1
      Constant that indicates whether .mnc files should always be written in minc1 CDF format (as opposed to asking whether to save as minc1 or minc2).
      See Also:
    • PREF_ALWAYS_SAVE_MNC_AS_MINC2

      public static final String PREF_ALWAYS_SAVE_MNC_AS_MINC2
      Constant that indicates whether .mnc files should always be written in minc2 HDF5 format (as opposed to asking whether to save as minc1 or minc2).
      See Also:
    • PREF_SCRIPT_DIR

      public static final String PREF_SCRIPT_DIR
      Constant that indicates the script directory.
      See Also:
    • PREF_LAST_SCRIPT

      public static final String PREF_LAST_SCRIPT
      Constant that indicates the last script that was run.
      See Also:
    • PREF_DICOM_SAVE_DICTIONARY

      public static final String PREF_DICOM_SAVE_DICTIONARY
      constant that indicates the dicom save dictionary.
      See Also:
    • PREF_STARTING_HEAP_SIZE

      public static final String PREF_STARTING_HEAP_SIZE
      The starting heap size.
      See Also:
    • PREF_MAX_HEAP_SIZE

      public static final String PREF_MAX_HEAP_SIZE
      The maximum heap size.
      See Also:
    • PREF_RAW_EXTENTS

      public static final String PREF_RAW_EXTENTS
      Constant that indicates the default raw image extents.
      See Also:
    • PREF_RAW_BIG_ENDIAN

      public static final String PREF_RAW_BIG_ENDIAN
      Constant that indicates the default raw image big endian.
      See Also:
    • PREF_RAW_RESOLUTIONS

      public static final String PREF_RAW_RESOLUTIONS
      Constant that indicates the default raw image resolutions.
      See Also:
    • PREF_RAW_UNITS

      public static final String PREF_RAW_UNITS
      Constant that indicates the default raw image units.
      See Also:
    • PREF_RAW_TYPE

      public static final String PREF_RAW_TYPE
      Constant that indicates the default raw image type.
      See Also:
    • PREF_RAW_DATA_OFFSET

      public static final String PREF_RAW_DATA_OFFSET
      Constant that indicates the default raw image data offset.
      See Also:
    • PREF_LB_ROW_DEPENDENT

      public static final String PREF_LB_ROW_DEPENDENT
      Constant that indicates the LightBox row dependant variable.
      See Also:
    • PREF_LB_GRID_ROW

      public static final String PREF_LB_GRID_ROW
      Constant that indicates the LightBox grid row variable.
      See Also:
    • PREF_LB_GRID_COL

      public static final String PREF_LB_GRID_COL
      Constant that indicates the LightBox grid column variable.
      See Also:
    • PREF_LB_GRID_SIZE

      public static final String PREF_LB_GRID_SIZE
      Constant that indicates the LightBox grid size variable.
      See Also:
    • PREF_LB_INCREMENT

      public static final String PREF_LB_INCREMENT
      Constant that indicates the increment between displayed lightbox slices
      See Also:
    • PREF_LB_GRID_COLOR

      public static final String PREF_LB_GRID_COLOR
      Constant that indicates the LightBox grid color variable.
      See Also:
    • PREF_LB_BORDER_SIZE

      public static final String PREF_LB_BORDER_SIZE
      Constant that indicates the LightBox border size variable.
      See Also:
    • PREF_LB_BORDER_COLOR

      public static final String PREF_LB_BORDER_COLOR
      Constant that indicates the LightBox border color variable.
      See Also:
    • PREF_LB_SELECTED_BORDER_SIZE

      public static final String PREF_LB_SELECTED_BORDER_SIZE
      Constant that indicates the LightBox selected border size variable.
      See Also:
    • PREF_LB_SELECTED_BORDER_COLOR

      public static final String PREF_LB_SELECTED_BORDER_COLOR
      Constant that indicates the LightBox selected border color variable.
      See Also:
    • PREF_LB_MAG

      public static final String PREF_LB_MAG
      Constant that indicates the LightBox magnification variable.
      See Also:
    • PREF_LB_LOCATION

      public static final String PREF_LB_LOCATION
      Constant that indicates the LightBox location variable.
      See Also:
    • PREF_LB_TSLICE

      public static final String PREF_LB_TSLICE
      Constant that indicates the LightBox individual t-slice variable.
      See Also:
    • PREF_LB_CUPDATE

      public static final String PREF_LB_CUPDATE
      Constant that indicates continuous update of LightBox
      See Also:
    • PREF_APP_TITLE

      public static final String PREF_APP_TITLE
      Constant that indicates the application title.
      See Also:
    • PREF_APP_ICON

      public static final String PREF_APP_ICON
      Constant that indicates the application icon.
      See Also:
    • PREF_SHOW_OVERLAYS

      public static final String PREF_SHOW_OVERLAYS
      Constant that indicates whether to show image overlays.
      See Also:
    • PREF_PLUGIN_ALGORITHM

      public static final String PREF_PLUGIN_ALGORITHM
      plugin of algorithm type.
      See Also:
    • PREF_PLUGIN_FILE

      public static final String PREF_PLUGIN_FILE
      plugin of file type.
      See Also:
    • PREF_PLUGIN_VIEW

      public static final String PREF_PLUGIN_VIEW
      plugin of view type.
      See Also:
    • PREF_NINDS_ANON_PLUGIN_INPUTDIR

      public static final String PREF_NINDS_ANON_PLUGIN_INPUTDIR
      ?
      See Also:
    • PREF_NINDS_ANON_PLUGIN_OUTPUTDIR

      public static final String PREF_NINDS_ANON_PLUGIN_OUTPUTDIR
      ?
      See Also:
    • PREF_NINDS_ANON_PLUGIN_CSVDIR

      public static final String PREF_NINDS_ANON_PLUGIN_CSVDIR
      ?
      See Also:
    • ITEM_SEPARATOR

      public static final String ITEM_SEPARATOR
      The character that separates items (such as in the user file type definitions).
      See Also:
    • PREF_LEVEL

      public static final String PREF_LEVEL
      See Also:
    • PREF_WINDOW

      public static final String PREF_WINDOW
      See Also:
    • PREF_MIN

      public static final String PREF_MIN
      See Also:
    • PREF_MAX

      public static final String PREF_MAX
      See Also:
    • PREF_NDAR_PLUGIN_SERVER

      public static final String PREF_NDAR_PLUGIN_SERVER
      See Also:
    • PREF_NDAR_PLUGIN_DATASTRUCT_NAME

      public static final String PREF_NDAR_PLUGIN_DATASTRUCT_NAME
      See Also:
    • PREF_NDAR_PLUGIN_OUTPUT_DIR

      public static final String PREF_NDAR_PLUGIN_OUTPUT_DIR
      See Also:
    • PREF_NDAR_PLUGIN_CSV_DIR

      public static final String PREF_NDAR_PLUGIN_CSV_DIR
      See Also:
    • PREF_BRICS_PLUGIN_OUTPUT_DIR

      public static final String PREF_BRICS_PLUGIN_OUTPUT_DIR
      See Also:
    • PREF_BRICS_PLUGIN_CSV_DIR

      public static final String PREF_BRICS_PLUGIN_CSV_DIR
      See Also:
    • PREF_BRICS_PLUGIN_BIDS_DIR

      public static final String PREF_BRICS_PLUGIN_BIDS_DIR
      See Also:
    • PREF_BRICS_CONFLICT_RESOLUTION

      public static final String PREF_BRICS_CONFLICT_RESOLUTION
      See Also:
    • PREF_PAINT_OPACITY

      public static final String PREF_PAINT_OPACITY
      See Also:
    • PREF_BUG_REPORT_NAME

      public static final String PREF_BUG_REPORT_NAME
      See Also:
    • PREF_BUG_REPORT_EMAIL

      public static final String PREF_BUG_REPORT_EMAIL
      See Also:
    • PREF_BUG_REPORT_URGENCY

      public static final String PREF_BUG_REPORT_URGENCY
      See Also:
    • PREF_USE_INCORRECT_ACPC_XDIM

      public static final String PREF_USE_INCORRECT_ACPC_XDIM
      See Also:
    • PREF_FORCE_HISTO_UBYTE

      public static final String PREF_FORCE_HISTO_UBYTE
      See Also:
    • PREF_MAX_DEBUG_LINES

      public static final String PREF_MAX_DEBUG_LINES
      See Also:
    • PREF_DEBUG_MINOR

      public static final String PREF_DEBUG_MINOR
      See Also:
    • PREF_DEBUG_ALGORITHM

      public static final String PREF_DEBUG_ALGORITHM
      See Also:
    • PREF_DEBUG_FILEIO

      public static final String PREF_DEBUG_FILEIO
      See Also:
    • PREF_DEBUG_COMMS

      public static final String PREF_DEBUG_COMMS
      See Also:
    • PREF_DEBUG_SCRIPTING

      public static final String PREF_DEBUG_SCRIPTING
      See Also:
    • PREF_MAINWINDOW_SIZE

      public static final String PREF_MAINWINDOW_SIZE
      See Also:
    • PREF_EDIDTORWINDOW_SIZE

      public static final String PREF_EDIDTORWINDOW_SIZE
      See Also:
    • DEFINITION_SEPARATOR

      public static final String DEFINITION_SEPARATOR
      The character that separates an item from its value in a definition or mapping (such as in the user file type definitions).
      See Also:
    • DEBUG_MINOR

      public static final int DEBUG_MINOR
      Constant used to identify debugging category for general output.
      See Also:
    • DEBUG_ALGORITHM

      public static final int DEBUG_ALGORITHM
      Constant used to identify debugging category for general output by algorithms.
      See Also:
    • DEBUG_FILEIO

      public static final int DEBUG_FILEIO
      Constant used to identify debugging category for general output by FileIO.
      See Also:
    • DEBUG_COMMS

      public static final int DEBUG_COMMS
      Constant used to identify debugging category for general output by communications.
      See Also:
    • DEBUG_SCRIPTING

      public static final int DEBUG_SCRIPTING
      Constant used to identify debugging category for output of scripting system messages.
      See Also:
    • CACHED_MAX_DEBUG_LINES

      public static int CACHED_MAX_DEBUG_LINES
      Constant used to identify the maximum number of lines in the debugging panel. This is initialized from the properties file and updated whenever changed via the options panel (this value is used every time a debug line is output so access to this value needs to be as fast as possible)
    • DATA_PROVENANCE_SCHEMA

      public static final String DATA_PROVENANCE_SCHEMA
      The schema for the data provenance xml files
      See Also:
    • SAVE_DICOM_TAGS

      public static final String SAVE_DICOM_TAGS
      Dicom tags to be saved
      See Also:
    • mipavProps

      private static Properties mipavProps
      A list of MIPAV properties.
    • defaultProps

      private static Properties defaultProps
      A default list of properties used if the mipav.preferences file cannot be found.
    • messageFrame

      private static ViewJFrameMessage messageFrame
      Reference to the message frame where debug information can be displayed.
    • preferencesFileName

      private static String preferencesFileName
      The MIPAV preferences file name (without path).
    • preferencesDir

      private static String preferencesDir
      The place where user-individual mipav files should be put.
    • preferencesFile

      private static String preferencesFile
      The MIPAV preferences file path and name.
    • userShortcutTable

      private static Hashtable<String,KeyStroke> userShortcutTable
      Hashtable that holds all user-defined shortcuts
    • defaultShortcutTable

      private static Hashtable<String,KeyStroke> defaultShortcutTable
      Hashtable that holds the default shortcuts
    • currentShortcut

      private static KeyStroke currentShortcut
      The current shortcut
    • logConfig

      private static Preferences.LogConfig logConfig
      The current logging configuration
    • DEFAULT_LOG_LEVEL

      private static Preferences.LogLevel DEFAULT_LOG_LEVEL
      The default log level
  • Constructor Details

    • Preferences

      public Preferences()
  • Method Details

    • addShortcut

      public static boolean addShortcut(String command)
      Adds a new shortcut to the hashtable. if there is already a command predefined for the keystroke set from setShortcut(), it will be removed then replaced with the new command.
      Parameters:
      command - the command to map
      Returns:
      DOCUMENT ME!
    • addShortcut

      public static boolean addShortcut(String command, KeyStroke shortcut)
      Adds a new shortcut to the hashtable with a given keystroke. if there is already a command predefined for the keystroke set from setShortcut(), it will be removed then replaced with the new command.
      Parameters:
      command - the command to map
      Returns:
      DOCUMENT ME!
    • buildShortcutTable

      public static final void buildShortcutTable()
      Builds a hashtable of actioncommands (keys) with associated keystrokes from the Preferences file.
    • getDebug

      public static final String getDebug()
      Gets all the text printed to the debug panel.
      Returns:
      String representation of debug panel (new lines are removed)
    • data

      public static final void data(String string)
      Prints to data tab
      Parameters:
      string - String string to be output
    • getData

      public static final String getData()
      Gets all the text printed to the data panel.
      Returns:
      String representation of data panel (new lines are removed)
    • debug

      public static final void debug(String string)
      If at least one debug level is turned on, output the string.
      Parameters:
      string - String string to be output
    • debug

      public static final void debug(String string1, String string2)
      If at least one debug level is turned on, output the string. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String string to be output
      string2 - String string to be output
    • debug

      public static final void debug(String string1, String string2, String string3)
      If at least one debug level is turned on, output the string. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String string to be output
      string2 - String string to be output
      string3 - String string to be output
    • debug

      public static final void debug(String string1, String string2, String string3, String string4)
      If at least one debug level is turned on, output the string. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String string to be output
      string2 - String string to be output
      string3 - String string to be output
      string4 - String string to be output
    • debug

      public static final void debug(String string1, String string2, String string3, String string4, String string5)
      If at least one debug level is turned on, output the string. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String string to be output
      string2 - String string to be output
      string3 - String string to be output
      string4 - String string to be output
      string5 - String string to be output
    • debug

      public static final void debug(String string, int category)
      If the debug is turned on for the given level, output to the messageFrame.
      Parameters:
      string - String to be output
      level - int level of debug to check
    • debug

      public static final void debug(String string1, String string2, int category)
      If the debug is turned on for the given level, output to the messageFrame. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String to be output
      string2 - String to be output
      level - int level of debug to check
    • debug

      public static final void debug(String string1, String string2, String string3, int category)
      If the debug is turned on for the given level, output to the messageFrame. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String to be output
      string2 - String to be output
      string3 - String to be output
      level - int level of debug to check
    • debug

      public static final void debug(String string1, char string2, String string3, int category)
      If the debug is turned on for the given level, output to the messageFrame. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String to be output
      string2 - String to be output
      string3 - String to be output
      level - int level of debug to check
    • debug

      public static final void debug(String string1, boolean string2, String string3, int category)
      If the debug is turned on for the given level, output to the messageFrame. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String to be output
      string2 - String to be output
      string3 - String to be output
      level - int level of debug to check
    • debug

      public static final void debug(String string1, double string2, String string3, int category)
      If the debug is turned on for the given level, output to the messageFrame. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String to be output
      string2 - String to be output
      string3 - String to be output
      level - int level of debug to check
    • debug

      public static final void debug(String string1, Object string2, String string3, int category)
      If the debug is turned on for the given level, output to the messageFrame. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String to be output
      string2 - String to be output
      string3 - String to be output
      level - int level of debug to check
    • debug

      public static final void debug(String string1, String string2, String string3, String string4, int category)
      If the debug is turned on for the given level, output to the messageFrame. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String to be output
      string2 - String to be output
      string3 - String to be output
      string4 - String to be output
      level - int level of debug to check
    • debug

      public static final void debug(String string1, String string2, String string3, String string4, String string5, int category)
      If the debug is turned on for the given level, output to the messageFrame. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String to be output
      string2 - String to be output
      string3 - String to be output
      string4 - String to be output
      string5 - String to be output
      level - int level of debug to check
    • debug

      public static final void debug(String string, int category, Preferences.LogLevel level)
      If the debug is turned on for the given level, output to the messageFrame.
      Parameters:
      string - String to be output
      level - int level of debug to check
    • debug

      public static final void debug(String string1, String string2, int category, Preferences.LogLevel level)
      If the debug is turned on for the given level, output to the messageFrame. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String to be output
      string2 - String to be output
      level - int level of debug to check
    • debug

      public static final void debug(String string1, String string2, String string3, int category, Preferences.LogLevel level)
      If the debug is turned on for the given level, output to the messageFrame. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String to be output
      string2 - String to be output
      string3 - String to be output
      level - int level of debug to check
    • debug

      public static final void debug(String string1, char string2, String string3, int category, Preferences.LogLevel level)
      If the debug is turned on for the given level, output to the messageFrame. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String to be output
      string2 - String to be output
      string3 - String to be output
      level - int level of debug to check
    • debug

      public static final void debug(String string1, boolean string2, String string3, int category, Preferences.LogLevel level)
      If the debug is turned on for the given level, output to the messageFrame. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String to be output
      string2 - String to be output
      string3 - String to be output
      level - int level of debug to check
    • debug

      public static final void debug(String string1, double string2, String string3, int category, Preferences.LogLevel level)
      If the debug is turned on for the given level, output to the messageFrame. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String to be output
      string2 - String to be output
      string3 - String to be output
      level - int level of debug to check
    • debug

      public static final void debug(String string1, Object string2, String string3, int category, Preferences.LogLevel level)
      If the debug is turned on for the given level, output to the messageFrame. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String to be output
      string2 - String to be output
      string3 - String to be output
      level - int level of debug to check
    • debug

      public static final void debug(String string1, String string2, String string3, String string4, int category, Preferences.LogLevel level)
      If the debug is turned on for the given level, output to the messageFrame. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String to be output
      string2 - String to be output
      string3 - String to be output
      string4 - String to be output
      level - int level of debug to check
    • debug

      public static final void debug(String string1, String string2, String string3, String string4, String string5, int category, Preferences.LogLevel level)
      If the debug is turned on for the given level, output to the messageFrame. This is a overriden method variant that takes multiple string parameters.
      Parameters:
      string1 - String to be output
      string2 - String to be output
      string3 - String to be output
      string4 - String to be output
      string5 - String to be output
      level - int level of debug to check
    • debugLevel

      public static final boolean debugLevel(int category)
      Indicates whether debug is turned on for the given level.
      Parameters:
      level - debugging level to check for
      Returns:
      true if the given debugging level is activated
    • getDefaultDisplay

      public static Preferences.DefaultDisplay getDefaultDisplay()
      Returns how pixel values of images are displayed in terms or brightness values and possible colors.
      Returns:
      The default display enumeration.
    • getComplexDisplay

      public static Preferences.ComplexDisplay getComplexDisplay()
      Returns how pixel values are displayed on the MIPAV toolbar for complex images. Although MIPAV always displays the magnitude or log magnitude when viewing an image, the toolbar can display both real and complex components.
      Returns:
      The complex display enumeration, includes number of parts that the complex display requires
    • getInterpolateDisplay

      public static Preferences.InterpolateDisplay getInterpolateDisplay()
      Returns how pixel values are interpolated for displayed slices. Default is nearest neighbor.
    • initDebugPreferences

      public static final void initDebugPreferences()
      this method must be invoked very early on in the startup sequence (typically in the startup main method or ViewUserInterface. This sets up the logging which other initialization code relies on - for example, if there is another error later in the initialization process, that error might call a debug method which means the debug variables must already have been initialized.
    • getDebugPreferences

      public static final Preferences.LogConfig getDebugPreferences()
      Gets the LogConfiguration for logging categories (minor, algorithm, fileIO, comms, scripting).
      Returns:
      LogConfig the logging configuration
    • getDefaultFrameRate

      public static float getDefaultFrameRate()
      Gets the default frame rate used in saving AVI movies. Default value is 10.0.
      Returns:
      the default frame rate as a floating point number.
    • getDefaultHostKey

      public static String getDefaultHostKey()
      Accessor to get the default chat/file server host key.
      Returns:
      default host key
    • getDefaultServerKey

      public static String getDefaultServerKey()
      Accessor to get default DICOM image server key.
      Returns:
      default server key
    • getDefaultShortcutTable

      public static Hashtable<String,KeyStroke> getDefaultShortcutTable()
      Gets the Default Hashtable used to store the shortcut keystrokes and commands.
      Returns:
      Hashtable the shortcut hashtable
    • getDefaultStorageKey

      public static String getDefaultStorageKey()
      Accessor to get default DICOM image storage location.
      Returns:
      default storage information
    • getDICOMBrowserTableConfiguration

      public static Vector<String> getDICOMBrowserTableConfiguration()
      Gets the user-configured columns that indicate the DICOM tags that are displayed in the DICOM browser table.
      Returns:
      Vector List of strings that identify the columns.
    • getDICOMSaveDictionary

      public static final String getDICOMSaveDictionary()
      Accessor to get the default DICOM Save Dictionary (which tags to save into XML header.
      Returns:
      String The full path of the dictionary in which a subset of the DICOM tags are stored.
    • getFileFilter

      public static int getFileFilter()
      Returns the index of the latest used file filter.
      Returns:
      the index of the latest used file filter.
    • getFileTempDir

      public static String getFileTempDir()
      Returns the temporary directory which is used to store files to be deleted.
      Returns:
      the temporary directory which is used to store files to be deleted.
    • getHostIP

      public static String getHostIP(String AETitle)
      Accessor to get host (chat/file) server Internet Protocol for selected Name.
      Parameters:
      AETitle - application entity title
      Returns:
      IP address of asssociated Name
    • getIconName

      public static final String getIconName()
      Returns the name of the application icon.
      Returns:
      string containing the name of the system icon
    • getImageDirectory

      public static String getImageDirectory()
      Returns the image directory used last time.
      Returns:
      the image directory used last time.
    • getIP

      public static String getIP(String AETitle)
      Accessor to get DICOM image server Internet Protocol for selected AETitle.
      Parameters:
      AETitle - application entity title
      Returns:
      IP address of asssociated AETitle
    • getLastImageAt

      public static final String getLastImageAt(int index)
      Returns the image name of "last X images" at the given index. Index should be between 0 and 3.
      Parameters:
      index - Index of image.
      Returns:
      Name of image at index.
    • getLastOpenSequenceChannels

      public static final String getLastOpenSequenceChannels()
      Used by ViewOpenImageSequence to get the saved number of channels used when opening an image sequence.
      Returns:
      String - the value that was saved to the preferences file, represented by a String, of the number of channels that were used in the corresponding text box of this frame the last time the value was saved
    • getLastOpenSequenceOrdering

      public static final String getLastOpenSequenceOrdering()
      Used by ViewOpenImageSequence to get the Z-C-T ordering of data used when opening an image sequence.
      Returns:
      String - the value that was saved to the preferences file, represented by a String, of the Z-C-T ordering of data that was used in the corresponding text box of this frame the last time the value was saved
    • getLastOpenSequencePath

      public static final String getLastOpenSequencePath()
      Used by ViewOpenImageSequence to get the last path used when opening an image sequence.
      Returns:
      String
    • getLastOpenSequenceSlices

      public static final String getLastOpenSequenceSlices()
      Used by ViewOpenImageSequence to get the saved number of slices used when opening an image sequence.
      Returns:
      String - the value that was saved to the preferences file, represented by a String, of the number of slices that were used in the corresponding text box of this frame the last time the value was saved
    • getLastOpenSequenceTimePoints

      public static final String getLastOpenSequenceTimePoints()
      Used by ViewOpenImageSequence to get the saved number of time points used when opening an image sequence.
      Returns:
      String - the value that was saved to the preferences file, represented by a String, of the number of time points that were used in the corresponding text box of this frame the last time the value was saved
    • getLastXImages

      public static final String[] getLastXImages()
      Gets the names of the last X number of images that were loaded from the Preferences file. Shortens the names so the menu isn't too wide.
      Returns:
      Array of strings representing the last images that were loaded
    • getMaxDebugLines

      public static int getMaxDebugLines()
      Returns:
      the max number of debug lines that are output
    • getMipavProps

      public static Properties getMipavProps()
      Returns:
      the mipavProps
    • getNextHostKey

      public static String getNextHostKey()
      Returns the next host key.
      Returns:
      The next host key.
    • getNextServerKey

      public static String getNextServerKey()
      Returns the next server key.
      Returns:
      The next server key.
    • getNextStorageKey

      public static String getNextStorageKey()
      Returns the next storage key.
      Returns:
      The next storage key.
    • getNumberOfThreads

      public static int getNumberOfThreads()
      The number of threads available for MIPAV for processing. MIPAV typically uses this number for highly-parallel algorithm computations.
      Returns:
      the number of threads available for mipav
    • getOverlayNames

      public static final String[] getOverlayNames(boolean isDicom)
      Retrieves the list of overlay names (user can type whatever).
      Parameters:
      isDicom - boolean is this a dicom image
      Returns:
      String[] array of strings for overlay labeling
    • getOverlays

      public static final String[] getOverlays(boolean isDicom)
      Gets the image overlay codes (they identify what to display in the corners of the image), from the preference file.
      Parameters:
      isDicom - if true loads the overlay IDs for a DICOM image
      Returns:
      the overlay codes that identifies what should be displayed.
    • getPluginUserDir

      public static final String getPluginUserDir()
      Returns String indicating the directory where plugin class files are stored. If this property has not been set, then the image Directory is returned.
      Returns:
      directory name for the property PluginUserDir or the directory name for the property ImageDirectory if PluginUserDir is not set.
    • getPluginInstallDirectory

      public static String getPluginInstallDirectory()
      Returns the directory last used for installing plugins.
      Returns:
      the directory last used for installing plugins.
    • getPort

      public static int getPort(String AETitle)
      Accessor to get DICOM image server's port for selected AETitle.
      Parameters:
      AETitle - application entity title
      Returns:
      port address of asssociated AETitle
    • getPreferencesDir

      public static final String getPreferencesDir()
      Return the directory where mipav-generated, user-specific files should be placed.
      Returns:
      the place to put user-specific files
    • getProperty

      public static final String getProperty(String key)
      Accessor to return a specfic properties given a key.
      Parameters:
      key - the property key.
      Returns:
      the mipav property. The method returns null if the property is not found.
    • getScriptFile

      public static final String getScriptFile()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getScriptsDirectory

      public static final String getScriptsDirectory()
      Returns the default script directory. if null, returns the user's current working directory + "scripts"
      Returns:
      script dir
    • getShortcut

      public static KeyStroke getShortcut(String command)
      Returns a keystroke shortcut for the given command.
      Parameters:
      command - String the command to check
      Returns:
      KeyStroke the shortcut's keystroke
    • getShortcutCommand

      public static String getShortcutCommand(KeyStroke ks)
      Gets the command associated with the shortcut (if there is one).
      Parameters:
      ks - KeyStroke the keystroke to check
      Returns:
      String the command associated (or null if none)
    • getSubsampleDimensions

      public static final Dimension getSubsampleDimensions()
      Used by ViewOpenImageSequence to get the subsample dimensions that were saved in the preferences file.
      Returns:
      Dimension - the dimension that was last used to subsample an image while using the ViewOpenImageSequence tool, null if dimension is invalid in the preferences file
    • getTrimVoi

      public static final float getTrimVoi()
      Accessor to get the TRIM parameter (trimming VOIcontour of points). Default value is 0.3 which trims some of the points of the contours.
      Returns:
      the trim value.
    • getTrimMask

      public static final float getTrimMask()
      Accessor to get the TRIM parameter (trimming VOIcontour of points). Default value is 0.3 which trims no points in the contours.
      Returns:
      the trim value.
    • getTrimAdjacient

      public static boolean getTrimAdjacient()
      Accessor to get the trim parameter (trimming contour of adjacent points).
      Returns:
      the trim boolean to indicate if the directly adjacent points should be trimmed.
    • getUserShortcutTable

      public static Hashtable<String,KeyStroke> getUserShortcutTable()
      Gets the User defined Hashtable used to store the shortcut keystrokes and commands.
      Returns:
      Hashtable the shortcut hashtable
    • getVOIColorIncrement

      public static int getVOIColorIncrement()
      Gets the VOI color increment value. Ben add here.
      Returns:
      int
    • getVOIDrawColor

      public static Color getVOIDrawColor()
      Gets the VOI draw color.
      Returns:
      Color color to draw with
    • getVOIThickness

      public static int getVOIThickness()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • is

      public static final boolean is(String propertyName)
      Gets the boolean state of the property, where in the preferences file the "yes", "on", "true" all return true, but anything else (or non-existent property) returns false. This method is provided for semantic preference, but is exactly the same as (in fact, calls) isPreference.
      Parameters:
      propertyName - Name of a property in preferences to check.
      Returns:
      boolean true when the named property has the String the "yes", "on", "true". false for any other string, or if the property does not exist.
      See Also:
    • isDebug

      public static final boolean isDebug()
      Returns flag indicating if the debug flag is true or false. (and in preferences v2, if debug level is zero, returns false. Returns true if debug level is greater than 0.)

      debug level is the amount of output given for debugging mipav.

      Returns:
      returns true if either debug flag is true or level is greater than zero and false if either debug flag is false or level is zero.
    • isDefaultCommand

      public static boolean isDefaultCommand(String command)
      DOCUMENT ME!
      Parameters:
      command - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • isDefaultKeyStroke

      public static boolean isDefaultKeyStroke(KeyStroke ks)
      DOCUMENT ME!
      Parameters:
      ks - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • isGpuCompEnabled

      public static boolean isGpuCompEnabled()
      Indicates whether GPU-computing should be enabled. The renderer and algorithms use this information for processing
      Returns:
      true if gpu compinting is enabled
    • isInterpolateDisplay

      public static boolean isInterpolateDisplay()
      Maintained for backwards compatibility. If interpolation mode is equal to nearest neighbor, then returns false, otherwise returns true.
      Returns:
    • isMultiThreadingEnabled

      public static boolean isMultiThreadingEnabled()
      Indicates whether multi-threading should be enabled for algorithms. Most algorithms check this before launching highly-parallel processes (such as FFT).
      Returns:
      true if multi-threading is enabled
    • isHistogramDisplay

      public static boolean isHistogramDisplay()
      Indicates whether the image display should be updated in real-time as histogram LUTs are changed
      Returns:
      true if real-time operation should occur
    • isPreference

      public static final boolean isPreference(String propertyName)
      Gets the boolean state of the property, where in the preferences file the "yes", "on", "true" all return true, but anything else (or non-existent property) returns false. While not as intuitive, perhaps, as some of the specially named property-retrieval methods (eg., isSplashScreen), this method can be used to replace all of those methods when the preferences property is known. It can also be convenient for limited-use properties used in debugging.
      Parameters:
      propertyName - Name of a property in preferences to check.
      Returns:
      boolean true when the named property has the String the "yes", "on", "true". false for any other string, or if the property does not exist.
    • isPreferenceSet

      public static final boolean isPreferenceSet(String propertyName)
      Returns whether the user has a preference indicated for a particular property. Note that this just checks for some value, not necessarily a "true" value.
      Parameters:
      propertyName - the name of the property to check for
      Returns:
      true if there is some preference set for the given property name
    • print

      public static void print()
      Prints mipav.preferences to System.out.
    • read

      public static boolean read()
      Reads the "mipav.preferences" file from the user's 'home' directory.
      Returns:
      true if found else false
    • removeProperty

      public static final void removeProperty(String key)
      Removes the property key from the MIPAV property list.
      Parameters:
      key - the property key.
    • removeShortcut

      public static void removeShortcut(String commandToRemove)
      Removes a shortcut from the table.
      Parameters:
      commandToRemove - String
    • save

      public static boolean save()
      Saves preference file to the user's 'home' directory.
      Returns:
      boolean true if successful, false otherwise
    • saveShortcuts

      public static final void saveShortcuts()
      Sets the property for shortcuts by building string from ViewUserInterface's Shortcut Hashtable.
    • saveSubsampleDimensions

      public static final void saveSubsampleDimensions(Dimension subsampleDimension)
      Used by ViewOpenImageSequence to save its subsample dimensions for the next time it is opened. The dimension is actually saved as its two parts, width and height
      Parameters:
      subsampleDimension - Dimension - the subsample dimension to save
    • setAlwaysSaveImgAsAnalyze

      public static final void setAlwaysSaveImgAsAnalyze(boolean doSaveAnalyze)
      Sets whether all imgs should be saved in analyze format (i.e., don't ask about whether to save as analyze/interfile/nifti).
      Parameters:
      doSaveAnalyze - whether to always save .hdr/.img files as analyze format files
    • setAlwaysSaveImgAsInterfile

      public static final void setAlwaysSaveImgAsInterfile(boolean doSaveInterfile)
      Sets whether all imgs should be saved in interfile format (i.e., don't ask about whether to save as analyze/interfile/nifti).
      Parameters:
      doSaveInterfile - whether to always save .hdr/.img files as interfile format files
    • setAlwaysSaveImgAsNifti

      public static final void setAlwaysSaveImgAsNifti(boolean doSaveNifti)
      Sets whether all imgs should be saved in nifti format (i.e., don't ask about whether to save as analyze/interfile/nifti).
      Parameters:
      doSaveNifti - whether to always save .hdr/.img files as nifti format files
    • setAlwaysSaveMncAsMinc1

      public static final void setAlwaysSaveMncAsMinc1(boolean doSaveMinc1)
      Sets whether all mncs should be saved in minc1 cdf format (i.e., don't ask about whether to save as minc1/minc2).
      Parameters:
      doSaveMinc1 - whether to always save .mnc files as minc1 cdf format files
    • setAlwaysSaveMncAsMinc2

      public static final void setAlwaysSaveMncAsMinc2(boolean doSaveMinc2)
      Sets whether all mncs should be saved in minc2 hdf5 format (i.e., don't ask about whether to save as minc1/minc2).
      Parameters:
      doSaveMinc2 - whether to always save .mnc files as minc2 hdf5 format files
    • setCurrentShortcut

      public static void setCurrentShortcut(KeyStroke ks)
      Sets the current keystroke shortcut for assignment once a command has been passed in.
      Parameters:
      ks - KeyStroke the shortcut keystroke
    • setDebugLevels

      public static final void setDebugLevels(Map<Integer,String> debugLevels)
      Sets the debug levels
      Parameters:
      levels - a Map of Category (int) -> LogLevel.
    • setDefaultDisplay

      public static void setDefaultDisplay(Preferences.DefaultDisplay display)
      Sets the default display mode for 2D/3D image display.
      Parameters:
      display - the DefaultDisplay type
    • setDICOMBrowserTableConfiguration

      public static boolean setDICOMBrowserTableConfiguration(Vector<String> newConfiguration)
      Sets the user-configured columns that indicate the DICOM tags that are displayed in the DICOM browser table.
      Parameters:
      newConfiguration - Vector List of strings that identify the columns.
      Returns:
      boolean Success or failure of the setting the columns.
    • setFileFilter

      public static void setFileFilter(int fileFilterIndex)
      Sets the current used file filter as the latest used file filter.
      Parameters:
      fileFilterIndex - the index of the current used file filter.
    • setFileTempDir

      public static void setFileTempDir(String tempDir)
      Sets the temporary directory which is used for files which will be deleted.
      Parameters:
      tempDir - the temporary directory.
    • setImageDirectory

      public static void setImageDirectory(File imageDirectory)
      Sets the image directory as the latest used image directory.
      Parameters:
      imageDirectory - the current used image directory.
    • setInterpolationMode

      public static void setInterpolationMode(Preferences.InterpolateDisplay interp)
      Sets the display interpolation mode for 2D image display.
      Parameters:
      interp - the InterpolateDisplay type
    • setLastImage

      public static final void setLastImage(String name, boolean multiFile, int numDims)
      Sets the last image loaded in the Preferences file. If it is a duplicate, moves it up on the list.
      Parameters:
      name - Full pathname of last image loaded.
      multiFile - true if the last image was a multi-file image, false otherwise
      numDims - DOCUMENT ME!
    • setLastOpenSequenceParams

      public static final void setLastOpenSequenceParams(String slices, String channels, String timePoints, String ordering)
      Used by ViewOpenImageSequence to save the user's most recent slices, channels, time points, and ordering that were specified in the component.
      Parameters:
      slices - String - number of slices in the slices text box of the ViewOpenImageSequence frame
      channels - String - number of channels in the channels text box of the ViewOpenImageSequence frame
      timePoints - String - number of time points in the time points text box of the ViewOpenImageSequence frame
      ordering - String - ordering sequence used in the radio button panel of the ViewOpenImageSequence frame
    • setLastOpenSequencePath

      public static final void setLastOpenSequencePath(String path)
      Used by ViewOpenImageSequence to save the path used when opening an image sequence.
      Parameters:
      path - DOCUMENT ME!
    • setMessageFrame

      public static final void setMessageFrame(ViewJFrameMessage mFrame)
      Sets the message frame.
      Parameters:
      mFrame - Message frame to set.
    • setMaxDebugLines

      public static void setMaxDebugLines(int lines)
      Sets the maximum number of debug lines that are output
      Parameters:
      int - max number of debug lines
    • setOverlayNames

      public static final void setOverlayNames(boolean isDicom, String[] overlays)
      Sets the labels for each overlay position. The labels can be user input with any text and will be displayed before the overlay values
      Parameters:
      isDicom - boolean is the image DICOM
      overlays - String[] array of strings (16) for each of the overlay positions
    • setOverlays

      public static final void setOverlays(boolean isDicom, String[] overlays)
      Sets the overlay tag identifiers in the preference file.
      Parameters:
      isDicom - if true identifies the tags as a list of DICOMOverlays else identifies the tags as ImageOverlays (i.e., it is not a DICOM image)
      overlays - an array of 16 strings (4 for each corner) that identifies what is to be displayed in the image.
    • setPluginInstallDirectory

      public static void setPluginInstallDirectory(File pluginInstallDirectory)
      Sets the plugin install directory.
    • setPreferencesFileName

      public static final void setPreferencesFileName(String fileName)
      Change the file name of the preferences file we should use (without any path).
      Parameters:
      fileName - the file name (eg mipav.preferences), which should be in $HOME/mipav/
    • setPreferencesFileDirectory

      public static final void setPreferencesFileDirectory(String fileDir)
      Change the file directory of the preferences file.
      Parameters:
      fileDir - the file directory, defaults to $HOME/mipav/
    • setProperty

      public static final boolean setProperty(String key, Object value)
      Sets the property key in the MIPAV property list and saves it to a file.
      Parameters:
      key - the property key.
      value - the value of the property key.
      Returns:
      true if the property was set and saved successfully, false otherwise
    • setScriptFile

      public static final void setScriptFile(String scriptFile)
      DOCUMENT ME!
      Parameters:
      scriptFile - DOCUMENT ME!
    • setScriptsDirectory

      public static final void setScriptsDirectory(String scriptsDirectory)
      Sets the scripts directory to the new scripts directory.
      Parameters:
      scriptsDirectory - the new scripts directory
    • setShowDICOMOverlays

      public static final void setShowDICOMOverlays(boolean doShow)
      Sets whether to show the DICOM overlays.
      Parameters:
      doShow - boolean true means show DICOM overlays
    • setShowImageOverlays

      public static final void setShowImageOverlays(boolean doShow)
      Sets whether to show the Image overlays.
      Parameters:
      doShow - boolean true means show image overlays
    • buildDefaultShortcuts

      private static Hashtable<String,KeyStroke> buildDefaultShortcuts()
      Builds the default shortcut hashtable (not user modifiable).
      Returns:
      default shortcut hashtable
    • resetToDefaults

      public static void resetToDefaults()
      Resets the current MIPAV properties to the defaults and saves the preferences file. Cannot be undone.
    • debugMessageFrameAppend

      public static void debugMessageFrameAppend(String string)
      Appends the specified message to the message frame. Clears the message frame first if the number of lines exceeds the maximum number of lines allowed in the frame.
    • isLogMinorEnabled

      public static boolean isLogMinorEnabled()
    • isLogAlgorithmEnabled

      public static boolean isLogAlgorithmEnabled()
    • isLogFileIOEnabled

      public static boolean isLogFileIOEnabled()
    • isLogCommsEnabled

      public boolean isLogCommsEnabled()
    • isLogScriptingEnabled

      public boolean isLogScriptingEnabled()
    • setLogLevelMinor

      public void setLogLevelMinor(Preferences.LogLevel level)
    • setLogLevelAlgorithm

      public void setLogLevelAlgorithm(Preferences.LogLevel level)
    • setLogLevelFileIO

      public void setLogLevelFileIO(Preferences.LogLevel level)
    • setLogLevelComms

      public void setLogLevelComms(Preferences.LogLevel level)
    • setLogLevelScripting

      public void setLogLevelScripting(Preferences.LogLevel level)