java.lang.Object
ij.Prefs
This class contains the ImageJ preferences, which are
loaded from the "IJ_Props.txt" and "IJ_Prefs.txt" files.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic boolean"ImageJ" window is always on top.static booleanNo longer usedstatic booleanDraw tool icons using antialiasing (always true).static booleanAdjust contrast when scrolling stacksstatic booleanTurn live display on plots automaticallystatic booleanAutomatically run examples in Help/Examples menu.static booleanAvoid interpolation when re-slicingstatic final Stringstatic booleanBackgound is black in binary imagesstatic booleanUse black image border.static booleanCalibrate image type conversionsstatic boolean"Close All" command runningstatic booleanConvert tiff units to microns if pixel width is less than 0.0001 cm.static booleanInclude column headers when copying tables to clipboard.static booleanDialog "Cancel" button is on right on Linuxstatic final Stringstatic booleanDisable Edit/Undo command.static final Stringstatic booleanEnable this option to workaround a bug with some Linux window managers that causes windows to wander down the screen.static booleanDon't save Results table column headersstatic booleanDon't save Results table row numbersstatic booleanNo longer usedstatic booleanAllow lines to be created with one click at start and another at the endstatic final Stringstatic booleanAssume DICOM volumes use identical RescaleSlope and RescaleIntercept across all slicesstatic booleanRotate XZ orthogonal views 180 degreesstatic final Stringstatic booleanUse full range for 16-bit inversionsstatic final Stringstatic booleanIgnore Rescale Slope when opening DICOMsstatic booleanExport TIFF and Raw using little-endian byte order.static booleanDisplay images scaled invalid input: '<'100% using bilinear interpolationstatic booleanUse JFileChooser setting changed/static final Stringstatic booleanKeep arrow selection after adding to overlaystatic booleanPreserve undo (snapshot) buffers when switching imagesstatic final Stringstatic final Stringstatic booleanMove isolated plugins to Miscellaneous submenu.static booleanUse MultiPoint tool.static booleanDo not draw black border around image.static booleanDon't run garbage collector when user clicks in status barstatic final Stringstatic booleanUse NonBlockingGenericDialogs in filtersstatic booleanDo not label multiple points created using point tool.static booleanDo not include row numbers when copying tables to clipboard.static booleanOpen images at 100% magnificationstatic booleanOpen DICOMs as 32-bit float imagesstatic final Stringstatic final Stringstatic booleanExtend the borders to foreground for binary erosions and closings.static booleanAways paint images using double bufferingstatic booleanAdd points to ROI Manager.static booleanAdd points to overlay.static booleanPoint tool auto-measure mode.static booleanPoint tool auto-next slice mode (not saved in IJ_Prefs).static final Stringstatic final Stringstatic booleanAngle tool measures reflex anglestatic booleanRequire control or command key for keybaord shortcuts.static booleanReverse channel-slice-frame priority used by Next Slice and Previous Slice commands.static final Stringstatic booleanRotate YZ orthogonal views 90 degreesstatic booleanRun the SocketListener.static Stringfile.separator system propertystatic booleanSet MenuBar on Macs running Java 8.static final Stringstatic booleanIgnore stack positions when displaying points.static booleanOnly show ROIs associated with current slice in Roi Manager "Show All" mode.static booleanDo not display dialog when opening .raw filesstatic booleanWand tool "Smooth if thresholded" optionstatic booleanAutomatically spline fit line selectionsstatic booleanUse sub-pixel resolution with line selectionsstatic booleanSupport TRANSFORM Undo in macrosstatic final Stringstatic booleanUse the file chooser to import and export image sequences on Windows and Linuxstatic booleanOpen 8-bit images with inverting LUT so 0 is white and 255 is black.static booleanUse JFileChooser instead of FileDialog to open and save files.static booleanUse ROI names as "show all" labels in the ROI Managerstatic booleanUse pointer cursor instead of crossstatic booleanSet the "java.net.useSystemProxies" propertystatic booleanPlot rectangular selectons verticallystatic final Stringstatic booleanColor to grayscale conversion is weighted (0.299, 0.587, 0.114) if the variable is true. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic Stringstatic booleanUses the keywordkeyto retrieve a boolean from the preferences file.static doubleUses the keywordkeyto retrieve a number from the preferences file.static StringUses the keywordkeyto retrieve a string from the preferences file.static booleangetBoolean(String key, boolean defaultValue) Retrieves a boolean from IJ_Props or IJ_Prefs.txt.static ColorFinds a color in IJ_Props or IJ_Prefs.txt.static Propertiesstatic StringReturns the custom preferences (IJ_Prefs.txt) file path.static StringReturns the custom properties (IJ_Props.txt) file path.static StringReturns the default directory, if any, or null.static doubleRetrieves a number from IJ_Props or IJ_Prefs.txt.static StringReturns the file.separator system property.static doubleReturns the GenericDialog and Command Finder text scale.static StringObsolete, replaced by getImageJDir(), which, unlike this method, returns a path that ends with File.separator.static StringReturns the path, ending in File.separator, to the ImageJ directory.static StringReturns the URL of the directory that contains the ImageJ sample images.static intRetrieves a number from IJ_Props or IJ_Prefs.txt.static PointgetLocation(String key) Uses the keywordkeyto retrieve a location from the preferences file.static Stringstatic StringReturns the path to the directory where the preferences file (IJPrefs.txt) is saved.static StringRetrieves a string from string in IJ_Props or IJ_Prefs.txt.static StringRetrieves a string from IJ_Props or IJ_Prefs.txt.static intReturns the number of threads used by PlugInFilters to process images and stacks.static intReturns the transparent index (0-255), or -1 if transparency is disabled.static StringFinds and loads the configuration file ("IJ_Props.txt") and the preferences file ("IJ_Prefs.txt").static voidDelete the preferences file when ImageJ quits.static voidsaveLocation(String key, Point loc) Saves the Pointlocin the preferences file as a string using the keywordkey.static voidSaves user preferences in the IJ_Prefs.txt properties file.static voidsavePrefs(Properties prefs, String path) static voidSaves the value of the booleanvaluein the preferences file using the keywordkey.static voidSaves the value of the doublevaluein the preferences file using the keywordkey.static voidSaves the value of the integervaluein the preferences file using the keywordkey.static voidSaves the value of the stringtextin the preferences file using the keywordkey.static voidsetGuiScale(double scale) Sets the GenericDialog and Command Finder text scale (0.5 to 3.0).static voidsetImagesURL(String url) Sets the URL of the directory that contains the ImageJ sample images.static voidsetThreads(int n) Sets the number of threads (1-32) used by PlugInFilters to process stacks.static voidsetTransparentIndex(int index) Sets the transparent index (0-255), or set to -1 to disable transparency.
-
Field Details
-
PROPS_NAME
- See Also:
-
PREFS_NAME
- See Also:
-
DIR_IMAGE
- See Also:
-
FCOLOR
- See Also:
-
BCOLOR
- See Also:
-
ROICOLOR
- See Also:
-
SHOW_ALL_COLOR
- See Also:
-
JPEG
- See Also:
-
FPS
- See Also:
-
DIV_BY_ZERO_VALUE
- See Also:
-
NOISE_SD
- See Also:
-
MENU_SIZE
- See Also:
-
GUI_SCALE
- See Also:
-
THREADS
- See Also:
-
KEY_PREFIX
- See Also:
-
OPTIONS
- See Also:
-
vistaHint
- See Also:
-
OPTIONS2
- See Also:
-
separator
file.separator system property -
usePointerCursor
public static boolean usePointerCursorUse pointer cursor instead of cross -
antialiasedText
public static boolean antialiasedTextNo longer used -
interpolateScaledImages
public static boolean interpolateScaledImagesDisplay images scaled invalid input: '<'100% using bilinear interpolation -
open100Percent
public static boolean open100PercentOpen images at 100% magnification -
blackBackground
public static boolean blackBackgroundBackgound is black in binary images -
useJFileChooser
public static boolean useJFileChooserUse JFileChooser instead of FileDialog to open and save files. -
weightedColor
public static boolean weightedColorColor to grayscale conversion is weighted (0.299, 0.587, 0.114) if the variable is true. -
blackCanvas
public static boolean blackCanvasUse black image border. -
pointAutoMeasure
public static boolean pointAutoMeasurePoint tool auto-measure mode. -
pointAutoNextSlice
public static boolean pointAutoNextSlicePoint tool auto-next slice mode (not saved in IJ_Prefs). -
requireControlKey
public static boolean requireControlKeyRequire control or command key for keybaord shortcuts. -
useInvertingLut
public static boolean useInvertingLutOpen 8-bit images with inverting LUT so 0 is white and 255 is black. -
antialiasedTools
public static boolean antialiasedToolsDraw tool icons using antialiasing (always true). -
intelByteOrder
public static boolean intelByteOrderExport TIFF and Raw using little-endian byte order. -
doubleBuffer
public static boolean doubleBufferNo longer used -
noPointLabels
public static boolean noPointLabelsDo not label multiple points created using point tool. -
disableUndo
public static boolean disableUndoDisable Edit/Undo command. -
noBorder
public static boolean noBorderDo not draw black border around image. -
showAllSliceOnly
public static boolean showAllSliceOnlyOnly show ROIs associated with current slice in Roi Manager "Show All" mode. -
copyColumnHeaders
public static boolean copyColumnHeadersInclude column headers when copying tables to clipboard. -
noRowNumbers
public static boolean noRowNumbersDo not include row numbers when copying tables to clipboard. -
moveToMisc
public static boolean moveToMiscMove isolated plugins to Miscellaneous submenu. -
pointAddToManager
public static boolean pointAddToManagerAdd points to ROI Manager. -
pointAddToOverlay
public static boolean pointAddToOverlayAdd points to overlay. -
padEdges
public static boolean padEdgesExtend the borders to foreground for binary erosions and closings. -
runSocketListener
public static boolean runSocketListenerRun the SocketListener. -
multiPointMode
public static boolean multiPointModeUse MultiPoint tool. -
openDicomsAsFloat
public static boolean openDicomsAsFloatOpen DICOMs as 32-bit float images -
ignoreRescaleSlope
public static boolean ignoreRescaleSlopeIgnore Rescale Slope when opening DICOMs -
fixedDicomScaling
public static boolean fixedDicomScalingAssume DICOM volumes use identical RescaleSlope and RescaleIntercept across all slices -
verticalProfile
public static boolean verticalProfilePlot rectangular selectons vertically -
rotateYZ
public static boolean rotateYZRotate YZ orthogonal views 90 degrees -
flipXZ
public static boolean flipXZRotate XZ orthogonal views 180 degrees -
dontSaveHeaders
public static boolean dontSaveHeadersDon't save Results table column headers -
dontSaveRowNumbers
public static boolean dontSaveRowNumbersDon't save Results table row numbers -
noClickToGC
public static boolean noClickToGCDon't run garbage collector when user clicks in status bar -
reflexAngle
public static boolean reflexAngleAngle tool measures reflex angle -
avoidResliceInterpolation
public static boolean avoidResliceInterpolationAvoid interpolation when re-slicing -
keepUndoBuffers
public static boolean keepUndoBuffersPreserve undo (snapshot) buffers when switching images -
useNamesAsLabels
public static boolean useNamesAsLabelsUse ROI names as "show all" labels in the ROI Manager -
useSystemProxies
public static boolean useSystemProxiesSet the "java.net.useSystemProxies" property -
useFileChooser
public static boolean useFileChooserUse the file chooser to import and export image sequences on Windows and Linux -
subPixelResolution
public static boolean subPixelResolutionUse sub-pixel resolution with line selections -
autoContrast
public static boolean autoContrastAdjust contrast when scrolling stacks -
enhancedLineTool
public static boolean enhancedLineToolAllow lines to be created with one click at start and another at the end -
keepArrowSelections
public static boolean keepArrowSelectionsKeep arrow selection after adding to overlay -
paintDoubleBuffered
public static boolean paintDoubleBufferedAways paint images using double buffering -
skipRawDialog
public static boolean skipRawDialogDo not display dialog when opening .raw files -
reverseNextPreviousOrder
public static boolean reverseNextPreviousOrderReverse channel-slice-frame priority used by Next Slice and Previous Slice commands. -
autoRunExamples
public static boolean autoRunExamplesAutomatically run examples in Help/Examples menu. -
showAllPoints
public static boolean showAllPointsIgnore stack positions when displaying points. -
setIJMenuBar
public static boolean setIJMenuBarSet MenuBar on Macs running Java 8. -
alwaysOnTop
public static boolean alwaysOnTop"ImageJ" window is always on top. -
splineFitLines
public static boolean splineFitLinesAutomatically spline fit line selections -
doNotSaveWindowLocations
public static boolean doNotSaveWindowLocationsEnable this option to workaround a bug with some Linux window managers that causes windows to wander down the screen. -
jFileChooserSettingChanged
public static boolean jFileChooserSettingChangedUse JFileChooser setting changed/ -
convertToMicrons
public static boolean convertToMicronsConvert tiff units to microns if pixel width is less than 0.0001 cm. -
smoothWand
public static boolean smoothWandWand tool "Smooth if thresholded" option -
closingAll
public static boolean closingAll"Close All" command running -
dialogCancelButtonOnRight
public static boolean dialogCancelButtonOnRightDialog "Cancel" button is on right on Linux -
supportMacroUndo
public static boolean supportMacroUndoSupport TRANSFORM Undo in macros -
nonBlockingFilterDialogs
public static boolean nonBlockingFilterDialogsUse NonBlockingGenericDialogs in filters -
autoLivePlots
public static boolean autoLivePlotsTurn live display on plots automatically -
fullRange16bitInversions
public static boolean fullRange16bitInversionsUse full range for 16-bit inversions -
calibrateConversions
public static boolean calibrateConversionsCalibrate image type conversions
-
-
Constructor Details
-
Prefs
public Prefs()
-
-
Method Details
-
set
Saves the value of the stringtextin the preferences file using the keywordkey. The string can be retrieved using the appropriateget()method.- See Also:
-
set
Saves the value of the integervaluein the preferences file using the keywordkey. The value can be retrieved using the appropriateget()method.- See Also:
-
set
Saves the value of the doublevaluein the preferences file using the keywordkey. The value can be retrieved using the appropriateget()method.- See Also:
-
set
Saves the value of the booleanvaluein the preferences file using the keywordkey. The value can be retrieved using the appropriateget()method.- See Also:
-
get
Uses the keywordkeyto retrieve a string from the preferences file. ReturnsdefaultValueif the key is not found. -
get
Uses the keywordkeyto retrieve a number from the preferences file. ReturnsdefaultValueif the key is not found. -
get
Uses the keywordkeyto retrieve a boolean from the preferences file. ReturnsdefaultValueif the key is not found. -
load
Finds and loads the configuration file ("IJ_Props.txt") and the preferences file ("IJ_Prefs.txt").- Returns:
- an error message if "IJ_Props.txt" not found.
-
getImagesURL
Returns the URL of the directory that contains the ImageJ sample images. -
setImagesURL
Sets the URL of the directory that contains the ImageJ sample images. -
getHomeDir
Obsolete, replaced by getImageJDir(), which, unlike this method, returns a path that ends with File.separator. -
getImageJDir
Returns the path, ending in File.separator, to the ImageJ directory. -
getPluginsDirProperty
-
getPrefsDir
Returns the path to the directory where the preferences file (IJPrefs.txt) is saved. -
getDefaultDirectory
Returns the default directory, if any, or null. -
getFileSeparator
Returns the file.separator system property. -
savePreferences
public static void savePreferences()Saves user preferences in the IJ_Prefs.txt properties file. -
resetPreferences
public static void resetPreferences()Delete the preferences file when ImageJ quits. -
saveLocation
Saves the Pointlocin the preferences file as a string using the keywordkey. -
getLocation
Uses the keywordkeyto retrieve a location from the preferences file. Returns null if the key is not found or the location is not valid (e.g., offscreen). -
savePrefs
- Throws:
IOException
-
getThreads
public static int getThreads()Returns the number of threads used by PlugInFilters to process images and stacks. -
setThreads
public static void setThreads(int n) Sets the number of threads (1-32) used by PlugInFilters to process stacks. -
setTransparentIndex
public static void setTransparentIndex(int index) Sets the transparent index (0-255), or set to -1 to disable transparency. -
getTransparentIndex
public static int getTransparentIndex()Returns the transparent index (0-255), or -1 if transparency is disabled. -
getControlPanelProperties
-
defaultResultsExtension
-
setGuiScale
public static void setGuiScale(double scale) Sets the GenericDialog and Command Finder text scale (0.5 to 3.0). -
getGuiScale
public static double getGuiScale()Returns the GenericDialog and Command Finder text scale. -
getCustomPropsPath
Returns the custom properties (IJ_Props.txt) file path. -
getCustomPrefsPath
Returns the custom preferences (IJ_Prefs.txt) file path. -
getString
Retrieves a string from IJ_Props or IJ_Prefs.txt. Does not retrieve strings set using Prefs.set(). -
getString
Retrieves a string from string in IJ_Props or IJ_Prefs.txt. -
getInt
Retrieves a number from IJ_Props or IJ_Prefs.txt. Does not retrieve numbers set using Prefs.set(). -
getDouble
Retrieves a number from IJ_Props or IJ_Prefs.txt. Does not retrieve numbers set using Prefs.set(). -
getBoolean
Retrieves a boolean from IJ_Props or IJ_Prefs.txt. Does not retrieve boolean set using Prefs.set(). -
getColor
Finds a color in IJ_Props or IJ_Prefs.txt. -
commandLineMacro
public static boolean commandLineMacro()
-