Package gov.nih.mipav.view
Class Preferences
java.lang.Object
gov.nih.mipav.view.Preferences
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefines options for displaying pixel values of complex images.static enumDefines options for defining color and brightness display based on pixel values.static enumDefines options for interpolating displayed image slices.static final classstatic enumstatic enumDefines operating system on which MIPAV is running.static enumDefines system architecture on which MIPAV is running. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intConstant used to identify the maximum number of lines in the debugging panel.private static KeyStrokeThe current shortcutstatic final StringThe schema for the data provenance xml filesstatic final intConstant used to identify debugging category for general output by algorithms.static final intConstant used to identify debugging category for general output by communications.static final intConstant used to identify debugging category for general output by FileIO.static final intConstant used to identify debugging category for general output.static final intConstant used to identify debugging category for output of scripting system messages.private static Preferences.LogLevelThe default log levelprivate static PropertiesA default list of properties used if the mipav.preferences file cannot be found.Hashtable that holds the default shortcutsstatic final StringThe character that separates an item from its value in a definition or mapping (such as in the user file type definitions).static final StringThe character that separates items (such as in the user file type definitions).private static Preferences.LogConfigThe current logging configurationprivate static ViewJFrameMessageReference to the message frame where debug information can be displayed.private static PropertiesA list of MIPAV properties.static final StringConstant that indicates the active image color.static final StringConstant that indicates the active image color border sizestatic final StringConstant that indicates whether DICOM ordering should be used by default for loading AFNI imagesstatic final StringConstant that indicates whether .hdr/.img files should always be written in analyze format (as opposed to asking whether to save as interfile or nifti).static final StringConstant that indicates whether .hdr/.img files should always be written in interfile format (as opposed to asking whether to save as analyze or nifti).static final StringConstant that indicates whether .hdr/.img files should always be written in nifti format (as opposed to asking whether to save as analyze or interfile).static final StringConstant that indicates whether .mnc files should always be written in minc1 CDF format (as opposed to asking whether to save as minc1 or minc2).static final StringConstant that indicates whether .mnc files should always be written in minc2 HDF5 format (as opposed to asking whether to save as minc1 or minc2).static final StringConstant that indicates the application icon.static final StringConstant that indicates the application title.static final StringConstant that indicates whether to ask about starting dicom receiver on startup.static final StringConstant that indicates whether to enable the dicom receiver on startup.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringConstant that indicates if user should be prompted on closing a frame.static final StringConstant that indicates method used to display complex data values on MIPAV toolbar (MIPAV visually always shows magnitude or log magnitude).static final StringConstant that indicates whether [SHIFT] must be held down to draw continuous contours (false = hold-shift).static final StringConstant that indicates the crosshair cursor to be used.static final StringConstant that indicates the pixel gap away from the center of the crosshair (in one direction) actual gap is 2x.static final StringConstant that indicates if data provenance is turned on.static final StringConstant that indicates the path where the system data provenance should be storedstatic final Stringconstant for logging.static final StringConstant for debug string.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringConstant to indicate default brightness and color display to screenstatic final StringConstant that indicates the default frame ratestatic final StringConstant that indicates the initial directory in which to open the file chooser of the image browser.static final StringConstant indicating the DICOM browser configuration.static final Stringconstant that indicates the dicom save dictionary.static final StringConstant that indicates the default dicom storage directory.static final Stringstatic final StringConstant that indicates whether the triplanar frame should wait for a mouse released event before repainting all 9 tri-planar images.static final StringConstant that indicates whether image will display using a stored LUT (from image file or generic to image type)static final StringConstant that indicates the file temp directory.static final StringConstant that indicates the filename filter.static final Stringstatic final Stringstatic final StringConstant that indicates if computing on the GPU is enabledstatic final StringConstant that indicates whether image is updated in real-time on histogram changesstatic final StringConstant that indicates the current image directory.static final StringConstant that indicates if data provenance is turned on for individual images (and saved on image-save).static final StringConstant identifying if the miscellaneous toolbar is on by default.static final StringConstant that indicates the intensity label background color.static final StringConstant that indicates the intensity label color.static final StringConstant that indicates the mode of image interpolation used for displaystatic final StringConstant 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.static final StringConstant that indicates the last script that was run.static final StringConstant that indicates the last stack flag.static final Stringconstant for the names of the last X number of images used to be shown in quicklist.static final StringConstant that indicates if lax file should be checked on mipav start.static final StringConstant that indicates the LightBox border color variable.static final StringConstant that indicates the LightBox border size variable.static final StringConstant that indicates continuous update of LightBoxstatic final StringConstant that indicates the LightBox grid column variable.static final StringConstant that indicates the LightBox grid color variable.static final StringConstant that indicates the LightBox grid row variable.static final StringConstant that indicates the LightBox grid size variable.static final StringConstant that indicates the increment between displayed lightbox slicesstatic final StringConstant that indicates the LightBox location variable.static final StringConstant that indicates the LightBox magnification variable.static final StringConstant that indicates the LightBox row dependant variable.static final StringConstant that indicates the LightBox selected border color variable.static final StringConstant that indicates the LightBox selected border size variable.static final StringConstant that indicates the LightBox individual t-slice variable.static final Stringstatic final StringConstant that indicates the pathname of the log file.static final StringConstant for whether logging is enabledstatic final StringConstant that indicates whether the log of the magnitude of an image is used for image displaystatic final Stringstatic final Stringstatic final Stringstatic final StringThe maximum heap size.static final StringConstant that indicates the menu font.static final StringConstant that indicates the menu font color.static final StringConstant that indicates the menu font size.static final Stringstatic final StringConstant that indicated if the multi-theading is enabledstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String?static final String?static final String?static final StringConstant that specifies how many system threads user would like MIPAV to usestatic final StringConstant that indicates if images are to be open im tiled formatstatic final Stringconstant on whether to overwrite the voi statistics file automaticallystatic final StringConstant indicating if VOI statistics file should be overwritten.static final Stringstatic final StringConstant that indicates if the Paint-to-Mask operation should output to a new imagestatic final StringConstant indicating if the Paint Toolbar is on by default.static final Stringplugin of algorithm type.static final Stringplugin of file type.static final StringConstant that indicates the current directory where plugins can be installed from.static final Stringplugin of view type.static final StringConstant that indicates if the Quick Mask operation should output to a new imagestatic final Stringnumber of recently used images to store in quicklist.static final StringConstant that indicates the default raw image big endian.static final StringConstant that indicates the default raw image data offset.static final StringConstant that indicates the default raw image extents.static final StringConstant that indicates the default raw image resolutions.static final StringConstant that indicates the default raw image type.static final StringConstant that indicates the default raw image units.static final StringConstant that indicates if window/level changes should be relative to the current transfer function valuesstatic final StringConstant indicating which channels should be used for applying paint to a RGB imagestatic final StringConstant that indicates use of saving images, vois, and transfer functions.static final StringConstant that indicates if the last used parameters for algorithm dialogs should be used when they are opened.static final StringConstant that indicates if a prompt should be shown before an image file is overwritten.static final StringConstant that indicates the saving of the xml thumbnail during a save.static final StringConstant that indicates the script directory.static final StringConstant that indicates if the Scripting toolbar should be shown by default.static final StringConstant indicating the application shortcuts (user defined).static final StringConstant that indicates if the DICOM overlay should be shown.static final StringConstant that indicates if the image overlay should be shown.static final StringConstant that indicates if left mouse click inside image should cause intensity value to displaystatic final StringConstant that indicates whether the angle of line VOIs should be shown on screen.static final StringConstant that indicates whether to show output.static final StringConstant that indicates whether to show image overlays.static final StringConstant that indicates if the paint border shown.static final StringConstant that indicates if the private DICOM tags are to be shownstatic final StringConstant that indicates if the splash graphic should be shown when mipav starts.static final StringClass name for selected look and feel type, can also be "None" (default selection)static final StringConstant that indicates whether to show the VOI name.static final StringConstant that indicates if right mouse click inside image should cause window/level changesstatic final StringThe starting heap size.static final StringConstant that indicates the VOI Trim flag for trimming adjacent points.static final StringConstant that indicates the mask trim level variable.static final StringConstant that indicates the VOI Trim level variable.static final StringConstant that indicates whether the triplanar frame should use the old 2x2 layout or the newer 3x1 layout.static final StringConstant that indicates if the triplanar should scroll the original imagestatic final StringConstant that indicates if triplanar protractor should snap to nearest multiple of 90 degrees.static final Stringstatic final StringConstant that indicates the user defined file type associations.static final StringConstant that indicates the user defined file types.static final String?static final Stringthe voi draw color constant.static final StringConstant indicating if VOIs should be saved as LPS or file coordinatesstatic final StringConstant indicating the look of VOI Points drawn on an image.static final Stringthe starting color for VOIs (first drawn).static final StringConstant that indicates the last used VOI text background color.static final StringConstant that indicates the last used VOI text color.static final StringConstant indicating the VOI Thickness.static final StringConstant indicating if the VOI Toolbar is on by default.static final Stringconstant for warning the user when audio will be discarded from opened AVIs.static final Stringstatic final StringConstant that indicates if the zoom should be linear (otherwise geometric)private static StringThe place where user-individual mipav files should be put.private static StringThe MIPAV preferences file path and name.private static StringThe MIPAV preferences file name (without path).static final StringDicom tags to be savedHashtable that holds all user-defined shortcuts -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanaddShortcut(String command) Adds a new shortcut to the hashtable. if there is already a command predefined for the keystroke set fromsetShortcut(), it will be removed then replaced with the new command.static booleanaddShortcut(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 fromsetShortcut(), it will be removed then replaced with the new command.Builds the default shortcut hashtable (not user modifiable).static final voidBuilds a hashtable of actioncommands (keys) with associated keystrokes from the Preferences file.static final voidPrints to data tabstatic final voidIf at least one debug level is turned on, output the string.static final voidIf the debug is turned on for the given level, output to the messageFrame.static final voiddebug(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.static final voidIf the debug is turned on for the given level, output to the messageFrame.static final voiddebug(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.static final voidIf the debug is turned on for the given level, output to the messageFrame.static final voiddebug(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.static final voidIf the debug is turned on for the given level, output to the messageFrame.static final voiddebug(String string, int category, Preferences.LogLevel level) If the debug is turned on for the given level, output to the messageFrame.static final voidIf the debug is turned on for the given level, output to the messageFrame.static final voiddebug(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.static final voidIf at least one debug level is turned on, output the string.static final voidIf the debug is turned on for the given level, output to the messageFrame.static final voiddebug(String string1, String string2, int category, Preferences.LogLevel level) If the debug is turned on for the given level, output to the messageFrame.static final voidIf at least one debug level is turned on, output the string.static final voidIf the debug is turned on for the given level, output to the messageFrame.static final voiddebug(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.static final voidIf at least one debug level is turned on, output the string.static final voidIf the debug is turned on for the given level, output to the messageFrame.static final voiddebug(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.static final voidIf at least one debug level is turned on, output the string.static final voidIf the debug is turned on for the given level, output to the messageFrame.static final voiddebug(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.static final booleandebugLevel(int category) Indicates whether debug is turned on for the given level.static voiddebugMessageFrameAppend(String string) Appends the specified message to the message frame.static Preferences.ComplexDisplayReturns how pixel values are displayed on the MIPAV toolbar for complex images.static final StringgetData()Gets all the text printed to the data panel.static final StringgetDebug()Gets all the text printed to the debug panel.static final Preferences.LogConfigGets the LogConfiguration for logging categories (minor, algorithm, fileIO, comms, scripting).static Preferences.DefaultDisplayReturns how pixel values of images are displayed in terms or brightness values and possible colors.static floatGets the default frame rate used in saving AVI movies.static StringAccessor to get the default chat/file server host key.static StringAccessor to get default DICOM image server key.Gets the Default Hashtable used to store the shortcut keystrokes and commands.static StringAccessor to get default DICOM image storage location.Gets the user-configured columns that indicate the DICOM tags that are displayed in the DICOM browser table.static final StringAccessor to get the default DICOM Save Dictionary (which tags to save into XML header.static intReturns the index of the latest used file filter.static StringReturns the temporary directory which is used to store files to be deleted.static StringAccessor to get host (chat/file) server Internet Protocol for selected Name.static final StringReturns the name of the application icon.static StringReturns the image directory used last time.Returns how pixel values are interpolated for displayed slices.static StringAccessor to get DICOM image server Internet Protocol for selected AETitle.static final StringgetLastImageAt(int index) Returns the image name of "last X images" at the given index.static final StringUsed by ViewOpenImageSequence to get the saved number of channels used when opening an image sequence.static final StringUsed by ViewOpenImageSequence to get the Z-C-T ordering of data used when opening an image sequence.static final StringUsed by ViewOpenImageSequence to get the last path used when opening an image sequence.static final StringUsed by ViewOpenImageSequence to get the saved number of slices used when opening an image sequence.static final StringUsed by ViewOpenImageSequence to get the saved number of time points used when opening an image sequence.static final String[]Gets the names of the last X number of images that were loaded from the Preferences file.static intstatic Propertiesstatic StringReturns the next host key.static StringReturns the next server key.static StringReturns the next storage key.static intThe number of threads available for MIPAV for processing.static final String[]getOverlayNames(boolean isDicom) Retrieves the list of overlay names (user can type whatever).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.static StringReturns the directory last used for installing plugins.static final StringReturns String indicating the directory where plugin class files are stored.static intAccessor to get DICOM image server's port for selected AETitle.static final StringReturn the directory where mipav-generated, user-specific files should be placed.static final StringgetProperty(String key) Accessor to return a specfic properties given a key.static final StringDOCUMENT ME!static final StringReturns the default script directory. if null, returns the user's current working directory + "scripts"static KeyStrokegetShortcut(String command) Returns a keystroke shortcut for the given command.static StringGets the command associated with the shortcut (if there is one).static final DimensionUsed by ViewOpenImageSequence to get the subsample dimensions that were saved in the preferences file.static booleanAccessor to get the trim parameter (trimming contour of adjacent points).static final floatAccessor to get the TRIM parameter (trimming VOIcontour of points).static final floatAccessor to get the TRIM parameter (trimming VOIcontour of points).Gets the User defined Hashtable used to store the shortcut keystrokes and commands.static intGets the VOI color increment value.static ColorGets the VOI draw color.static intDOCUMENT ME!static final voidthis method must be invoked very early on in the startup sequence (typically in the startup main method or ViewUserInterface.static final booleanGets the boolean state of the property, where in the preferences file the "yes", "on", "true" all returntrue, but anything else (or non-existent property) returnsfalse.static final booleanisDebug()Returns flag indicating if the debug flag is true or false.static booleanisDefaultCommand(String command) DOCUMENT ME!static booleanDOCUMENT ME!static booleanIndicates whether GPU-computing should be enabled.static booleanIndicates whether the image display should be updated in real-time as histogram LUTs are changedstatic booleanMaintained for backwards compatibility.static booleanbooleanstatic booleanstatic booleanbooleanstatic booleanIndicates whether multi-threading should be enabled for algorithms.static final booleanisPreference(String propertyName) Gets the boolean state of the property, where in the preferences file the "yes", "on", "true" all returntrue, but anything else (or non-existent property) returnsfalse.static final booleanisPreferenceSet(String propertyName) Returns whether the user has a preference indicated for a particular property.static voidprint()Prints mipav.preferences to System.out.static booleanread()Reads the "mipav.preferences" file from the user's 'home' directory.static final voidremoveProperty(String key) Removes the property key from the MIPAV property list.static voidremoveShortcut(String commandToRemove) Removes a shortcut from the table.static voidResets the current MIPAV properties to the defaults and saves the preferences file.static booleansave()Saves preference file to the user's 'home' directory.static final voidSets the property for shortcuts by building string from ViewUserInterface's Shortcut Hashtable.static final voidsaveSubsampleDimensions(Dimension subsampleDimension) Used by ViewOpenImageSequence to save its subsample dimensions for the next time it is opened.static final voidsetAlwaysSaveImgAsAnalyze(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).static final voidsetAlwaysSaveImgAsInterfile(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).static final voidsetAlwaysSaveImgAsNifti(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).static final voidsetAlwaysSaveMncAsMinc1(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).static final voidsetAlwaysSaveMncAsMinc2(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).static voidSets the current keystroke shortcut for assignment once a command has been passed in.static final voidsetDebugLevels(Map<Integer, String> debugLevels) Sets the debug levelsstatic voidSets the default display mode for 2D/3D image display.static booleansetDICOMBrowserTableConfiguration(Vector<String> newConfiguration) Sets the user-configured columns that indicate the DICOM tags that are displayed in the DICOM browser table.static voidsetFileFilter(int fileFilterIndex) Sets the current used file filter as the latest used file filter.static voidsetFileTempDir(String tempDir) Sets the temporary directory which is used for files which will be deleted.static voidsetImageDirectory(File imageDirectory) Sets the image directory as the latest used image directory.static voidSets the display interpolation mode for 2D image display.static final voidsetLastImage(String name, boolean multiFile, int numDims) Sets the last image loaded in the Preferences file.static final voidsetLastOpenSequenceParams(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.static final voidUsed by ViewOpenImageSequence to save the path used when opening an image sequence.voidvoidvoidvoidvoidstatic voidsetMaxDebugLines(int lines) Sets the maximum number of debug lines that are outputstatic final voidsetMessageFrame(ViewJFrameMessage mFrame) Sets the message frame.static final voidsetOverlayNames(boolean isDicom, String[] overlays) Sets the labels for each overlay position.static final voidsetOverlays(boolean isDicom, String[] overlays) Sets the overlay tag identifiers in the preference file.static voidsetPluginInstallDirectory(File pluginInstallDirectory) Sets the plugin install directory.static final voidsetPreferencesFileDirectory(String fileDir) Change the file directory of the preferences file.static final voidsetPreferencesFileName(String fileName) Change the file name of the preferences file we should use (without any path).static final booleansetProperty(String key, Object value) Sets the property key in the MIPAV property list and saves it to a file.static final voidsetScriptFile(String scriptFile) DOCUMENT ME!static final voidsetScriptsDirectory(String scriptsDirectory) Sets the scripts directory to the new scripts directory.static final voidsetShowDICOMOverlays(boolean doShow) Sets whether to show the DICOM overlays.static final voidsetShowImageOverlays(boolean doShow) Sets whether to show the Image overlays.
-
Field Details
-
PREF_SAVE_ALL_ON_SAVE
Constant that indicates use of saving images, vois, and transfer functions.- See Also:
-
PREF_SAVE_XML_THUMBNAIL
Constant that indicates the saving of the xml thumbnail during a save.- See Also:
-
PREF_FLIP_NIFTI_READ
- See Also:
-
PREF_FILE_TEMP_DIR
Constant that indicates the file temp directory.- See Also:
-
PREF_LAX_CHECK
Constant that indicates if lax file should be checked on mipav start.- See Also:
-
PREF_CLOSE_FRAME_CHECK
Constant that indicates if user should be prompted on closing a frame.- See Also:
-
PREF_OVERWRITE_VOI_STATS
Constant indicating if VOI statistics file should be overwritten.- See Also:
-
PREF_DATA_PROVENANCE
Constant that indicates if data provenance is turned on.- See Also:
-
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
Constant that indicates the path where the system data provenance should be stored- See Also:
-
PREF_DEBUG
Constant for debug string.- See Also:
-
PREF_LOGGING_ENABLED
Constant for whether logging is enabled- See Also:
-
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
Constant that indicates if the Paint-to-Mask operation should output to a new image- See Also:
-
PREF_ZOOM_LINEAR
Constant that indicates if the zoom should be linear (otherwise geometric)- See Also:
-
PREF_INTENSITY_LABEL_COLOR
Constant that indicates the intensity label color.- See Also:
-
PREF_INTENSITY_LABEL_BACKGROUND_COLOR
Constant that indicates the intensity label background color.- See Also:
-
PREF_DEFAULT_FRAME_RATE
Constant that indicates the default frame rate- See Also:
-
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
Constant that indicates if a prompt should be shown before an image file is overwritten.- See Also:
-
PREF_SHOW_DICOM_OVERLAYS
Constant that indicates if the DICOM overlay should be shown.- See Also:
-
PREF_SHOW_IMAGE_OVERLAYS
Constant that indicates if the image overlay should be shown.- See Also:
-
PREF_SHOW_PAINT_BORDER
Constant that indicates if the paint border shown.- See Also:
-
PREF_SHOW_PRIVATE_TAGS
Constant that indicates if the private DICOM tags are to be shown- See Also:
-
PREF_SHOW_SPLASH
Constant that indicates if the splash graphic should be shown when mipav starts.- See Also:
-
PREF_SHOW_UI_LF
Class name for selected look and feel type, can also be "None" (default selection)- See Also:
-
PREF_LOG_FILENAME
Constant that indicates the pathname of the log file.- See Also:
-
PREF_IMAGE_TOOLBAR_ON
Constant identifying if the miscellaneous toolbar is on by default.- See Also:
-
PREF_PAINT_TOOLBAR_ON
Constant indicating if the Paint Toolbar is on by default.- See Also:
-
PREF_SCRIPTING_TOOLBAR_ON
Constant that indicates if the Scripting toolbar should be shown by default.- See Also:
-
PREF_VOI_TOOLBAR_ON
Constant indicating if the VOI Toolbar is on by default.- See Also:
-
PREF_SHORTCUTS
Constant indicating the application shortcuts (user defined).- See Also:
-
PREF_DICOM_BROWSER_CONFIG
Constant indicating the DICOM browser configuration.- See Also:
-
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
Constant that indicates if triplanar protractor should snap to nearest multiple of 90 degrees.- See Also:
-
PREF_TRIPLANAR_SCROLL_ORIGINAL
Constant that indicates if the triplanar should scroll the original image- See Also:
-
PREF_SHOW_LINE_ANGLE
Constant that indicates whether the angle of line VOIs should be shown on screen.- See Also:
-
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
Constant indicating the look of VOI Points drawn on an image.- See Also:
-
PREF_VOI_LPS_SAVE
Constant indicating if VOIs should be saved as LPS or file coordinates- See Also:
-
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
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
Constant that indicates the menu font.- See Also:
-
PREF_MENU_FONT_SIZE
Constant that indicates the menu font size.- See Also:
-
PREF_MENU_FONT_COLOR
Constant that indicates the menu font color.- See Also:
-
PREF_SHOW_VOI_NAME
Constant that indicates whether to show the VOI name.- See Also:
-
PREF_SHOW_OUTPUT
Constant that indicates whether to show output.- See Also:
-
PREF_LAST_STACK_FLAG
Constant that indicates the last stack flag.- See Also:
-
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
Constant that indicated if the multi-theading is enabled- See Also:
-
PREF_GPU_COMP_ENABLED
Constant that indicates if computing on the GPU is enabled- See Also:
-
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
Constant that indicates if left mouse click inside image should cause intensity value to display- See Also:
-
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
Constant that indicates if window/level changes should be relative to the current transfer function values- See Also:
-
PREF_OPEN_IMAGES_IN_TILED_FORMAT
Constant that indicates if images are to be open im tiled format- See Also:
-
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
Constant that indicates the user defined file type associations.- See Also:
-
PREF_USER_FILETYPES
Constant that indicates the user defined file types.- See Also:
-
PREF_USER_FILETYPES_TEXTFIELDS
?- See Also:
-
PREF_FILENAME_FILTER
Constant that indicates the filename filter.- See Also:
-
PREF_IMAGE_DIR
Constant that indicates the current image directory.- See Also:
-
PREF_PLUGIN_INSTALL_DIR
Constant that indicates the current directory where plugins can be installed from.- See Also:
-
PREF_VOI_TEXT_COLOR
Constant that indicates the last used VOI text color.- See Also:
-
PREF_VOI_TEXT_BACKGROUND_COLOR
Constant that indicates the last used VOI text background color.- See Also:
-
PREF_DICOM_STORAGE_DIR
Constant that indicates the default dicom storage directory.- See Also:
-
PREF_AUTOSTART_DICOM_RECEIVER
Constant that indicates whether to enable the dicom receiver on startup.- See Also:
-
PREF_ASK_DICOM_RECEIVER
Constant that indicates whether to ask about starting dicom receiver on startup.- See Also:
-
PREF_ACTIVE_IMAGE_COLOR
Constant that indicates the active image color.- See Also:
-
PREF_ACTIVE_IMAGE_COLOR_BORDERSIZE
Constant that indicates the active image color border size- See Also:
-
PREF_QUICKLIST_NUMBER
number of recently used images to store in quicklist.- See Also:
-
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
constant for warning the user when audio will be discarded from opened AVIs.- See Also:
-
PREF_OVERWRITE_STATISTICS
constant on whether to overwrite the voi statistics file automatically- See Also:
-
PREF_CROSSHAIR_CURSOR
Constant that indicates the crosshair cursor to be used.- See Also:
-
PREF_DEFAULT_DISPLAY
Constant to indicate default brightness and color display to screen- See Also:
-
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
Constant that indicates whether the log of the magnitude of an image is used for image display- See Also:
-
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
Constant that indicates whether image will display using a stored LUT (from image file or generic to image type)- See Also:
-
PREF_INTERPOLATE_MODE
Constant that indicates the mode of image interpolation used for display- See Also:
-
PREF_HISTOGRAM_DISPLAY
Constant that indicates whether image is updated in real-time on histogram changes- See Also:
-
PREF_TRIM_VOI
Constant that indicates the VOI Trim level variable.- See Also:
-
PREF_TRIM_MASK
Constant that indicates the mask trim level variable.- See Also:
-
PREF_TRIM_FLAG
Constant that indicates the VOI Trim flag for trimming adjacent points.- See Also:
-
PREF_VOI_THICKNESS
Constant indicating the VOI Thickness.- See Also:
-
PREF_VOI_DRAW_COLOR
the voi draw color constant.- See Also:
-
PREF_VOI_START_COLOR
the starting color for VOIs (first drawn).- See Also:
-
PREF_DATA_PROVENANCE_MODE
constant for logging.- See Also:
-
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
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
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
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
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
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
Constant that indicates the script directory.- See Also:
-
PREF_LAST_SCRIPT
Constant that indicates the last script that was run.- See Also:
-
PREF_DICOM_SAVE_DICTIONARY
constant that indicates the dicom save dictionary.- See Also:
-
PREF_STARTING_HEAP_SIZE
The starting heap size.- See Also:
-
PREF_MAX_HEAP_SIZE
The maximum heap size.- See Also:
-
PREF_RAW_EXTENTS
Constant that indicates the default raw image extents.- See Also:
-
PREF_RAW_BIG_ENDIAN
Constant that indicates the default raw image big endian.- See Also:
-
PREF_RAW_RESOLUTIONS
Constant that indicates the default raw image resolutions.- See Also:
-
PREF_RAW_UNITS
Constant that indicates the default raw image units.- See Also:
-
PREF_RAW_TYPE
Constant that indicates the default raw image type.- See Also:
-
PREF_RAW_DATA_OFFSET
Constant that indicates the default raw image data offset.- See Also:
-
PREF_LB_ROW_DEPENDENT
Constant that indicates the LightBox row dependant variable.- See Also:
-
PREF_LB_GRID_ROW
Constant that indicates the LightBox grid row variable.- See Also:
-
PREF_LB_GRID_COL
Constant that indicates the LightBox grid column variable.- See Also:
-
PREF_LB_GRID_SIZE
Constant that indicates the LightBox grid size variable.- See Also:
-
PREF_LB_INCREMENT
Constant that indicates the increment between displayed lightbox slices- See Also:
-
PREF_LB_GRID_COLOR
Constant that indicates the LightBox grid color variable.- See Also:
-
PREF_LB_BORDER_SIZE
Constant that indicates the LightBox border size variable.- See Also:
-
PREF_LB_BORDER_COLOR
Constant that indicates the LightBox border color variable.- See Also:
-
PREF_LB_SELECTED_BORDER_SIZE
Constant that indicates the LightBox selected border size variable.- See Also:
-
PREF_LB_SELECTED_BORDER_COLOR
Constant that indicates the LightBox selected border color variable.- See Also:
-
PREF_LB_MAG
Constant that indicates the LightBox magnification variable.- See Also:
-
PREF_LB_LOCATION
Constant that indicates the LightBox location variable.- See Also:
-
PREF_LB_TSLICE
Constant that indicates the LightBox individual t-slice variable.- See Also:
-
PREF_LB_CUPDATE
Constant that indicates continuous update of LightBox- See Also:
-
PREF_APP_TITLE
Constant that indicates the application title.- See Also:
-
PREF_APP_ICON
Constant that indicates the application icon.- See Also:
-
PREF_SHOW_OVERLAYS
Constant that indicates whether to show image overlays.- See Also:
-
PREF_PLUGIN_ALGORITHM
plugin of algorithm type.- See Also:
-
PREF_PLUGIN_FILE
plugin of file type.- See Also:
-
PREF_PLUGIN_VIEW
plugin of view type.- See Also:
-
PREF_NINDS_ANON_PLUGIN_INPUTDIR
?- See Also:
-
PREF_NINDS_ANON_PLUGIN_OUTPUTDIR
?- See Also:
-
PREF_NINDS_ANON_PLUGIN_CSVDIR
?- See Also:
-
ITEM_SEPARATOR
The character that separates items (such as in the user file type definitions).- See Also:
-
PREF_LEVEL
- See Also:
-
PREF_WINDOW
- See Also:
-
PREF_MIN
- See Also:
-
PREF_MAX
- See Also:
-
PREF_NDAR_PLUGIN_SERVER
- See Also:
-
PREF_NDAR_PLUGIN_DATASTRUCT_NAME
- See Also:
-
PREF_NDAR_PLUGIN_OUTPUT_DIR
- See Also:
-
PREF_NDAR_PLUGIN_CSV_DIR
- See Also:
-
PREF_BRICS_PLUGIN_OUTPUT_DIR
- See Also:
-
PREF_BRICS_PLUGIN_CSV_DIR
- See Also:
-
PREF_BRICS_PLUGIN_BIDS_DIR
- See Also:
-
PREF_BRICS_CONFLICT_RESOLUTION
- See Also:
-
PREF_PAINT_OPACITY
- See Also:
-
PREF_BUG_REPORT_NAME
- See Also:
-
PREF_BUG_REPORT_EMAIL
- See Also:
-
PREF_BUG_REPORT_URGENCY
- See Also:
-
PREF_USE_INCORRECT_ACPC_XDIM
- See Also:
-
PREF_FORCE_HISTO_UBYTE
- See Also:
-
PREF_MAX_DEBUG_LINES
- See Also:
-
PREF_DEBUG_MINOR
- See Also:
-
PREF_DEBUG_ALGORITHM
- See Also:
-
PREF_DEBUG_FILEIO
- See Also:
-
PREF_DEBUG_COMMS
- See Also:
-
PREF_DEBUG_SCRIPTING
- See Also:
-
PREF_MAINWINDOW_SIZE
- See Also:
-
PREF_EDIDTORWINDOW_SIZE
- See Also:
-
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_MINORConstant used to identify debugging category for general output.- See Also:
-
DEBUG_ALGORITHM
public static final int DEBUG_ALGORITHMConstant used to identify debugging category for general output by algorithms.- See Also:
-
DEBUG_FILEIO
public static final int DEBUG_FILEIOConstant used to identify debugging category for general output by FileIO.- See Also:
-
DEBUG_COMMS
public static final int DEBUG_COMMSConstant used to identify debugging category for general output by communications.- See Also:
-
DEBUG_SCRIPTING
public static final int DEBUG_SCRIPTINGConstant used to identify debugging category for output of scripting system messages.- See Also:
-
CACHED_MAX_DEBUG_LINES
public static int CACHED_MAX_DEBUG_LINESConstant 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
The schema for the data provenance xml files- See Also:
-
SAVE_DICOM_TAGS
Dicom tags to be saved- See Also:
-
mipavProps
A list of MIPAV properties. -
defaultProps
A default list of properties used if the mipav.preferences file cannot be found. -
messageFrame
Reference to the message frame where debug information can be displayed. -
preferencesFileName
The MIPAV preferences file name (without path). -
preferencesDir
The place where user-individual mipav files should be put. -
preferencesFile
The MIPAV preferences file path and name. -
userShortcutTable
Hashtable that holds all user-defined shortcuts -
defaultShortcutTable
Hashtable that holds the default shortcuts -
currentShortcut
The current shortcut -
logConfig
The current logging configuration -
DEFAULT_LOG_LEVEL
The default log level
-
-
Constructor Details
-
Preferences
public Preferences()
-
-
Method Details
-
addShortcut
Adds a new shortcut to the hashtable. if there is already a command predefined for the keystroke set fromsetShortcut(), it will be removed then replaced with the new command.- Parameters:
command- the command to map- Returns:
- DOCUMENT ME!
-
addShortcut
Adds a new shortcut to the hashtable with a given keystroke. if there is already a command predefined for the keystroke set fromsetShortcut(), 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
Gets all the text printed to the debug panel.- Returns:
- String representation of debug panel (new lines are removed)
-
data
Prints to data tab- Parameters:
string- String string to be output
-
getData
Gets all the text printed to the data panel.- Returns:
- String representation of data panel (new lines are removed)
-
debug
If at least one debug level is turned on, output the string.- Parameters:
string- String string to be output
-
debug
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 outputstring2- String string to be output
-
debug
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 outputstring2- String string to be outputstring3- String string to be output
-
debug
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 outputstring2- String string to be outputstring3- String string to be outputstring4- 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 outputstring2- String string to be outputstring3- String string to be outputstring4- String string to be outputstring5- String string to be output
-
debug
If the debug is turned on for the given level, output to the messageFrame.- Parameters:
string- String to be outputlevel- int level of debug to check
-
debug
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 outputstring2- String to be outputlevel- int level of debug to check
-
debug
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 outputstring2- String to be outputstring3- String to be outputlevel- int level of debug to check
-
debug
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 outputstring2- String to be outputstring3- String to be outputlevel- int level of debug to check
-
debug
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 outputstring2- String to be outputstring3- String to be outputlevel- int level of debug to check
-
debug
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 outputstring2- String to be outputstring3- String to be outputlevel- int level of debug to check
-
debug
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 outputstring2- String to be outputstring3- String to be outputlevel- 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 outputstring2- String to be outputstring3- String to be outputstring4- String to be outputlevel- 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 outputstring2- String to be outputstring3- String to be outputstring4- String to be outputstring5- String to be outputlevel- int level of debug to check
-
debug
If the debug is turned on for the given level, output to the messageFrame.- Parameters:
string- String to be outputlevel- 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 outputstring2- String to be outputlevel- 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 outputstring2- String to be outputstring3- String to be outputlevel- 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 outputstring2- String to be outputstring3- String to be outputlevel- 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 outputstring2- String to be outputstring3- String to be outputlevel- 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 outputstring2- String to be outputstring3- String to be outputlevel- 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 outputstring2- String to be outputstring3- String to be outputlevel- 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 outputstring2- String to be outputstring3- String to be outputstring4- String to be outputlevel- 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 outputstring2- String to be outputstring3- String to be outputstring4- String to be outputstring5- String to be outputlevel- 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
Returns how pixel values of images are displayed in terms or brightness values and possible colors.- Returns:
- The default display enumeration.
-
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
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
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
Accessor to get the default chat/file server host key.- Returns:
- default host key
-
getDefaultServerKey
Accessor to get default DICOM image server key.- Returns:
- default server key
-
getDefaultShortcutTable
Gets the Default Hashtable used to store the shortcut keystrokes and commands.- Returns:
- Hashtable the shortcut hashtable
-
getDefaultStorageKey
Accessor to get default DICOM image storage location.- Returns:
- default storage information
-
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
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
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
Accessor to get host (chat/file) server Internet Protocol for selected Name.- Parameters:
AETitle- application entity title- Returns:
- IP address of asssociated Name
-
getIconName
Returns the name of the application icon.- Returns:
- string containing the name of the system icon
-
getImageDirectory
Returns the image directory used last time.- Returns:
- the image directory used last time.
-
getIP
Accessor to get DICOM image server Internet Protocol for selected AETitle.- Parameters:
AETitle- application entity title- Returns:
- IP address of asssociated AETitle
-
getLastImageAt
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
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
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
Used by ViewOpenImageSequence to get the last path used when opening an image sequence.- Returns:
- 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
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
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
- Returns:
- the mipavProps
-
getNextHostKey
Returns the next host key.- Returns:
- The next host key.
-
getNextServerKey
Returns the next server key.- Returns:
- The next server key.
-
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
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
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
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
Returns the directory last used for installing plugins.- Returns:
- the directory last used for installing plugins.
-
getPort
Accessor to get DICOM image server's port for selected AETitle.- Parameters:
AETitle- application entity title- Returns:
- port address of asssociated AETitle
-
getPreferencesDir
Return the directory where mipav-generated, user-specific files should be placed.- Returns:
- the place to put user-specific files
-
getProperty
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
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getScriptsDirectory
Returns the default script directory. if null, returns the user's current working directory + "scripts"- Returns:
- script dir
-
getShortcut
Returns a keystroke shortcut for the given command.- Parameters:
command- String the command to check- Returns:
- KeyStroke the shortcut's keystroke
-
getShortcutCommand
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
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
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
Gets the VOI draw color.- Returns:
- Color color to draw with
-
getVOIThickness
public static int getVOIThickness()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
is
Gets the boolean state of the property, where in the preferences file the "yes", "on", "true" all returntrue, but anything else (or non-existent property) returnsfalse. 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
truewhen the named property has the String the "yes", "on", "true".falsefor 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
DOCUMENT ME!- Parameters:
command- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
isDefaultKeyStroke
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
Gets the boolean state of the property, where in the preferences file the "yes", "on", "true" all returntrue, but anything else (or non-existent property) returnsfalse. 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
truewhen the named property has the String the "yes", "on", "true".falsefor any other string, or if the property does not exist.
-
isPreferenceSet
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:
trueif 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
Removes the property key from the MIPAV property list.- Parameters:
key- the property key.
-
removeShortcut
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
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
Sets the current keystroke shortcut for assignment once a command has been passed in.- Parameters:
ks- KeyStroke the shortcut keystroke
-
setDebugLevels
Sets the debug levels- Parameters:
levels- a Map of Category (int) -> LogLevel.
-
setDefaultDisplay
Sets the default display mode for 2D/3D image display.- Parameters:
display- the DefaultDisplay type
-
setDICOMBrowserTableConfiguration
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
Sets the temporary directory which is used for files which will be deleted.- Parameters:
tempDir- the temporary directory.
-
setImageDirectory
Sets the image directory as the latest used image directory.- Parameters:
imageDirectory- the current used image directory.
-
setInterpolationMode
Sets the display interpolation mode for 2D image display.- Parameters:
interp- the InterpolateDisplay type
-
setLastImage
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 otherwisenumDims- 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 framechannels- String - number of channels in the channels text box of the ViewOpenImageSequence frametimePoints- String - number of time points in the time points text box of the ViewOpenImageSequence frameordering- String - ordering sequence used in the radio button panel of the ViewOpenImageSequence frame
-
setLastOpenSequencePath
Used by ViewOpenImageSequence to save the path used when opening an image sequence.- Parameters:
path- DOCUMENT ME!
-
setMessageFrame
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
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 DICOMoverlays- String[] array of strings (16) for each of the overlay positions
-
setOverlays
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
Sets the plugin install directory. -
setPreferencesFileName
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
Change the file directory of the preferences file.- Parameters:
fileDir- the file directory, defaults to $HOME/mipav/
-
setProperty
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
DOCUMENT ME!- Parameters:
scriptFile- DOCUMENT ME!
-
setScriptsDirectory
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
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
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
-
setLogLevelAlgorithm
-
setLogLevelFileIO
-
setLogLevelComms
-
setLogLevelScripting
-